The mem0 MCP Server connects MCP Host applications with the mem0 cloud service, providing structured project memory management and semantic search capabilities for project-related information.
You need to have pipx
installed on your system to run the mem0 MCP Server. If you don't have pipx installed, you can install it using pip:
pip install pipx
Before using the mem0 MCP Server, you need a mem0 API key. This key should be set as an environment variable:
export MEM0_API_KEY="your_mem0_api_key_here"
When configuring your MCP Host to use the mem0 MCP Server, you must specify the log output mode and, if enabled, the absolute log file path.
"mem0": {
"command": "pipx",
"args": ["run", "mem0-mcp-for-pm", "--log=off"],
"env": {
"MEM0_API_KEY": "{apikey}"
}
}
"mem0": {
"command": "pipx",
"args": ["run", "mem0-mcp-for-pm", "--log=on", "--logfile=/workspace/logs/mem0-mcp-server.log"],
"env": {
"MEM0_API_KEY": "{apikey}"
}
}
If you're experiencing issues due to caching of older versions, specify the exact version:
"mem0": {
"command": "pipx",
"args": ["run", "mem0-mcp-for-pm==0.3.2", "--log=off"],
"env": {
"MEM0_API_KEY": "{apikey}"
}
}
The mem0 MCP Server provides several tools for managing project memories:
Use the add_project_memory
tool to store new project information. All project memory entries must be in TOML format.
Example TOML for project status:
category = "Project Status"
project = "project-name"
timestamp = "2025-04-29T16:00:00+09:00"
name = "Project Name"
purpose = "Project Purpose"
version = "1.2.0"
phase = "development"
completionLevel = 0.65
milestones = ["Planning", "Development"]
currentFocus = ["Implementing Feature X", "Optimizing Component Y"]
[metadata]
type = "status"
priority = "high"
tags = ["backend", "release"]
To get all project memories:
get_all_project_memories
To search for specific memories:
search_project_memories
To update existing project information:
update_project_memory
To delete a specific project memory:
delete_project_memory
To delete all project memories:
delete_all_project_memories
Use the run_id
parameter to logically group related entries:
run_id = "project:member-system:feature:authentication"
Always add a [metadata]
TOML table to enhance search and filtering:
[metadata]
type = "task"
priority = "high"
tags = ["frontend"]
category = "Task Management"
project = "project-name"
timestamp = "2025-04-29T16:00:00+09:00"
[[tasks]]
description = "Implement Feature X"
status = "in-progress"
deadline = "2025-05-15"
assignee = "Team A"
dependencies = ["Component Y"]
[metadata]
type = "task"
priority = "high"
tags = ["frontend", "authentication"]
category = "Meeting Summary"
project = "project-name"
timestamp = "2025-04-29T16:00:00+09:00"
title = "Weekly Progress Meeting"
date = "2025-03-23"
attendees = ["Sato", "Suzuki", "Tanaka"]
topics = ["Progress Report", "Risk Management", "Next Week's Plan"]
decisions = ["Approve additional resource allocation", "Delay release date by one week"]
[[actionItems]]
description = "Procedure for adding resources"
assignee = "Sato"
dueDate = "2025-03-25"
[metadata]
type = "meeting"
tags = ["weekly", "progress"]
Use these parameters to manage the lifecycle of your information:
immutable = true # Prevents updates
expiration_date = "2025-06-30" # Sets expiry date
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "mem0" '{"command":"pipx","args":["run","mem0-mcp-for-pm","--log=off"],"env":{"MEM0_API_KEY":"{apikey}"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"mem0": {
"command": "pipx",
"args": [
"run",
"mem0-mcp-for-pm",
"--log=off"
],
"env": {
"MEM0_API_KEY": "{apikey}"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"mem0": {
"command": "pipx",
"args": [
"run",
"mem0-mcp-for-pm",
"--log=off"
],
"env": {
"MEM0_API_KEY": "{apikey}"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect