Memory MCP server

Provides structured memory management for project-based work through markdown file storage, enabling persistent context across chat sessions with efficient Lunr.js indexing for retrieval, updating, and relating memories.
Back to servers
Setup instructions
Provider
Eric Bailey
Release date
Mar 07, 2025
Language
TypeScript
Stats
2 stars

This MCP Memory Server provides structured memory management for Claude Desktop, allowing it to maintain context and knowledge across chat sessions specifically for project-based work. By creating and managing a memory store within your project directory, Claude can save important information and retrieve it in future sessions.

How to Install

To use the MCP Memory Server with Claude Desktop, you need to configure Claude Desktop to connect to the server.

Prerequisites

  • Claude Desktop application installed
  • Node.js installed on your system

Setup Process

  1. Add the MCP Memory Server configuration to your Claude Desktop config file:
{
  "mcpServers": {
    "memory": {
      "command": "node",
      "args": ["path/to/mcp-memory/dist/index.js"]
    }
  }
}
  1. Optionally, you can specify a custom memory directory:
{
  "mcpServers": {
    "memory": {
      "command": "node",
      "args": ["path/to/mcp-memory/dist/index.js"],
      "env": {
        "MEMORY_DIR": "/path/to/custom/memory/directory"
      }
    }
  }
}

Using the MCP Memory Server

Memory Structure

The server creates a hierarchical memory structure within your project directory:

/your-project-directory
  /memory                # Memory store created by Claude
    /entities/           # Information about specific entities (people, projects, etc.)
    /concepts/           # Abstract concepts or knowledge
    /sessions/           # Session-specific memories
    /index.json          # Lunr.js search index
    /metadata.json       # Overall memory metadata
    /README.md           # Auto-generated documentation

Workflow with Claude

The typical workflow for using the MCP Memory Server consists of:

  1. Setup: When starting a new project, have Claude create a memory store in your project directory
  2. Ongoing Work: As you work with Claude, it will automatically save important information to the memory store
  3. Continuity: In future sessions, Claude will retrieve relevant memories to maintain context
  4. Knowledge Building: Over time, Claude builds a comprehensive knowledge base about your project

Features Available

With the MCP Memory Server, Claude can:

  • Store memories as structured markdown files
  • Index memories for efficient retrieval
  • Tag and categorize memories
  • Create relationships between memories
  • Search memories by content, tags, or type

Using the Template Instructions

The repository includes an instructions_template.md file that provides a comprehensive template for Claude project instructions. You can customize this template for your specific projects to help Claude effectively use the memory system.

The template covers:

  • Memory system setup instructions
  • Memory retrieval process
  • Memory creation guidelines
  • Memory organization system
  • Memory maintenance procedures
  • Conversation workflow
  • Best practices

By following these instructions, you can help Claude build and maintain an effective memory system for your project, ensuring continuity and knowledge preservation across multiple sessions.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "memory" '{"command":"node","args":["path/to/mcp-memory/dist/index.js"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "memory": {
            "command": "node",
            "args": [
                "path/to/mcp-memory/dist/index.js"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "memory": {
            "command": "node",
            "args": [
                "path/to/mcp-memory/dist/index.js"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later