LabscoMCP early access ↗
olkMCP SERVER

Mem0 MCP Server

Self-hosted long-term memory over Mem0: store, search by similarity, and keep user, agent and session memories isolated.

by olk ↗Agent MemoryCommunity

LABSCO 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