agent-memory-mcp
Provides persistent local storage for episodic memories and knowledge graph triplets in a SQLite database, enabling cross-session memory recall through memory search and graph traversal tools.
Click on "Deploy 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., "@agent-memory-mcpremember I prefer Postgres and search past notes on the auth project"
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.
Persistent SQLite Knowledge Graph & Episodic Memory Engine for Autonomous AI Agents & LLMs.
💡 Why This Exists & Token Efficiency
LLMs suffer from context window amnesia across chat sessions, re-asking user preferences and losing project history. agent-memory-mcp introduces a claude-mem style 3-layer workflow with local SQLite persistent storage for infinite cross-session memory recall.
⚡ 3-Layer Memory Workflow
Layer 1: Episodic Storage (
store_memory) — Persists key-value facts, user preferences, and observations with categories and ISO timestamps.Layer 2: Semantic Graph Linkage (
link_knowledge_entities) — Establishes semantic graph edges (subject->predicate->object) to build interconnected entity networks.Layer 3: Infinite Recall (
search_memories&query_knowledge_graph) — Queries stored memories with fuzzy keyword matching and traverses knowledge graph triplets across sessions.
📊 Token Savings & Memory Recall Comparison
Approach | Memory Persistence | Token Waste | Cross-Session Recall | Efficiency |
Naive Prompt Repetition | None (Lost on reset) | Heavy (~30,000 tokens) | No | 0% |
Flat File Text Logs | Manual file reads | High (~12,000 tokens) | Limited | ~50% |
| Permanent Local SQLite | Minimal (~1,200 tokens) | Infinite 🚀 | ~90% Token Savings |
Related MCP server: MCP Memory SQLite
🏗️ Architecture Diagram
flowchart TD
A[AI Coding Agent / LLM] -->|1. Store Fact / Observation| B[store_memory]
A -->|2. Create Entity Relationship| C[link_knowledge_entities]
A -->|3. Search Memories| D[search_memories]
A -->|4. Traverse Knowledge Graph| E[query_knowledge_graph]
subgraph MCP Server Engine: agent-memory-mcp
B --> F[(Local SQLite Database)]
C --> F
D --> F
E --> F
end
F -->|Targeted Graph Triplets & Facts| A🛠️ Tools Included
store_memory: Persists key-value facts and state observations into SQLite with categories and automatic ISO timestamps.search_memories: Queries stored episodic memories using fuzzy keyword matching and category filters.link_knowledge_entities: Creates semantic graph edges (subject->predicate->object) in SQLite to establish structured knowledge networks.query_knowledge_graph: Traverses knowledge graph triplets to retrieve all connected concepts, entities, and context around a given target.
🚀 Quick Start (1-Click & 1-Command Setup)
1. Claude Code CLI
claude mcp add agent-memory-mcp -- python -m agent_memory_mcp2. Cursor (.cursor/mcp.json)
{
"mcpServers": {
"agent-memory-mcp": {
"command": "python",
"args": ["-m", "agent_memory_mcp"]
}
}
}3. OpenAI Codex CLI (~/.codex/config.toml)
[mcp_servers.agent-memory-mcp]
command = "python"
args = ["-m", "agent_memory_mcp"]4. Google Antigravity IDE (mcp_config.json)
{
"mcpServers": {
"agent-memory-mcp": {
"command": "python",
"args": ["-m", "agent_memory_mcp"]
}
}
}5. Windsurf / Cline
{
"mcpServers": {
"agent-memory-mcp": {
"command": "python",
"args": ["-m", "agent_memory_mcp"]
}
}
}This server cannot be deployed
Maintenance
Related MCP Connectors
- GoMindOAuthcom.gominddb
Persistent knowledge graph for AI agents. Remember, recall, and forget facts.
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Shared long-term memory for AI agents: save and recall context as a searchable knowledge graph.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI agents with persistent, searchable memory using a knowledge graph stored in SQLite. Features semantic search, temporal awareness, and workflow-aware prompts for development projects.5 npmMIT
- AlicenseCqualityDmaintenanceProvides persistent memory and knowledge graph capabilities for AI assistants using local SQLite storage. Enables creating, searching, and managing entities, relationships, and observations with vector search support across conversations.77 npm15MIT
- AlicenseNot gradedqualityDmaintenanceProvides AI coding assistants with persistent project memory to retain architectural decisions, code patterns, and domain knowledge across sessions. It stores data locally in a SQLite database, allowing agents to remember, recall, and manage project-specific context using full-text search.4 npmApache 2.0
- AlicenseNot gradedqualityCmaintenanceProvides AI assistants with persistent memory across sessions using local SQLite and keyword search, allowing storage and retrieval of user preferences, project context, and decisions.15 npm9MIT