mem0-mcp-selfhosted
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MEM0_HOST | No | Host for SSE/HTTP transports | 0.0.0.0 |
| MEM0_PORT | No | Port for SSE/HTTP transports | 8081 |
| MEM0_LLM_URL | No | Ollama base URL for the main LLM. Cascades: MEM0_LLM_URL → MEM0_OLLAMA_URL → http://localhost:11434 | |
| MEM0_USER_ID | No | Default user ID for memory scoping | user |
| MEM0_PROVIDER | No | Top-level provider (anthropic or ollama) | anthropic |
| GOOGLE_API_KEY | No | Google API key (required for gemini/gemini_split graph providers) | |
| MEM0_EMBED_URL | No | Ollama URL for embeddings. Cascades: MEM0_EMBED_URL → MEM0_OLLAMA_URL → http://localhost:11434 | |
| MEM0_LLM_MODEL | No | Model for the selected LLM provider. Defaults to claude-opus-4-6 for Anthropic, qwen3:14b for Ollama | |
| MEM0_LOG_LEVEL | No | Logging level (DEBUG, INFO, WARNING, ERROR) | INFO |
| MEM0_NEO4J_URL | No | Neo4j Bolt endpoint | bolt://127.0.0.1:7687 |
| MEM0_TRANSPORT | No | Transport: stdio, sse, or streamable-http | stdio |
| MEM0_COLLECTION | No | Qdrant collection name | mem0_mcp_selfhosted |
| MEM0_EMBED_DIMS | No | Embedding vector dimensions | 1024 |
| MEM0_NEO4J_USER | No | Neo4j username | neo4j |
| MEM0_OLLAMA_URL | No | Shared Ollama base URL | http://localhost:11434 |
| MEM0_QDRANT_URL | No | Qdrant REST API URL | http://localhost:6333 |
| MEM0_EMBED_MODEL | No | Embedding model name | bge-m3 |
| MEM0_OAT_HEADERS | No | OAT identity headers: auto or none | auto |
| ANTHROPIC_API_KEY | No | Standard Anthropic API key (priority 3) | |
| MEM0_ENABLE_GRAPH | No | Enable graph memory (entity extraction to Neo4j) | false |
| MEM0_LLM_PROVIDER | No | Main LLM provider (anthropic or ollama). Inherits from MEM0_PROVIDER when not set. | |
| MEM0_OLLAMA_THINK | No | Set to true to re-enable qwen3 thinking mode | false |
| MEM0_GRAPH_LLM_URL | No | Ollama base URL for graph LLM. Cascades: MEM0_GRAPH_LLM_URL → MEM0_LLM_URL → MEM0_OLLAMA_URL → http://localhost:11434 | |
| MEM0_EMBED_PROVIDER | No | Embedding provider (ollama or openai) | ollama |
| MEM0_LLM_MAX_TOKENS | No | Max tokens for LLM responses (Anthropic only) | 16384 |
| MEM0_NEO4J_DATABASE | No | Neo4j database name (multi-database setups) | |
| MEM0_NEO4J_PASSWORD | No | Neo4j password | mem0graph |
| MEM0_QDRANT_API_KEY | No | Qdrant API key (for Qdrant Cloud) | |
| MEM0_QDRANT_ON_DISK | No | Store vectors on disk (reduces RAM, slower search) | false |
| MEM0_QDRANT_TIMEOUT | No | Qdrant REST API timeout in seconds | |
| MEM0_ANTHROPIC_TOKEN | No | Anthropic OAT or API token (priority 1) | |
| MEM0_GRAPH_LLM_MODEL | No | Graph model. Inherits MEM0_LLM_MODEL for anthropic/ollama; defaults to gemini-2.5-flash-lite for gemini/gemini_split | |
| MEM0_GRAPH_THRESHOLD | No | Embedding similarity threshold for node matching | 0.7 |
| MEM0_HISTORY_DB_PATH | No | SQLite path for memory change history | |
| MEM0_NEO4J_BASE_LABEL | No | Custom Neo4j base label for node type grouping | |
| MEM0_OLLAMA_KEEP_ALIVE | No | How long Ollama keeps the model in VRAM between calls | 30m |
| MEM0_GRAPH_LLM_PROVIDER | No | Graph LLM provider (anthropic, anthropic_oat, ollama, gemini, gemini_split). Inherits from MEM0_PROVIDER when not set. | |
| MEM0_GRAPH_CONTRADICTION_LLM_MODEL | No | Contradiction model in gemini_split mode. Defaults to claude-opus-4-6 for anthropic/anthropic_oat providers; inherits MEM0_LLM_MODEL for others. | |
| MEM0_OAT_REFRESH_THRESHOLD_SECONDS | No | Seconds before expiry to trigger proactive OAT token refresh | 1800 |
| MEM0_GRAPH_CONTRADICTION_LLM_PROVIDER | No | Contradiction LLM provider in gemini_split mode (anthropic, anthropic_oat, ollama) | anthropic |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| add_memoryA | Store a new memory. Requires at least one of user_id, agent_id, or run_id. |
| add_documentA | Ingest a PDF or image asynchronously: extract text per page (digital PDF via poppler; scanned pages and images via a local vision model), chunk, and extract memorable facts with document/page provenance. |
| search_memoriesB | Semantic search across existing memories. |
| get_memoriesA | Page through memories using filters instead of search. |
| get_memoryB | Fetch a single memory by its ID. |
| memory_historyA | Full change timeline of a memory: ADD, UPDATE (old vs new text), SUPERSEDED (which fact replaced it) and DELETE events, oldest first. |
| memory_task_statusA | Status of an asynchronous add_memory task. |
| memory_queue_statusA | Health of the async ingest queue: depth (jobs waiting or running), per-status counts, age of the oldest pending job, estimated drain time, and whether the background worker is alive. |
| update_memoryA | Update an existing memory's text. |
| delete_memoryB | Delete a single memory. |
| delete_all_memoriesA | Bulk-delete all memories in the given scope. Requires at least one filter. |
| list_entitiesB | List which users/agents/runs currently hold memories. Uses Qdrant Facet API (v1.12+) for server-side aggregation, with scroll+dedupe fallback for older versions. |
| delete_entitiesA | Delete an entity and cascade-delete all its memories. |
| mcp_search_graphA | Search entities by name/id substring matching in Neo4j knowledge graph. |
| mcp_get_entityA | Get all relationships for a specific entity (bidirectional). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| memory_assistant | Quick-start guide for using the mem0 memory server. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/fabiolenine/mcp_deepmen0'
If you have feedback or need assistance with the MCP directory API, please join our Discord server