Mem0CAUTION
Self-hosted mem0 MCP server for Claude Code. Run a complete memory server against self-hosted Qdrant + Neo4j + Ollama while using Claude as the main LLM.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Self-hosted mem0 MCP server for Claude Code. Run a complete memory server against self-hosted Qdrant + Neo4j + Ollama, with your choice of Anthropic (Claude) or Ollama as the main LLM.
Uses the mem0ai package directly as a library, supports both Claude's OAT token and fully local Ollama setups, and exposes 11 MCP tools for full memory management.
Prerequisites
Python >= 3.10 and uv.
Authentication: The default setup uses Claude (Anthropic) as the LLM for fact extraction. No API key needed, the server automatically uses your Claude Code session token. For fully local setups, set MEM0_PROVIDER=ollama. See Authentication for advanced options.Quick Start
Default (Anthropic)
Add the MCP server globally (available across all projects):
claude mcp add --scope user --transport stdio mem0 \ --env MEM0_USER_ID=your-user-id \ -- uvx --from git+https://github.com/elvismdev/mem0-mcp-selfhosted.git mem0-mcp-selfhosted
All defaults work out of the box: Qdrant on localhost:6333, Ollama embeddings on localhost:11434 with bge-m3 (1024 dims). Override any default via --env (see Configuration).
uvx automatically downloads, installs, and runs the server in an isolated environment, no manual installation nee
d67a3438492aOBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add mem0-mcp-selfhosted --env ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} --env GOOGLE_API_KEY=${GOOGLE_API_KEY} --env MEM0_ANTHROPIC_TOKEN=${MEM0_ANTHROPIC_TOKEN} -- uvx mem0-mcp-selfhosted{
"mcpServers": {
"mem0-mcp-selfhosted": {
"command": "uvx",
"args": [
"mem0-mcp-selfhosted"
],
"env": {
"ANTHROPIC_API_KEY": "${ANTHROPIC_API_KEY}",
"GOOGLE_API_KEY": "${GOOGLE_API_KEY}",
"MEM0_ANTHROPIC_TOKEN": "${MEM0_ANTHROPIC_TOKEN}"
}
}
}
}Exposed tools (5)
4 read · 0 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
delete_memory | destructive | Delete a single memory. |
get_memory | read | Fetch a single memory by its ID. |
list_entities | read | List which users/agents/runs currently hold memories. |
mcp_get_entity | read | Get all relationships for a specific entity (bidirectional). |
mcp_search_graph | read | Search entities by name/id substring matching in Neo4j knowledge graph. |
Trust audit
CAUTIONgrade C · trust 79/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- declared (2 observation(s))
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- found
Findings (11)
OAT_TOKEN = "sk-ant-oat01-test-token-old"
OAT_TOKEN_NEW = "sk-ant-oat01-test-token-new"
REFRESH_TOKEN_NEW = "sk-ant-ort01-test-refresh-new"
API_KEY = "sk-ant-api03-test-key"
delete_memory
.coderabbit.yaml
env = {"MEM0_LLM_PROVIDER": "ollama", "MEM0_OLLAMA_URL": "http://192.168.0.208:11434"}assert config_dict["llm"]["config"]["ollama_base_url"] == "http://192.168.0.208:11434"
"MEM0_OLLAMA_URL": "http://192.168.0.208:11434",
"MEM0_LLM_URL": "http://10.0.0.5:11434",
assert config_dict["llm"]["config"]["ollama_base_url"] == "http://10.0.0.5:11434"
Gates applied: no_behavioural_pass.
d67a3438492afull audit observations/trust-audit/mcp-server/elvismdev__mem0-12.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | d67a3438492a | CAUTION | C | 79 | first audit |
Questions
What is the Mem0 MCP server?
Self-hosted mem0 MCP server for Claude Code. Run a complete memory server against self-hosted Qdrant + Neo4j + Ollama while using Claude as the main LLM.
What tools does Mem0 expose?
5 in total: 4 read-only, 0 that write, and 1 that can delete or overwrite (delete_memory). Every one is listed on this page with its risk.
Is Mem0 safe to connect to an agent?
With care. The audit graded it C (79/100) and found 11 things worth knowing before you trust this server, listed below with the exact line each was found on. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Mem0 need?
It reads ANTHROPIC_API_KEY, GOOGLE_API_KEY and MEM0_ANTHROPIC_TOKEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Mem0 run?
It speaks sse, stdio and streamable-http, so it runs as a local process your client starts. It is published on PyPI as mem0-mcp-selfhosted.
How current is this page?
The grade is for one exact copy of the source (d67a3438492a), read on 2026-10-07. The repository is watched and re-audited when it changes.