Event-sourced knowledge graph memory for Claude Code with 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 the JSON block into your client's configuration file under mcpServers, then restart the application.
A persistent, event-sourced knowledge graph for AI coding agents. Unlike simple key-value memory, Mnemograph captures entities, relations, and observations β enabling semantic search, tiered context retrieval, and git-based version control of your AI's memory.
Works with: Claude Code, opencode, codex CLI, Zed, Continue.dev, and any MCP-compatible agent.
AI coding sessions are ephemeral. Mnemograph gives your AI partner persistent memory that:
Before using mnemograph, decide where to store memory:
| Scope | Path | Use When |
|---|---|---|
| Project-local | ./.claude/memory | Knowledge specific to this repo (architecture, decisions, patterns) |
| Global | ~/.claude/memory | Cross-project knowledge (personal learnings, universal patterns, preferences) |
| Custom | Any path via MEMORY_PATH | Shared team memory, org-wide knowledge bases |
Important: Agents should ask the user which scope to use when first setting up mnemograph for a project. This affects where knowledge is stored and whether it's shared across projects.
Give Claude Code this repo URL and ask it to set up mnemograph:
Or point Claude to the setup instructions directly:
Each MCP client has a different configuration format. See UNIVERSAL_MCP_COMPATIBILITY.md for copy-paste configs for:
~/.config/opencode/opencode.json~/.codex/config.yaml~/.config/zed/settings.json~/.continue/config.jsonThe key environment variable is MEMORY_PATH β set it to where you want the knowledge graph stored.
Mnemograph exposes these tools via MCP:
Core Operations:
| Tool | Description |
|---|---|
remember | Primary storage: Store knowledge atomically (entity + observations + relations in one call) |
recall | Primary retrieval: Get relevant context with auto token management. Use focus=['Entity'] for full details. Default output is human-readable prose. |
create_entities | Create entities (auto-blocks duplicates >80% match) |
create_relations | Link entities with typed edges (implements, uses, decided_for, etc.) |
add_observations | Add facts/notes to existing entities |
read_graph | Get the full knowledge graph (warning: may be large) |
delete_entities | Remove entities (cascades to relations) |
delete_relations | Remove specific relations |
delete_observations | Remove specific observations |
Session Lifecycle:
| Tool | Description |
|---|---|
session_start | Signal session start, get initial context. Returns quick_start guide. |
session_end | Signal session end, optionally save summary |
get_primer | Get oriented with the knowledge graph (call at session start) |
Branching (Parallel Workstreams):
| Tool | Description |
|---|---|
create_branch | Create a named branch for isolated work (e.g., "feature/auth-refactor") |
switch_branch | Switch to a different branch |
list_branches | List all branches |
merge_branch | Merge a branch into main |
delete_branch | Delete a branch |
get_current_branch | Get the current branch name |
Graph Maintenance:
| Tool | Description |
|---|---|
find_similar | Find entities with similar names (duplicate detection) |
find_orphans | Find entities with no relations |
merge_entities | Merge duplicate entities (consolidates observations, redirects relations) |
get_graph_health | Assess graph quality: orphans, duplicates, overloaded entities |
suggest_relations | Suggest potential relations based on semantic similarity |
create_entities_force | Create entities bypassing duplicate check |
clear_graph | Clear all entities/relations (event-sourced, can rewind) |
Time Travel:
| Tool | Description |
|---|---|
get_state_at | View graph state at any point in history |
diff_timerange | Show what changed between two points in time |
get_entity_history | Full changelog for a specific entity |
rewind | Rewind graph to a previous state using git |
restore_state_at | Restore graph to state at timestamp (audit-preserving) |
reload | Reload graph state from disk (after git operations) |
Edge Weights:
| Tool | Description |
|---|---|
get_relation_weight | Get weight breakdown (recency, co-access, explicit) |
set_relation_importance | Set explicit importance weight (0.0-1.0) |
get_strongest_connections | Find entity's most important connections |
get_weak_relations | Find pruning candidates (low-weight relations) |
The recall tool returns context in prose format by default β human-readable text that agents can consume directly without parsing JSON:
Depth levels:
shallow β Quick summary: entity counts, recent activity, gotchasmedium β Semantic search + 1-hop neighbors (~2000 tokens)deep β Multi-hop traversal from focus entities (~5000 tokens)Gotcha extraction: Observations prefixed with Gotcha:, Warning:, Note:, or Important: are automatically extracted into a dedicated section.
mnemograph β Unified CLI for all memory operations:
Running from anywhere (without activating the venv):
Graph Visualization β Interactive D3.js viewer:
--watch mode with Refresh button for real-time updatesNo reviews yet β be the first to share how this listing worked for you.
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/mnemograph)<a href="https://allmcps.com/mcp/mnemograph"><img src="https://allmcps.com/api/badge/mnemograph?style=directory" alt="Mnemograph on AllMCPs" /></a>