mcp-memory-graph
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-memory-graphRemember: user's favorite language is Python (priority high)"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-memory-graph
A context-aware memory MCP server for Claude Code and any MCP-compatible AI agent.
Goes beyond basic vector search by adding authority weighting, conflict detection, and typed relationship edges between memories — so your agent always retrieves the right answer when sources disagree.
Inspired by the context engine architecture described in Unblocked's "How a Context Engine Actually Works".
Why this exists
Standard memory MCP servers store and retrieve memories by semantic similarity. That works until you have conflicting memories — an old instruction saying one thing and a new one saying another. Without authority weighting, the agent retrieves whichever is semantically closer to the query, not whichever is more trustworthy.
mcp-memory-graph solves this with three mechanisms:
Problem | Solution |
All memories treated equally | Priority tiers: |
Stale memories persist silently | Supersession tracking: old memories marked |
Duplicates accumulate over time | Conflict detection before every store; auto-resolve by authority |
Related MCP server: pce-memory
Installation
pip install mcp-memory-graphOr run directly:
git clone https://github.com/RetroRobAI/mcp-memory-graph
cd mcp-memory-graph
pip install -r requirements.txt
python server.pyClaude Code setup
Add to ~/.claude.json under mcpServers:
"mcp-memory-graph": {
"type": "stdio",
"command": "mcp-memory-graph",
"env": {
"MEMORY_GRAPH_DB_PATH": "/path/to/memories.db"
}
}Or with the raw script:
"mcp-memory-graph": {
"type": "stdio",
"command": "python",
"args": ["/path/to/mcp-memory-graph/server.py"],
"env": {
"MEMORY_GRAPH_DB_PATH": "/path/to/memories.db"
}
}Migrating from an existing memory service
If you have an existing memory service (mcp-memory-service, Mem0, or a markdown-based memory system), you can import your memories into mcp-memory-graph using the included migration script.
Migration is manual and opt-in — it never runs automatically. Nothing is written until you explicitly confirm.
Run the migration script
python -m mcp_memory_graph.migrateThe script will:
Auto-detect any existing
mcp-memory-serviceSQLite databaseAsk if you have a markdown memory directory to import
Show you how many memories it found
Present three choices:
[1] Migrate — import everything into mcp-memory-graph
[2] Run in parallel — start mcp-memory-graph fresh, keep your old service running
[3] Skip — do nothing
Ask for a final confirmation before writing anything
Your existing memory service is never modified — the script only reads from it.
Configuration
All settings via environment variables:
Variable | Default | Description |
|
| SQLite database path |
|
| sentence-transformers model |
|
| Embedding dimensions |
|
| Cosine similarity above which memories are flagged as conflicting |
|
| Default retrieval limit |
Tools
Tool | Description |
| Store with conflict detection and optional auto-resolve |
| Semantic search ranked by similarity × authority |
| Preview conflicts before storing |
| Update content/priority with supersession tracking |
| Soft delete (preserves history) |
| Manually add typed relationship |
| Traverse relationship graph for a memory |
| List with filters (status, type, priority) |
Priority system
priority="high" # authority_score=1.0 — explicit instructions, confirmed preferences
priority="medium" # authority_score=0.6 — inferred preferences, reference data
priority="low" # authority_score=0.3 — session summaries, historical contextRetrieval ranking: weighted_score = 1 - (distance / (authority_score + 0.001) / 10)
A high-authority memory will rank above a semantically closer low-authority one when their similarity scores are within ~3x of each other.
Edge types
supersedes— this memory replaces anotherrelates_to— connected but not conflictingcontradicts— explicitly conflicting, unresolvedreferenced_by— another memory cites this one
Stack
sqlite-vec — vector similarity search
sentence-transformers — local embeddings, no API key needed
FastMCP — MCP server framework
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityBmaintenanceAn MCP server that provides memory management and gateway capabilities, enabling persistent storage and retrieval of contextual information across sessions.481,32625MIT
- Alicense-qualityCmaintenanceMCP server for context-aware memory and retrieval with hybrid search, dual-phase memory, and boundary-first security.3MIT
- Alicense-qualityCmaintenanceA memory-enhanced MCP server with RAG database and expiring memory capabilities, enabling AI systems to store and retrieve memories and documents with semantic search.3MIT
- Alicense-qualityFmaintenanceMCP server providing cognitive memory storage with dual memory system (project and user), semantic classification, time knowledge graph, and memory decay, enabling persistent context-aware interactions.MIT
Related MCP Connectors
Person-owned, portable AI memory as a remote MCP server, readable and writable by any MCP client.
Chinese-first brain-inspired memory MCP — hybrid recall, 7-layer user profile, workspace assembly.
Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/RetroRobAI/mcp-memory-graph'
If you have feedback or need assistance with the MCP directory API, please join our Discord server