Mem0 Mcp Selfhosted banner
elvismdev elvismdev

Mem0 Mcp Selfhosted

AI community

Description

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.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

mem0-mcp-selfhosted

mem0-mcp-selfhosted MCP server

Self-hosted [mem0](https://github.com/mem0ai/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

Service Required Purpose
Qdrant Yes Vector memory storage and search
Ollama Yes Embedding generation (bge-m3) and optionally local LLM
Neo4j 5+ Optional Knowledge graph (entity relationships)
Google API Key Optional Required only for gemini/gemini_split graph providers

Python >= 3.10 and [uv](https://docs.astral.sh/uv/getting-started/installation/).

**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](#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](#configuration)).

`uvx` automatically downloads, installs, and runs the server in an isolated environment, no manual installation nee