Mem0 Project Memory
STDIOMCP server bridging applications with mem0 cloud for project memory management.
MCP server bridging applications with mem0 cloud for project memory management.
Version: 0.3.2
mem0 MCP Server bridges MCP Host applications and the mem0 cloud service, enabling structured project memory management and semantic search for project-related information.
pyproject.toml
script entrypoint--logfile
When running this MCP Server, you must explicitly specify the log output mode and (if enabled) the absolute log file path via command-line arguments.
--log=off
: Disable all logging (no logs are written)--log=on --logfile=/absolute/path/to/logfile.log
: Enable logging and write logs to the specified absolute 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}" } }
Note:
- When logging is enabled, logs are written only to the specified absolute file path. Relative paths or omission of
--logfile
will cause an error.- When logging is disabled, no logs are output.
- If the required arguments are missing or invalid, the server will not start and will print an error message.
- The log file must be accessible and writable by the MCP Server process.
- If you have trouble to run this server, it may be due to caching older version of mem0-mcp-for-pm. Please try to run it with the latest version (set
x.y.z
to the latest version) of mem0-mcp-for-pm by the below setting.
"mem0": { "command": "pipx", "args": ["run", "mem0-mcp-for-pm==x.y.z", "--log=off"], "env": { "MEM0_API_KEY": "{apikey}" } }
add_project_memory
get_all_project_memories
search_project_memories
update_project_memory
delete_project_memory
delete_all_project_memories
All tools are available via stdio-based MCP protocol.
--logfile /path/to/logfile.log
See LICENSE file.
The uniqueness of this forked is the structured format between MCP Host and mem0 is expected in coding format like TOML. Make sure you set the custom instruction to be able to handle better.
In order to make mem0 working as fitting to project management purpose, this forked has the following instruction for AI.
To register project information in mem0, always use the TOML format for all entries.
Follow these guidelines to ensure optimal AI extraction, searchability, and project management usability:
category
(e.g., "Task Management", "Project Status", etc.)project
(project name)timestamp
(ISO 8601 format, e.g., "2025-04-29T16:00:00+09:00")Below are TOML templates for common project management use cases.
Adapt these as needed, but keep the structure and metadata consistent for better search and extraction.
Project Status Example
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"]
Task Management Example
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"]
run_id
parameter to logically group related entries.project:project-name:category:subcategory
run_id = "project:member-system:feature:authentication"
[metadata]
TOML table to enhance search and filtering.[metadata] type = "task" priority = "high" tags = ["frontend"]
immutable = true
to prevent updates.expiration_date = "YYYY-MM-DD"
to set expiry.project
and timestamp
.By following these TOML-based guidelines, you will maximize the effectiveness of mem0’s project memory extraction and management.
For more advanced use cases, refer to the source code and server-side custom instructions.
This guide outlines strategies and templates for effectively managing project information using mem0. The aim is to improve searchability and reusability of project data through structured templates and metadata management.
mem0 can effectively manage the following types of information. Using structured templates improves searchability and reusability. Note that the templates provided are examples and should be adapted to fit specific project needs.
Template:
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 Phase", "Development Phase"] currentFocus = ["Implementing Feature X", "Optimizing Component Y"] risks = ["Concerns about API stability", "Resource shortage"]
Template:
category = "Task Management" project = "project-name" timestamp = "2025-04-29T16:00:00+09:00" [[tasks]] description = "Implement Feature X" status = "in-progress" deadline = "2025-03-15" assignee = "Team A" dependencies = ["Component Y"] [[tasks]] description = "Setup Development Environment" status = "completed"
Template:
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" [[actionItems]] description = "Revise test plan" assignee = "Suzuki" dueDate = "2025-03-24"
Using mem0's run_id
parameter, you can logically group related information. This helps maintain specific conversation flows or project contexts.
Recommended Format:
project:project-name:category:subcategory
Usage Example:
run_id = "project:member-system:feature:authentication"
Using metadata can enhance the searchability of information. We recommend using the following schema:
[metadata] type = "meeting|task|decision|status|risk" priority = "high|medium|low" tags = ["frontend", "backend", "design"] status = "pending|in-progress|completed"
Using the immutable
and expiration_date
parameters, you can manage the lifecycle of information.
Usage Example:
immutable = true expiration_date = "2025-06-30"
category = "Project Status" project = "member-system" timestamp = "2025-05-01T10:00:00+09:00" sprint = "Sprint-2025-05" duration = "2 weeks" goals = ["Implement authentication feature", "Improve UI"] [[tasks]] description = "Implement login screen" assignee = "Tanaka" estimate = "3 days" [[tasks]] description = "API integration" assignee = "Sato" estimate = "2 days" [metadata] type = "status" tags = ["sprint-planning"]
category = "Project Status" project = "member-system" timestamp = "2025-05-08T15:00:00+09:00" sprint = "Sprint-2025-05" completionLevel = 0.4 [[status]] task = "Implement login screen" progress = 0.7 status = "in-progress" [[status]] task = "API integration" progress = 0.2 status = "in-progress" blockers = ["Change in API response specification"] [metadata] type = "status" tags = ["sprint-progress"]
category = "Risk Management" project = "member-system" timestamp = "2025-05-03T11:00:00+09:00" [[risks]] description = "Concerns about external API stability" impact = "High" probability = "Medium" mitigation = "Implement fallback mechanism" owner = "Development Lead" status = "open" [metadata] type = "risk" priority = "high"
category = "Risk Management" project = "member-system" timestamp = "2025-05-10T16:30:00+09:00" [[risks]] description = "Concerns about external API stability" status = "Resolved" resolution = "Fallback mechanism implementation completed" [metadata] type = "risk" priority = "medium"
[metadata]
table.run_id
hierarchically to maintain information relevance.To implement the above improvements, we recommend the following steps:
Enhance the add_project_memory
Method:
Update Custom Instructions:
run_id
(introduce hierarchical structure).These improvements will enhance the usability and efficiency of information management while maintaining compatibility with existing APIs.
The proposed improvements provide value in the following ways while maintaining compatibility with existing mem0 MCP server functions: