Authority-weighted memory graph for AI agents with conflict detection and semantic search.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
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".
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: high / medium / low β authority scores 1.0 / 0.6 / 0.3 |
| Stale memories persist silently | Supersession tracking: old memories marked status=superseded with typed edges |
| Duplicates accumulate over time | Conflict detection before every store; auto-resolve by authority |
Or run directly:
Add to ~/.claude.json under mcpServers:
Or with the raw script:
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.
The script will:
mcp-memory-service SQLite databaseYour existing memory service is never modified β the script only reads from it.
All settings via environment variables:
| Variable | Default | Description |
|---|---|---|
MEMORY_GRAPH_DB_PATH | ~/.mcp-memory-graph/memories.db | SQLite database path |
MEMORY_GRAPH_MODEL | all-MiniLM-L6-v2 | sentence-transformers model |
MEMORY_GRAPH_DIM | 384 | Embedding dimensions |
MEMORY_GRAPH_CONFLICT_THRESHOLD | 0.85 | Cosine similarity above which memories are flagged as conflicting |
MEMORY_GRAPH_DEFAULT_RESULTS | 10 | Default retrieval limit |
| Tool | Description |
|---|---|
store_memory | Store with conflict detection and optional auto-resolve |
retrieve_memories | Semantic search ranked by similarity Γ authority |
check_conflicts | Preview conflicts before storing |
update_memory | Update content/priority with supersession tracking |
delete_memory | Soft delete (preserves history) |
add_memory_edge | Manually add typed relationship |
get_related_memories | Traverse relationship graph for a memory |
list_memories | List with filters (status, type, priority) |
Retrieval 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.
supersedes β this memory replaces anotherrelates_to β connected but not conflictingcontradicts β explicitly conflicting, unresolvedreferenced_by β another memory cites this oneMIT
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-memory-graph)<a href="https://allmcps.com/mcp/mcp-memory-graph"><img src="https://allmcps.com/api/badge/mcp-memory-graph?style=directory" alt="MCP Memory Graph on AllMCPs" /></a>