add_memoryLABSCO SUMMARY
Memory you host, scoped so it does not leak between users.
The isolation is the reason to run this yourself rather than use a hosted memory service — user, agent and session are separate namespaces, not tags on a shared pool. The provider choices are all configuration, so the same server runs on Redis and OpenAI or on local Ollama models.
What it is
A self-hosted MCP server that puts Mem0's AsyncMemory API behind MCP tools. It stores what an agent should remember, retrieves it by semantic similarity, and keeps memories scoped per user, agent and session rather than pooled.
What you get
- add_memory — store information in long-term memory with semantic indexing
- search_memories — retrieve by semantic similarity, with filters and a result limit
- get_memory — one memory by ID
- update_memory — change stored content
- delete_memory — remove it
- list_memories — list with filtering and pagination
- Multi-tenant isolation across user, agent and session scopes
- Two transports: stdio for a local agent, SSE for remote connections
Requirements
Python with uv, or the included Docker Compose setup. Configuration comes from ~/.config/mem0-mcp-server/settings.json, validated with Pydantic, choosing the vector store, LLM and embedder providers. OPENAI_API_KEY is required for the LLM in the documented default. MCP_TRANSPORT selects stdio or sse and defaults to sse, with MCP_HOST and MCP_PORT for the bind address. Settings resolve in order: tool parameters, then MCP_-prefixed environment variables, then the config file, then defaults. A Helm chart is included for Kubernetes.
Setup effort
Build from source — git clone https://github.com/olk/mem0-mcp-server.git
USE CASES
Remembering a user's preferences between sessions
Store them once, then search for them by meaning at the start of the next conversation.
Keeping one user's memory out of another's
Scope every write and read by user, agent or session.
Correcting something the agent remembered wrong
Find it, update the content, or delete it outright.
6 tools
Listed in project docs. Your client may show a different list.
search_memoriesget_memoryupdate_memorydelete_memorylist_memoriesBEFORE YOU INSTALL
What to know first
Tools you get
6 tools named in the project's documentation.
Requires
- uv on PATH
- OPENAI_API_KEY in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
git clone https://github.com/olk/mem0-mcp-server.git
cd mem0-mcp-server
uv syncCreate ~/.config/mem0-mcp-server/settings.json choosing your vector store, LLM and embedder (the README's example uses Redis and OpenAI)
uv run python -m mcp_server.mainMCP Clients
OpenCode
{
"mcp": {
"mem0": {
"type": "remote",
"enabled": true,
"url": "http://localhost:8050/sse"
}
}
}