Skip to main content

Open-source MCP server for mem0 - local LLMs, self-hosted, Docker-free

Project description

mem0-open-mcp

Open-source MCP server for mem0local LLMs, self-hosted, Docker-free.

Created because the official mem0-mcp configuration wasn't working properly for my setup.

Features

  • Local LLMs: Ollama (recommended), LMStudio*, or any OpenAI-compatible API
  • Self-hosted: Your data stays on your infrastructure
  • Docker-free: Simple pip install + CLI
  • Flexible: YAML config with environment variable support
  • Multiple Vector Stores: Qdrant, Chroma, Pinecone, and more

*LMStudio requires JSON mode compatible models

Quick Start

Installation

Install from source:

git clone https://github.com/yourname/mem0-open-mcp.git
cd mem0-open-mcp
pip install -e .

Usage

# Create default config
mem0-open-mcp init

# Interactive configuration wizard
mem0-open-mcp configure

# Start the server
mem0-open-mcp serve

# With options
mem0-open-mcp serve --port 8765 --user-id alice

Configuration

Create mem0-open-mcp.yaml:

server:
  host: "0.0.0.0"
  port: 8765
  user_id: "default"

llm:
  provider: "ollama"
  config:
    model: "llama3.2"
    base_url: "http://localhost:11434"

embedder:
  provider: "ollama"
  config:
    model: "nomic-embed-text"
    base_url: "http://localhost:11434"
    embedding_dims: 768

vector_store:
  provider: "qdrant"
  config:
    collection_name: "mem0_memories"
    host: "localhost"
    port: 6333
    embedding_model_dims: 768

With LMStudio

⚠️ Note: LMStudio requires a model that supports response_format: json_object. mem0 uses structured JSON output for memory extraction. If you get response_format errors, use Ollama instead or select a model with JSON mode support in LMStudio.

llm:
  provider: "openai"
  config:
    model: "your-model-name"
    base_url: "http://localhost:1234/v1"

embedder:
  provider: "openai"
  config:
    model: "your-embedding-model"
    base_url: "http://localhost:1234/v1"

MCP Integration

Connect your MCP client to:

http://localhost:8765/mcp/<client-name>/sse/<user-id>

Claude Desktop

{
  "mcpServers": {
    "mem0": {
      "url": "http://localhost:8765/mcp/claude/sse/default"
    }
  }
}

Available MCP Tools

Tool Description
add_memories Store new memories from text
search_memory Search memories by query
list_memories List all user memories
get_memory Get a specific memory by ID
delete_memories Delete memories by IDs
delete_all_memories Delete all user memories

API Endpoints

Endpoint Method Description
/health GET Health check
/api/v1/status GET Server status
/api/v1/config GET/PUT Configuration
/api/v1/memories GET/POST/DELETE Memory operations
/api/v1/memories/search POST Search memories

Requirements

  • Python 3.10+
  • Vector store (Qdrant recommended)
  • LLM server (Ollama, LMStudio, etc.)

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mem0_open_mcp-0.1.1.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mem0_open_mcp-0.1.1-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file mem0_open_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: mem0_open_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for mem0_open_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6b68c9cbe94fe68cbfc7c9117ab807c1c082f8ae81e5b04950e1ee7e093a81d8
MD5 f6724d8b35466d9bd632fe66282c72fa
BLAKE2b-256 bc038b829f99a68de7db0df05b33d3bfb1ac7d8479facdb995997f457b342e37

See more details on using hashes here.

File details

Details for the file mem0_open_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mem0_open_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for mem0_open_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 554275dc5e6780fe40642a84f64bb718f4a42da7110938be208a7d43d2c22df1
MD5 69aece4b03e7040bbb97f61368820e62
BLAKE2b-256 77592372c62126a2e9d5c98909da4aea9de9b3b103cdf2dbcc9294daa49b25bf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page