Skip to main content
Glama
fabiolenine

mem0-mcp-selfhosted

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MEM0_HOSTNoHost for SSE/HTTP transports0.0.0.0
MEM0_PORTNoPort for SSE/HTTP transports8081
MEM0_LLM_URLNoOllama base URL for the main LLM. Cascades: MEM0_LLM_URL → MEM0_OLLAMA_URL → http://localhost:11434
MEM0_USER_IDNoDefault user ID for memory scopinguser
MEM0_PROVIDERNoTop-level provider (anthropic or ollama)anthropic
GOOGLE_API_KEYNoGoogle API key (required for gemini/gemini_split graph providers)
MEM0_EMBED_URLNoOllama URL for embeddings. Cascades: MEM0_EMBED_URL → MEM0_OLLAMA_URL → http://localhost:11434
MEM0_LLM_MODELNoModel for the selected LLM provider. Defaults to claude-opus-4-6 for Anthropic, qwen3:14b for Ollama
MEM0_LOG_LEVELNoLogging level (DEBUG, INFO, WARNING, ERROR)INFO
MEM0_NEO4J_URLNoNeo4j Bolt endpointbolt://127.0.0.1:7687
MEM0_TRANSPORTNoTransport: stdio, sse, or streamable-httpstdio
MEM0_COLLECTIONNoQdrant collection namemem0_mcp_selfhosted
MEM0_EMBED_DIMSNoEmbedding vector dimensions1024
MEM0_NEO4J_USERNoNeo4j usernameneo4j
MEM0_OLLAMA_URLNoShared Ollama base URLhttp://localhost:11434
MEM0_QDRANT_URLNoQdrant REST API URLhttp://localhost:6333
MEM0_EMBED_MODELNoEmbedding model namebge-m3
MEM0_OAT_HEADERSNoOAT identity headers: auto or noneauto
ANTHROPIC_API_KEYNoStandard Anthropic API key (priority 3)
MEM0_ENABLE_GRAPHNoEnable graph memory (entity extraction to Neo4j)false
MEM0_LLM_PROVIDERNoMain LLM provider (anthropic or ollama). Inherits from MEM0_PROVIDER when not set.
MEM0_OLLAMA_THINKNoSet to true to re-enable qwen3 thinking modefalse
MEM0_GRAPH_LLM_URLNoOllama base URL for graph LLM. Cascades: MEM0_GRAPH_LLM_URL → MEM0_LLM_URL → MEM0_OLLAMA_URL → http://localhost:11434
MEM0_EMBED_PROVIDERNoEmbedding provider (ollama or openai)ollama
MEM0_LLM_MAX_TOKENSNoMax tokens for LLM responses (Anthropic only)16384
MEM0_NEO4J_DATABASENoNeo4j database name (multi-database setups)
MEM0_NEO4J_PASSWORDNoNeo4j passwordmem0graph
MEM0_QDRANT_API_KEYNoQdrant API key (for Qdrant Cloud)
MEM0_QDRANT_ON_DISKNoStore vectors on disk (reduces RAM, slower search)false
MEM0_QDRANT_TIMEOUTNoQdrant REST API timeout in seconds
MEM0_ANTHROPIC_TOKENNoAnthropic OAT or API token (priority 1)
MEM0_GRAPH_LLM_MODELNoGraph model. Inherits MEM0_LLM_MODEL for anthropic/ollama; defaults to gemini-2.5-flash-lite for gemini/gemini_split
MEM0_GRAPH_THRESHOLDNoEmbedding similarity threshold for node matching0.7
MEM0_HISTORY_DB_PATHNoSQLite path for memory change history
MEM0_NEO4J_BASE_LABELNoCustom Neo4j base label for node type grouping
MEM0_OLLAMA_KEEP_ALIVENoHow long Ollama keeps the model in VRAM between calls30m
MEM0_GRAPH_LLM_PROVIDERNoGraph LLM provider (anthropic, anthropic_oat, ollama, gemini, gemini_split). Inherits from MEM0_PROVIDER when not set.
MEM0_GRAPH_CONTRADICTION_LLM_MODELNoContradiction 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_SECONDSNoSeconds before expiry to trigger proactive OAT token refresh1800
MEM0_GRAPH_CONTRADICTION_LLM_PROVIDERNoContradiction LLM provider in gemini_split mode (anthropic, anthropic_oat, ollama)anthropic

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
add_memoryA

Store a new memory. Requires at least one of user_id, agent_id, or run_id.

    Response contract (never a bare list):
    - {"status": "queued", "task_id", "submitted_at", "queue_depth", "estimated_wait_s"}
      — infer=true path; extraction runs in background, poll memory_task_status.
    - {"status": "stored", "memory_ids": [...], "results": [...]}
      — synchronous path; empty memory_ids carries "reason": "no_new_facts".
    - {"error": ...} — failure.
    
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.

    Returns immediately with {"status": "queued", task_id, pages,
    chunks_estimate, estimated_wait_s} — a large document takes many
    minutes; poll memory_task_status(task_id) for chunks_done progress and
    the final memory_ids. Re-submitting the same file returns
    {"status": "already_ingested"} unless force=true. There is NO
    synchronous fallback: if the queue is unavailable the call errors.
    
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.

    States: pending | processing | done | failed_retryable | dead.
    When done, ``result.memory_ids`` lists the memories created/updated
    (fetch them with get_memory) and ``result.events`` includes any
    SUPERSEDED markings. ``last_error`` explains failed/dead tasks.
    
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

Overwrite an existing memory's text. Re-embeds and re-indexes.

delete_memoryB

Delete a single memory.

delete_all_memoriesA

Bulk-delete all memories in the given scope. Requires at least one filter.

    NEVER calls memory.delete_all() — uses safe bulk-delete instead.
    
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.

    Functionally equivalent to delete_all_memories in self-hosted mode.
    
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

NameDescription
memory_assistantQuick-start guide for using the mem0 memory server.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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