memcp
by maydali28·★ 18·Score 45
A persistent memory MCP server for Claude Code that implements the Recursive Language Model framework to store knowledge across sessions.
Overview
MemCP is a sophisticated MCP server that gives Claude Code a persistent external memory system. It solves the context loss problem that occurs after /compact commands and when sessions hit context window limits. The server implements 24 MCP tools organized across memory management, context handling, search, graph navigation, and lifecycle management categories. It uses SQLite for storage with a MAGMA 4-graph system that connects insights via semantic, temporal, causal, and entity edges. The architecture follows a 3-layer delegation pattern with comprehensive test coverage and benchmarks showing significant token efficiency advantages over native context-only operation.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose MemCP when you're working on long-term projects with Claude Code where maintaining context across compactions and sessions is crucial, especially with large codebases or multiple documents.
When NOT to choose this
Avoid MemCP if you need cross-platform support beyond Python, prefer cloud-based solutions, or need access to your memory data through web interfaces or APIs.
Tools this server exposes
12 tools extracted from the READMEmemcp_pingHealth check — returns server status and memory statistics
memcp_rememberSave an insight to persistent memory
memcp_recallRetrieve insights from memory with various filters
memcp_forgetRemove an insight from memory by ID
memcp_load_contextStore content as a named context variable on disk
memcp_inspect_contextInspect a stored context's metadata and preview
memcp_get_contextRead a stored context's content or specific line range
memcp_chunk_contextSplit a stored context into navigable numbered chunks
memcp_peek_chunkRead a specific chunk from a chunked context
memcp_searchSearch across memory insights and context chunks
memcp_relatedFind connected knowledge via graph edges from an insight
memcp_projectsList all projects with insight, context, and session counts
Comparable tools
Installation
Install MemCP using pip:
pip install memcpFor interactive installation:
bash scripts/install.shTo use with Claude Code, register the MCP server in your Claude Desktop configuration:
{
"mcpServers": {
"memcp": {
"command": "python",
"args": ["-m", "memcp.server"],
"env": {}
}
}
}Optional dependencies for enhanced capabilities:
pip install memcp[ner] # For spaCy NER
pip install memcp[vector] # For semantic search with embeddingsFAQ
- How does MemCP prevent context loss after /compact?
- MemCP implements auto-save hooks that force Claude to persist insights before compact, storing them in SQLite for retrieval across sessions.
- What file storage does MemCP use?
- MemCP uses SQLite for the knowledge graph (graph.db) and filesystem for contexts and chunks (~/.memcp/).
Compare memcp with
Last updated · Auto-generated from public README + GitHub signals.