mem0-local-mcp
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., "@mem0-local-mcp what do you remember about my coding preferences?"
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.
mem0-local-mcp
Long-term, semantic memory for Claude Code (or any MCP client), powered by mem0, and running entirely on your machine.
No API key. No OpenAI, no mem0 cloud account.
No local LLM needed. Your agent (e.g. Claude) decides what's worth remembering. mem0 handles storage, embeddings, and semantic search.
Light. Embeddings run through FastEmbed (ONNX, no PyTorch). The default model is ~67 MB and is downloaded once.
Private. Memories are stored in a local Chroma DB. mem0 telemetry is disabled.
How it works
Claude Code ──MCP (stdio)──▶ mem0-local-mcp ──▶ mem0 ──▶ FastEmbed (local embeddings)
└─▶ Chroma (~/.mem0-local-mcp)The server exposes three tools:
Tool | What it does |
| Stores one fact verbatim and returns its id |
| Runs a semantic search and returns |
| Removes a stale or wrong memory |
Related MCP server: mcp-memory
Requirements
Python 3.10+ (uv can install it for you)
Install in Claude Code
claude mcp add mem0 -s user -- \
uvx --from git+https://github.com/ShmuelOps/mem0-local-mcp mem0-local-mcp-s user makes the memory available in every project. Use -s project to share the config through
.mcp.json, or -s local for the current project only.
Verify:
claude mcp list # mem0: ... ✔ ConnectedThe first start downloads the dependencies and the embedding model, so it can take a minute. Later starts take a few seconds.
Tell Claude when to use it
Add this to ~/.claude/CLAUDE.md (global) or to a project's CLAUDE.md:
## Long-term memory (mem0 MCP)
- At the start of a non-trivial task, call `search_memory` with the task topic.
- When you learn a durable fact (user preference, project decision, gotcha), `search_memory`
first, then `add_memory` one concise sentence if it's new.
- `delete_memory` entries that turn out wrong or stale.Other MCP clients
Any client that speaks MCP over stdio works. For example, Claude Desktop's
claude_desktop_config.json:
{
"mcpServers": {
"mem0": {
"command": "uvx",
"args": ["--from", "git+https://github.com/ShmuelOps/mem0-local-mcp", "mem0-local-mcp"]
}
}
}Configuration
All configuration is optional and set through environment variables. With claude mcp add, pass
them as -e KEY=value.
Variable | Default | Purpose |
|
| Memory namespace. Use different values to keep separate memory sets |
|
| Where the Chroma DB and history are stored |
|
|
Example with a per-project namespace:
claude mcp add mem0 -s project -e MEM0_USER=my-project -- \
uvx --from git+https://github.com/ShmuelOps/mem0-local-mcp mem0-local-mcpChanging
MEM0_EMBED_MODELafter you've stored memories requires a freshMEM0_DATA_DIR, because vectors from different models are not compatible.
Data & privacy
Everything is stored in
MEM0_DATA_DIR. Delete that directory to wipe all memories.The only network access is the one-time download of packages and the embedding model.
mem0 telemetry is turned off (
MEM0_TELEMETRY=False).
Troubleshooting
Symptom | Fix |
| The first launch is still downloading. Run the |
Duplicate memories | This happens because |
Want to wipe everything |
|
Development
git clone https://github.com/ShmuelOps/mem0-local-mcp && cd mem0-local-mcp
uv sync
uv run pytest # real end-to-end tests: mem0 + Chroma + FastEmbed, no mocks
uv run ruff check . && uv run ruff format --check .Run the server from source:
claude mcp add mem0-dev -- uv run --directory "$PWD" mem0-local-mcpSee CONTRIBUTING.md.
License
Available Tools
3 toolsadd_memoryA
Store one concise, durable fact worth remembering across sessions.
Search first to avoid duplicates. Returns the new memory id.
Inputs: text (required). Returns: result
delete_memoryB
Delete a stale or wrong memory by id.
Inputs: memory_id (required). Returns: result
search_memoryB
Semantic search over long-term memory. Returns one 'id: memory' per line.
Inputs: query (required), limit. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools map to clearly distinct operations: add_memory (create), search_memory (read/query), and delete_memory (remove). Descriptions reinforce the boundaries, e.g. add_memory explicitly tells the agent to search first, eliminating overlap.
All three tools follow the identical verb_noun pattern (add_memory, search_memory, delete_memory) with the same noun for the resource. This is a textbook consistent naming scheme.
Three tools is a tight, well-scoped surface for a simple local long-term memory store. Each tool earns its place with no redundancy or filler.
Create, query, and delete cover the core memory lifecycle, and semantic search serves as retrieval. An explicit update/edit tool and a get-by-id or list operation are missing, though delete+add can work around the gap.
Maintenance
Related MCP Connectors
Private persistent memory for Claude, ChatGPT & Gemini via MCP - semantic search, zero-code setup.
Hosted memory for AI agents over MCP. One memory shared by all your agents.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Persistent personal memory for AI assistants — save, search, and recall across every MCP client.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceProvides persistent memory for AI coding agents via MCP, enabling agents to store and semantically recall facts, events, and lessons across sessions, all running locally without cloud dependencies.Apache 2.0
- AlicenseAqualityDmaintenanceProvides persistent memory with semantic search for MCP-based AI agents, enabling them to store and recall information across sessions using vector embeddings.41MIT
- AlicenseNot gradedqualityDmaintenanceProvides persistent semantic memory for AI agents via MCP, enabling them to remember, recall, list, update, and forget memories with vector-based similarity search.ISC
- AlicenseAqualityDmaintenanceProvides persistent, searchable memory for AI agents across any MCP-compatible client, storing project context, user preferences, and session learnings locally in SQLite with tools to save, retrieve, search, and manage them.12MIT