An MCP Server to store and retreive project information from memory file
Project description
Project Memory MCP
An MCP server and Claude Code plugin for persistent project memory. Allows AI agents to maintain knowledge about projects between conversations via MEMORY.md files.
Features
- Store & retrieve project knowledge in Markdown format
- Incremental updates via SEARCH/REPLACE patches
- Auto-read hook — automatically loads project memory on first prompt (Claude Code plugin)
- Dream consolidation — automatic memory cleanup and deduplication (Claude Code plugin)
Installation
Claude Code Plugin (recommended)
Installs the MCP server, auto-read hook, and dream consolidation:
/plugin marketplace add /path/to/project-mem-mcp
/plugin install project-mem@cc-plugin-project-mem
Standalone MCP Server
For Codex, Claude Desktop, Cursor, or other MCP clients:
uvx project-mem-mcp
MCP Client Configuration
{
"mcpServers": {
"project-mem-mcp": {
"command": "uvx",
"args": [
"project-mem-mcp",
"--allowed-dir", "/path/to/your/projects"
]
}
}
}
The --allowed-dir argument restricts which directories the server can access. Can be used multiple times. Defaults to the current working directory if omitted.
Install from Source
git clone https://github.com/pynesys/project-mem-mcp.git
cd project-mem-mcp
python -m venv venv
source venv/bin/activate
pip install -e .
Tools
get_project_memory
Retrieves the entire MEMORY.md for a project.
get_project_memory(project_path: str) -> str
set_project_memory
Overwrites the entire MEMORY.md. Use when creating a new memory or when patches fail.
set_project_memory(project_path: str, project_info: str)
update_project_memory
Applies a single SEARCH/REPLACE patch to MEMORY.md:
update_project_memory(project_path: str, patch_content: str)
Patch format:
<<<<<<< SEARCH
Text to find in the memory file
=======
Text to replace it with
>>>>>>> REPLACE
The search text must appear exactly once in the file. Use empty replacement to remove content.
Plugin Features
When installed as a Claude Code plugin, you also get:
Memory Skill (auto-trigger)
Guides Claude on when and how to save to project memory. Automatically triggers when insights worth persisting are discovered — architecture decisions, gotchas, non-obvious patterns, current work context. No manual intervention needed.
Auto-read Hook
Automatically reads MEMORY.md into context on the first prompt of each session. No manual tool call needed.
Dream Consolidation
Automatic memory maintenance triggered after writes when:
- File size exceeds 25KB
- Last consolidation was more than 24 hours ago
The dream spawns a sonnet subagent that:
- Removes content duplicated in CLAUDE.md files
- Restructures for clarity and LLM readability
- Creates a backup before consolidating
Manual trigger: /dream
Security
- Project paths are validated against
--allowed-dirarguments - Memory files should never contain sensitive information
- Memory files must be in English
Dependencies
- fastmcp (>=3.2.0, <4.0.0)
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file project_mem_mcp-0.3.1.tar.gz.
File metadata
- Download URL: project_mem_mcp-0.3.1.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cec3a13dbf7631933e4b6128e6d4a410a9f2190807143f252c85d7699ad508c1
|
|
| MD5 |
b43f98f51ad06580a72240aec4a90d6c
|
|
| BLAKE2b-256 |
b9b3bffd6ae2ba1afcbbd6793c7811a5a9a8f949ea674f456d5f2f8d9bd44dcd
|
File details
Details for the file project_mem_mcp-0.3.1-py3-none-any.whl.
File metadata
- Download URL: project_mem_mcp-0.3.1-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f86f2b1d4c76d3256354ced1b816f2c9d8fbce7d63fe848df2b14f409ab4528
|
|
| MD5 |
f88781ec7ae297b99509827de210070a
|
|
| BLAKE2b-256 |
d6b94bde93fa418efb215c6fe3d8706de12ecf10a883ea49b17b3d497dfe92f8
|