mcp-mem0
mcp-mem0
Un servidor MCP para mem0 (autohospedado / código abierto) respaldado por Qdrant. Cada solicitud apunta a una colección de Qdrant nombrada por un encabezado HTTP, de modo que los clientes que envían el mismo nombre comparten memorias y los nombres diferentes permanecen aislados.
Herramientas
Herramienta | Propósito |
| Almacenar memorias (extracción de hechos con LLM, o en bruto con |
| Búsqueda semántica dentro de la colección de la solicitud |
| Reemplazar el contenido de una memoria por id |
| Eliminar una memoria por id |
| Obtener una memoria por id |
| Listar memorias para un ámbito |
| Historial de cambios de una memoria |
| Eliminar todas las memorias para un ámbito |
Related MCP server: mem0-open-mcp
Cómo funciona el enrutamiento de colecciones
El nombre de la colección se lee de un encabezado HTTP (
X-Collectionpor defecto) y se asigna a la colección de Qdrantmem0_<name>(prefijo configurable; establézcalo vacío para usar el valor tal cual). El valor del encabezado se valida contra^[A-Za-z0-9_-]{1,64}$.Compartir: cualquier cliente que envíe el mismo nombre de colección comparte las mismas memorias. Los nombres diferentes están aislados.
Se crea y se almacena en caché una instancia de
AsyncMemorypor colección.La colección se elige únicamente por el encabezado —
user_id/agent_id/run_idnunca afectan a qué colección se usa; solo acotan dentro de una colección y son opcionales. Buscar / listar sin ninguno de ellos abarca toda la colección.add_memoryaún necesita un id para almacenar (requisito de mem0); se aplica unuser_idpor defecto (MEM0_DEFAULT_USER_ID) cuando el llamador omite los tres en una escritura.
Inicio rápido
# 1. Start Qdrant
docker compose up -d qdrant
# 2. Configure
cp .env.example .env
# edit .env: set OPENAI_API_KEY (or switch to the Ollama block for a key-free setup)
# 3. Run the server (streamable-HTTP on :8080/mcp)
uv run -m mcp_mem0Comprobación de salud: curl localhost:8080/health
Docker
El Dockerfile es de múltiples etapas con dos objetivos: runtime (el servidor) y test (la suite).
Con docker compose (recomendado)
cp .env.example .env # set OPENAI_API_KEY (or the Ollama block)
# Qdrant + server together
docker compose up -d --build qdrant server
curl localhost:8080/health
# Run unit tests (no Qdrant / keys needed)
docker compose run --rm tests
# End-to-end smoke against the running server (needs an embedder key)
docker compose run --rm tests python tests/smoke.pyDentro de la red de compose, el servidor alcanza a Qdrant en QDRANT_HOST=qdrant (configurado automáticamente); las pruebas alcanzan al servidor en MCP_URL=http://server:8080/mcp.
Con docker simple
# Service image
docker build --target runtime -t mcp-mem0 .
docker run --rm -p 8080:8080 --env-file .env -e QDRANT_HOST=host.docker.internal mcp-mem0
# Test image
docker build --target test -t mcp-mem0-test .
docker run --rm mcp-mem0-test # pytest -qVerificar
# Unit tests (no Qdrant needed)
uv run pytest -q
# End-to-end smoke test (server + Qdrant + embedder must be running)
uv run python tests/smoke.py
# Confirm per-client collections were created
curl localhost:6333/collectionsConfiguración
Todos los ajustes provienen de variables de entorno / .env — consulte .env.example. Los principales: MEM0_COLLECTION_HEADER, MEM0_COLLECTION_PREFIX, QDRANT_HOST/QDRANT_PORT (o QDRANT_URL+QDRANT_API_KEY), MEM0_EMBEDDING_DIMS (debe coincidir con el incrustador), y los bloques de proveedor MEM0_LLM_* / MEM0_EMBEDDER_* (openai / ollama / …).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides memory management tools for AI agents, enabling adding, searching, updating, and deleting memories via the Mem0 API.41MIT
- AlicenseNot gradedqualityCmaintenanceOpen-source MCP server for mem0 that enables memory storage and retrieval using local LLMs, self-hosted, and Docker-free.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceA fully local, self-hosted memory server for MCP clients (Claude Code, Cursor, etc.) that provides persistent memory storage with semantic search, using local embeddings and a local Qdrant vector store.MIT
- AlicenseBqualityCmaintenanceAn MCP server for storing and retrieving memories using Qdrant vector search, acting as a semantic memory layer.2Apache 2.0
Related MCP Connectors
An MCP memory server. One memory your agents share — across models, devices and apps.
Cloud-hosted MCP server for durable AI memory
Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.
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/schwarzesonne13/mem0-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server