home / mcp / memory mcp server

Memory MCP Server

Provides per-project memory management via Markdown-stored memories with keyword-based search and automatic memory creation or updates.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jerryzhongj-memory-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/memory-mcp",
        "run",
        "memory-mcp",
        "--project",
        "/path/to/your/project"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "sk-ant-xxx"
      }
    }
  }
}

Memory MCP provides a dedicated server to handle project memory management for Claude Desktop. It stores memories as Markdown files in your project directory, uses keyword-based search for fast retrieval, and lets the local LLM decide when to create or update memories, keeping your context organized and up to date.

How to use

You run memory MCP alongside Claude Desktop and connect it as an MCP server. Create memories for your project by letting Claude Desktop index important notes, decisions, and references. Memories are stored as Markdown files in your project folder, and you benefit from keyword-based matching and automatic memory creation or updates driven by the LLM. Ensure the memory server is running for the current project or projects you want to manage.

How to install

Prerequisites you need before installing memory MCP:

  • Python >= 3.10
  • uv package manager
  • Anthropic API Key

Install steps to get memory MCP up and running:

git clone <repository-url>
cd memory-mcp
uv sync

Configuration

1. Get your Anthropic API Key from the Anthropic Console.

2. Configure Claude Desktop to load memory MCP servers. Use the per-project approach if you want separate memory contexts for different projects, or a single-server setup for one project.

单项目配置(示例)将 memory-mcp 指定为一个环境中运行的服务器:

{
  "mcpServers": {
    "memory": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/memory-mcp",
        "run",
        "memory-mcp",
        "--project",
        "/path/to/your/project"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "sk-ant-xxx"
      }
    }
  }
}

多项目配置

若要为多个项目分别运行内存管理,只需为每个项目配置一个独立的服务器条目。如下所示:

{
  "mcpServers": {
    "memory-project-a": {
      "command": "uv",
      "args": [
        "--directory", "/path/to/memory-mcp",
        "run", "memory-mcp",
        "--project", "/path/to/project-a"
      ],
      "env": { "ANTHROPIC_API_KEY": "sk-ant-xxx" }
    },
    "memory-project-b": {
      "command": "uv",
      "args": [
        "--directory", "/path/to/memory-mcp",
        "run", "memory-mcp",
        "--project", "/path/to/project-b"
      ],
      "env": { "ANTHROPIC_API_KEY": "sk-ant-xxx" }
    }
  }
}

Available tools

Memory storage

Stores memories as Markdown files inside the project directory for each memory topic or event.

Keyword-based retrieval

Uses keywords to fetch relevant memories quickly when you search or reference a topic.

LLM-driven memory management

LLM decides when to create new memories or update existing ones based on project activity.

Content validation

Automatically checks memory size and relevance to ensure quality and usefulness.