Memory MCP server
Commit Nov 11, 2026Stores and retrieves persistent knowledge graph memories and archived LLM context using vector search and Cypher graph traversal.
Also known as JamesANZ/memory-mcp
- Stars
- 23
- Tools
- 7
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 11, 2026
- License
- MIT
What is Memory MCP?
Memory stores and retrieves persistent knowledge graph memories and archived LLM context using vector search and Cypher graph traversal. It exposes 7 tools, such as store-graph-memory, query-memory, remove-graph-entities.
Summary generated from the project's README
About Memory MCP server
Providing persistent knowledge graphs and context window caching for AI coding environments is what memory-mcp enables. It allows developers using Claude Desktop or Cursor to maintain long-term memory through a hybrid retrieval system that combines semantic vector search with multi-hop Cypher graph traversal. By storing entities and relationships in a local KuzuDB instance, the server ensures that AI models can access high-signal facts without requiring external database management or complex setup.
Users interact with the server through specific tools like store-graph-memory to save structured entities and relations, or query-memory to perform complex searches across connected subgraphs. The system also manages conversation history through context window caching, using tools such as archive-context and create-summary to organize information. Because it uses local HuggingFace embeddings, all data processing and vector calculations happen on your machine within the ~/.memory-mcp/ directory, making it a private and self-contained solution for maintaining LLM context.
What you can do with it
- 1Perform complex relationship queriesRetrieve connected information by traversing multiple hops between related entities in your knowledge graph.
- 2Manage large conversation historiesArchive previous chat contexts and retrieve them later using semantic relevance scoring or specific tags.
- 3Summarize long-term interactionsGenerate and retrieve condensed summaries of past conversations to keep the context window efficient.
Written from the project's README. Every use case is checked against a quote from it.
Memory MCP tools 7
Detected from the READMEstore-graph-memoryquery-memoryremove-graph-entitiessave-memoriesget-memoriesadd-memoriesclear-memories
Configuration
MEMORY_DB_PATHMEMORY_MODEL_CACHE_DIR
Automated checks
Ran Nov 13, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablePass
- Open source license (OSI)Pass
- Commit or release in the last yearPass
- Package name not close to a popular packageNot checked
- Remote endpoint uses HTTPSNot checked
- Destructive tools are labelledNot checked
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesNot checked
README
View on GitHubMemory MCP Server (Embedded GraphRAG + Vector Memory)
Persistent knowledge graph memory and context window caching for LLM conversations. Built on an embedded KuzuDB Cypher graph database with local HuggingFace vector embeddings (
Xenova/all-MiniLM-L6-v2) — zero external database setup required.
An MCP (Model Context Protocol) server that provides hybrid semantic vector + multi-hop Cypher graph memory retrieval and context window caching for AI coding environments like Cursor and Claude Desktop.
Why Use Memory MCP?
- Embedded Knowledge Graph (KuzuDB) – Stores entities, observations, and typed relationships in a local, in-process Cypher graph database (
~/.memory-mcp/graph_db) with zero external setup. - Hybrid Vector + Graph Retrieval – Uses local 384-d embeddings (
Xenova/all-MiniLM-L6-v2) and Kuzuarray_cosine_similarityto find entry nodes, then traverses 1–3 relationship hops via Cypher so the LLM only receives compact, high-signal facts. - Context Window Caching – Intelligent archiving, semantic relevance scoring, and graph-linked summaries (
Summarizes/Mentionsedges). - Zero-Config Install – No MongoDB or Neo4j server required.
Quick Start
Install in Cursor (Recommended):
Or install manually:
npm install -g @jamesanz/memory-mcp
# Or from source:
git clone https://github.com/JamesANZ/memory-mcp.git
cd memory-mcp && npm install && npm run build
Features
Knowledge Graph & Hybrid Retrieval Tools
store-graph-memory– Upsert structured entities (name,entityType,observations[]) and directedrelations(from,to,relationType) with automatic 384-d embeddings.query-memory– Hybrid semantic vector + multi-hop Cypher traversal query that returns only the relevant connected subgraph and memory chunks.remove-graph-entities– Remove outdated entities or specific relationships so contradictory facts do not linger.
Basic Memory Tools
save-memories– Save memories to the graph database (overwrites existing)get-memories– Retrieve all stored memory logsadd-memories– Append new memories and auto-extract entity mentionsclear-memories– Remove all stored memories and graph entities
Context Window Caching
archive-context– Archive conversation context with tags and vector embeddingsretrieve-context– Retrieve relevant archived contextscore-relevance– Score archived content relevance using vector cosine similaritycreate-summary– Create summaries of archived content linked viaSummarizesedgesget-conversation-summaries– Get all summaries for a conversationsearch-context-by-tags– Search archived content by tags
Configuration
By default, the graph database and local embedding model cache are stored in ~/.memory-mcp/. You can customize these paths via environment variables:
export MEMORY_DB_PATH="/custom/path/to/graph_db"
export MEMORY_MODEL_CACHE_DIR="/custom/path/to/models"
Claude Desktop
Add to claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"memory-mcp": {
"command": "node",
"args": ["/absolute/path/to/memory-mcp/build/index.js"]
}
}
}
Usage Examples
Store Structured Graph Memory
{
"tool": "store-graph-memory",
"arguments": {
"entities": [
{
"name": "memory-mcp",
"entityType": "Project",
"observations": ["Uses embedded KuzuDB graph database", "Written in TypeScript with ESM"]
},
{
"name": "KuzuDB",
"entityType": "Tech",
"observations": ["In-process property graph database supporting Cypher and vector similarity"]
}
],
"relations": [
{
"from": "memory-mcp",
"to": "KuzuDB",
"relationType": "USES_DATABASE"
}
],
"llm": "claude"
}
}
Query Subgraph Memory
{
"tool": "query-memory",
"arguments": {
"query": "What database architecture does memory-mcp use?",
"maxHops": 2,
"limit": 5
}
}
Technical Details
Built with: Node.js, TypeScript, MCP SDK, KuzuDB (kuzu), HuggingFace Transformers (@huggingface/transformers), zod
Storage: Embedded KuzuDB (~/.memory-mcp/graph_db)
License
MIT
Memory MCP questions
What tools does Memory MCP provide?
It exposes 7 tools, including store-graph-memory, query-memory, remove-graph-entities, save-memories, get-memories.
What database does memory-mcp use for storage?
It uses an embedded KuzuDB Cypher graph database stored locally, so no external database server is needed.
How does memory-mcp find relevant memories?
It combines local vector embeddings with multi-hop Cypher graph traversal to return only the relevant connected subgraph.
Do I need MongoDB or Neo4j to run this server?
No. It is a zero-config install with no external database server required.
Can memory-mcp archive and summarize conversation context?
Yes, it archives context with tags and embeddings, scores relevance, and creates graph-linked summaries.