semantic-memory-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
semantic-memory-mcp
Persistent memory for Claude Code. Knowledge graph with semantic search — powered by Neo4j.
Quick start
npx semantic-memory-mcp@3.0.4 init
# Restart Claude Code — done!The interactive wizard sets up Neo4j via Docker Compose and lets you choose an embedding provider:
builtin — all-MiniLM-L6-v2, 384-dim, runs on CPU, no extra dependencies
ollama — higher-quality models (nomic-embed-text 768-dim, mxbai-embed-large 1024-dim) via local Ollama
On macOS it installs Ollama natively via Homebrew for Metal GPU acceleration.
Related MCP server: mem0-mcp-selfhosted
Requirements
Node.js >= 18
Docker + Docker Compose
Dual mode: project + global memory
By default all facts go into one Neo4j database. With dual mode you get two layers:
Layer | Location | Contains |
Project |
| Bugs, workarounds, patterns for the current codebase |
Global |
| Tech stack, conventions, preferences — shared across projects |
Enable during init (on by default):
npx semantic-memory-mcp@3.0.4 init
# → "Share knowledge between projects?" → YAuto-routing
Facts are routed to the correct layer at write time based on predicate:
→ Global | → Project (default) |
|
|
Unknown predicates default to project (promote manually).
Search and graph queries always hit both layers — no manual switching.
Manual promote
Project-scoped facts can be promoted to global manually:
npx semantic-memory-mcp promoteShows a numbered list, you pick which facts to promote (all / none / by number).
Where to configure
There are three ways to connect the MCP server to Claude Code:
Global (recommended for personal use)
Added automatically by npx semantic-memory-mcp@3.0.4 init. Config lives in ~/.claude.json:
{
"mcpServers": {
"semantic-memory": {
"type": "stdio",
"command": "npx",
"args": ["-y", "semantic-memory-mcp@3.0.4"],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USER": "neo4j",
"NEO4J_PASSWORD": "memory_pass_2024"
}
}
}
}Per-project — shared with team
Create .mcp.json in the project root. Committed to the repo so the team shares the setup:
{
"mcpServers": {
"semantic-memory": {
"type": "stdio",
"command": "npx",
"args": ["-y", "semantic-memory-mcp@3.0.4"],
"env": {
"CLAUDE_MEMORY_DIR": "./.semantic-memory",
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USER": "neo4j",
"NEO4J_PASSWORD": "memory_pass_2024"
}
}
}
}Add .semantic-memory/ to .gitignore.
Dual mode (auto-configured by init)
A single global entry in ~/.claude.json handles all projects — no per-project config needed:
{
"mcpServers": {
"semantic-memory": {
"type": "stdio",
"command": "npx",
"args": ["-y", "semantic-memory-mcp@3.0.4"],
"env": {
"CLAUDE_MEMORY_DIR": "./.semantic-memory",
"CLAUDE_MEMORY_GLOBAL_DIR": "/home/user/.cache/claude-memory",
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USER": "neo4j",
"NEO4J_PASSWORD": "memory_pass_2024"
}
}
}
}What it does
Claude Code gets 5 tools to remember things across sessions:
memory_store— save a fact as a Subject → Predicate → Object triplememory_search— find facts by meaning (vector similarity)memory_graph— explore connections around an entitymemory_list_entities— list everything storedmemory_delete— delete a fact by ID
> "Remember that billing-service uses PostgreSQL 16"
→ Stored: [billing-service] -[uses]-> [PostgreSQL 16]
> "What do you know about billing?"
→ [0.856] [billing-service] -[uses]-> [PostgreSQL 16]Embedding models
Model | Dim | Size | Best for |
| 384 | 80 MB | Zero-setup, good enough for most use cases |
| 768 | 274 MB | Best balance of quality and speed (recommended with Ollama) |
| 1024 | 670 MB | Highest quality, complex semantic relationships |
| 384 | 45 MB | Smallest Ollama model, fast |
Environment variables
Variable | Default | Description |
|
| Data directory |
|
| Embedding model cache |
|
|
|
|
| Embedding dimension (auto-set by provider) |
|
| Ollama API endpoint |
|
| Ollama embedding model |
|
| Neo4j bolt URI |
|
| Neo4j username |
|
| Neo4j password |
| — | Global memory directory (enables dual mode) |
| — | Extra trigger words for |
| — | Extra trigger words for |
| — | Extra trigger words for |
| — | Extra trigger words for |
Custom trigger words
Each tool has built-in trigger words (in Russian and English) that tell Claude when to use it. You can add your own triggers in any language via environment variables. Custom triggers are appended to the defaults, not replacing them.
Example — adding Chinese and Spanish triggers:
{
"mcpServers": {
"semantic-memory": {
"type": "stdio",
"command": "npx",
"args": ["-y", "semantic-memory-mcp@3.0.4"],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USER": "neo4j",
"NEO4J_PASSWORD": "memory_pass_2024",
"MEMORY_TRIGGERS_STORE": "记住, recuerda, guardar",
"MEMORY_TRIGGERS_SEARCH": "搜索记忆, buscar en memoria"
}
}
}
}You can also configure triggers interactively during npx semantic-memory-mcp@3.0.4 init.
Updating
All commands and configs use a pinned version (semantic-memory-mcp@3.0.4). This README is automatically updated on each release, so copying any command from here always gives you the latest version.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent knowledge graph for AI agents. Remember, recall, and forget facts.
Private memory for AI agents: save and recall facts across Claude Code, Codex, Cursor and ChatGPT.
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Persistent knowledge graph for AI-augmented teams. Store decisions, findings, and standing rules across agent sessions with semantic search and typed connections. Includes cross-session memory, audit trail, workspace isolation, and secret detection. Built for teams running agents that need to remember. Free until launch with team tier as default, anon trial available.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides persistent memory capabilities for Claude Code using Neo4j graph database to track development tasks, code patterns, solutions, and their relationships across sessions and projects, enabling contextual assistance and pattern recognition.11-
- FlicenseNot gradedqualityAmaintenanceEnables Claude Code to persist, semantically search, update, and delete memories across sessions, plus explore knowledge-graph entities and their relationships, backed by self-hosted Qdrant, Neo4j, and Ollama. Session hooks and prompts automate context injection and summarization, with fact extraction handled by either the Claude Code session or a fully local Ollama model.-
- FlicenseNot gradedqualityAmaintenanceEnables Claude Code to store and recall persistent cross-session memory backed by self-hosted Qdrant, Neo4j, and Ollama, using Anthropic or fully local Ollama as the LLM. Exposes tools for adding, searching, listing, updating, and deleting memories plus querying knowledge-graph entities and relationships, with optional session hooks for automatic context injection and saving.-
- FlicenseNot gradedqualityAmaintenanceEnables Claude Code to maintain persistent memory across sessions through semantic search, memory CRUD, entity listing, and knowledge graph queries against self-hosted Qdrant, Neo4j, and Ollama, while supporting Anthropic or fully local LLM providers.-