Skip to main content
Glama
Mem0 MCP Server

Mem0 MCP Server

by alexcz-a11y

πŸ‡¨πŸ‡³ δΈ­ζ–‡ζ–‡ζ‘£

Mem0 MCP Server Setup

This is a local MCP server for Mem0, allowing you to store and search memories directly from Cursor.

Prerequisites

Related MCP server: Mem0 MCP Server

Installation

  1. Install Dependencies:

    python3 -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
  2. Configure API Key: πŸš€ Recommended: Set MEM0_API_KEY directly in the env section of mcp.json (no .env file needed, see Cursor config below).

    Or use .env file:

    • Copy .env.example to .env:

      cp .env.example .env
    • Open .env and replace your_mem0_api_key_here with your actual Mem0 API Key.

Cursor Configuration (mcp.json)

Add the following entry to your Cursor mcp.json file (usually located at ~/.cursor/mcp.json or accessible via Cursor Settings > MCP):

{
  "mcpServers": {
    "mem0": {
      "command": "/Users/alexnear/Documents/mem0MCP/venv/bin/python",
      "args": [
        "/Users/alexnear/Documents/mem0MCP/server.py"
      ],
      "env": {
        "MEM0_API_KEY": "your_api_key_here" 
      }
    }
  }
}

Note:

  • πŸš€ Preferred: Set MEM0_API_KEY directly in the env section of mcp.json - FastMCP passes it to the server process automatically.

  • Alternative: Use .env file (loaded via python-dotenv). Ensure server runs from the directory containing .env.

  • Ensure the python command points to the python environment where you installed the requirements (e.g., if you used a venv, point to venv/bin/python).

Tools Provided

  1. add_memory: Stores messages/interactions.

  2. search_memories: Semantically searches stored memories (v2).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Provides AI agents with persistent long-term memory capabilities using semantic search. Enables storing, retrieving, and searching memories through three core tools integrated with Mem0 and vector storage.
      MIT
    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables persistent storage and semantic search of coding preferences, patterns, and implementations using Mem0, allowing AI agents to remember and retrieve development best practices across sessions.
      3
      -
    • A
      license
      A
      quality
      Not graded
      maintenance
      Enables AI applications to add, search, update, and delete long-term memories using the Mem0 Memory API, allowing agents to persistently remember user preferences, conversation history, and contextual information across sessions.
      9
      Apache 2.0