pinkpixel-dev

✨ mem0 Memory System ✨

Community pinkpixel-dev
Updated

A Model Context Protocol server that can store and retrieve memories for LLM context control

Mem0 Logo

@pinkpixel/mem0-mcp MCP Server ✨

A Model Context Protocol (MCP) server that integrates with Mem0.ai to provide persistent memory capabilities for LLMs. It allows AI agents to store and retrieve information across sessions.

This server uses the mem0ai Node.js SDK for its core functionality.

Features 🧠

Tools

  • add_memory: Stores a piece of text content as a memory associated with a specific userId.
    • Input: content (string, required), userId (string, required), sessionId (string, optional), metadata (object, optional)
    • Stores the provided text, enabling recall in future interactions.
  • search_memory: Searches stored memories based on a natural language query for a specific userId.
    • Input: query (string, required), userId (string, optional), sessionId (string, optional), filters (object, optional)
    • Retrieves relevant memories based on semantic similarity.

Prerequisites 🔑

This server requires an OpenAI API key for the internal operations of the mem0ai library (used for embedding and processing memories). This key must be provided as an environment variable (OPENAI_API_KEY) in your MCP client configuration.

Installation & Configuration ⚙️

You can run this server in two main ways:

1. Using npx (Recommended for quick use):

Install the package globally using npm:

npm install -g @pinkpixel/mem0-mcp

Configure your MCP client (e.g., Claude Desktop, Cursor, Cline, Roo Code, etc.) to run the server using npx:

{
  "mcpServers": {
    "mem0-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@pinkpixel/mem0-mcp"
        ],
      "env": {
        "OPENAI_API_KEY": "YOUR_OPENAI_API_KEY_HERE"
      },
      "disabled": false,
      "alwaysAllow": []
    }
  }
}

Note: Replace "YOUR_OPENAI_API_KEY_HERE" with your actual OpenAI API key.

2. Running from Cloned Repository:

Clone the repository, install dependencies, and build the server (see Development section below). Then, configure your MCP client to run the built script directly using node:

{
  "mcpServers": {
    "mem0-mcp": {
      "command": "node",
      "args": [
        "/path/to/your/cloned/mem0-mcp/build/index.js" 
      ],
      "env": {
        "OPENAI_API_KEY": "YOUR_OPENAI_API_KEY_HERE"
      },
      "disabled": false,
      "alwaysAllow": []
    }
  }
}

Note: Replace /path/to/your/cloned/mem0-mcp/ with the actual absolute path to where you cloned the repository.

Important: Replace "YOUR_OPENAI_API_KEY_HERE" with your actual OpenAI API key in the env section of the configuration.

Development 💻

Clone the repository and install dependencies:

git clone https://github.com/pinkpixel-dev/mem0-mcp 
cd mem0-mcp
npm install

Build the server:

npm run build

For development with auto-rebuild on file changes:

npm run watch

Debugging 🐞

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Made with ❤️ by Pink Pixel

MCP Server · Populars

MCP Server · New

    logotype

    fixparser

    FIX5.0SP2 parser.

    Community logotype
    lucitra

    Linear MCP Server

    Enables AI agents to manage issues, projects, and teams on the Linear platform. MCP server.

    Community lucitra
    M-Pineapple

    Claude Project Coordinator

    Claude Project Coordinator is a Swift-powered MCP (Model Context Protocol) server designed to streamline multi-project Xcode development. It lets you track project status, auto-detect frameworks, search code patterns, and maintain a structured development knowledge base — all locally, with Claude Desktop as your assistant.

    Community M-Pineapple
    KOBA789

    Human-in-the-Loop MCP Server

    An MCP (Model Context Protocol) server that allows AI assistants to ask questions to humans via Discord.

    Community KOBA789
    chaitin

    SafeLine MCP Server

    SafeLine is a self-hosted WAF(Web Application Firewall) / reverse proxy to protect your web apps from attacks and exploits.

    Community chaitin