AgenticMemory MCP Server
Universal LLM access to persistent graph memory via the Model Context Protocol.
AgenticMemory MCP Server bridges any MCP-compatible LLM client (Claude, GPT, Gemini, Ollama, etc.) to the AgenticMemory persistent binary graph memory system. One server, universal access.
Architecture
┌─────────────────────────────────────────────────────────┐
│ LLM CLIENT │
│ (Claude, GPT, Gemini, Ollama, etc.) │
└─────────────────────┬───────────────────────────────────┘
│ MCP Protocol (JSON-RPC 2.0)
│ (stdio / SSE)
┌─────────────────────▼───────────────────────────────────┐
│ AGENTIC-MEMORY-MCP │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ TOOLS │ │RESOURCES │ │ PROMPTS │ │
│ │ 12 tools │ │ 6 URIs │ │ 4 tmpls │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ └──────────────┼─────────────┘ │
│ SESSION MANAGER │
│ AGENTIC-MEMORY CORE │
└─────────────────────────────────────────────────────────┘
│
▼
brain.amem (binary graph file)
Quick Start
Install from crates.io
Or build from source
Run (stdio transport — default)
Zero-config: defaults to
~/.brain.amem. Override withagentic-memory-mcp --memory /path/to/brain.amem serve.
Memory Modes
Control how aggressively Claude saves memories:
| Mode | Saves Per Conversation | File Growth | Best For |
|---|---|---|---|
| minimal | 1-3 | ~1 KB/day | Privacy-conscious users |
| smart | 5-15 | ~5-20 KB/day | Most users (default) |
| full | 15-30+ | ~20-50 KB/day | Power users, autonomous agents |
Configure via the args array in your MCP config:
Run (SSE transport)
Configuration with MCP Clients
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Claude Code
Add to ~/.claude/mcp.json:
VS Code / Cursor
Add to .vscode/settings.json:
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
Zero-config: defaults to
~/.brain.amem. Override with"args": ["--memory", "/path/to/brain.amem", "serve"].
Tools (12)
| Tool | Purpose |
|---|---|
memory_add |
Add cognitive event to graph |
memory_query |
Pattern query for matching nodes |
memory_traverse |
Walk graph following edges |
memory_correct |
Record correction to past belief |
memory_resolve |
Follow supersedes chain |
memory_context |
Get subgraph around node |
memory_similar |
Similarity search |
memory_causal |
Impact analysis |
memory_temporal |
Compare across time |
memory_stats |
Graph statistics |
session_start |
Begin new session |
session_end |
End session, create episode |
Resources (6)
| URI Pattern | Returns |
|---|---|
amem://node/{id} |
Single node with edges |
amem://session/{id} |
All nodes from session |
amem://types/{type} |
All nodes of type |
amem://graph/stats |
Graph statistics |
amem://graph/recent |
Recent nodes |
amem://graph/important |
High decay score nodes |
Prompts (4)
| Prompt | Purpose | Required Args |
|---|---|---|
remember |
Guide for storing new info | information |
reflect |
Guide for understanding past decisions | topic |
correct |
Guide for updating beliefs | old_belief, new_information |
summarize |
Guide for session summary | (none) |
Event Types
- Fact — Declarative knowledge
- Decision — Choices made with reasoning
- Inference — Derived conclusions
- Correction — Updates to prior beliefs
- Skill — Procedural knowledge
- Episode — Session summaries
Edge Types
- CausedBy — Causal relationship
- Supports — Supporting evidence
- Contradicts — Conflicting information
- Supersedes — Correction chain
- RelatedTo — General association
- PartOf — Hierarchical containment
- TemporalNext — Temporal ordering
CLI Commands
# Start server (stdio) — defaults to ~/.brain.amem
# Start server with custom memory file
# Start server (SSE, requires --features sse)
# Validate a memory file
# Print server info as JSON
Development
This crate is part of the AgenticMemory Cargo workspace.
# Run MCP server tests (from workspace root)
# Run bridge integration tests
# Run all workspace tests
# Clippy + format
# Build release
Protocol
This server implements MCP (Model Context Protocol) spec version 2024-11-05 over JSON-RPC 2.0. Supported transports:
- stdio — Newline-delimited JSON over stdin/stdout (default)
- SSE — Server-Sent Events over HTTP (feature flag
sse)
License
MIT