Skip to content
MCP server

Memory v2

Local SQLite memory for AI agents, with projects, branches and durable facts over MCP

Runs locally

Memory v2 is an open-source MCP server for knowledge and memory. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
Windows, Linux, Web
Runs
Locally
What it can do
Can change data (1 tool)
Version
2.1.0-alpha.3

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add memory-v2 --env MEMORY_API_TOKEN='<MEMORY_API_TOKEN>' -- uvx memory-v2-mcp

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "memory-v2": {
      "command": "uvx",
      "args": [
        "memory-v2-mcp"
      ],
      "env": {
        "MEMORY_API_TOKEN": "<MEMORY_API_TOKEN>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "memory-v2": {
      "command": "uvx",
      "args": [
        "memory-v2-mcp"
      ],
      "env": {
        "MEMORY_API_TOKEN": "<MEMORY_API_TOKEN>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "memory-v2": {
      "command": "uvx",
      "args": [
        "memory-v2-mcp"
      ],
      "env": {
        "MEMORY_API_TOKEN": "<MEMORY_API_TOKEN>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "memory-v2": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "memory-v2-mcp"
      ],
      "env": {
        "MEMORY_API_TOKEN": "<MEMORY_API_TOKEN>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add memory-v2 --env MEMORY_API_TOKEN='<MEMORY_API_TOKEN>' -- uvx memory-v2-mcp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.memory-v2]
command = "uvx"
args = ["memory-v2-mcp"]
env = { MEMORY_API_TOKEN = "<MEMORY_API_TOKEN>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "memory-v2": {
      "command": "uvx",
      "args": [
        "memory-v2-mcp"
      ],
      "env": {
        "MEMORY_API_TOKEN": "<MEMORY_API_TOKEN>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "memory-v2": {
          "command": "uvx",
          "args": [
            "memory-v2-mcp"
          ],
          "env": {
            "MEMORY_API_TOKEN": "<MEMORY_API_TOKEN>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e MEMORY_API_TOKEN='<MEMORY_API_TOKEN>' memory-v2 uvx -- memory-v2-mcp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "memory-v2": {
          "command": "uvx",
          "args": [
            "memory-v2-mcp"
          ],
          "env": {
            "MEMORY_API_TOKEN": "<MEMORY_API_TOKEN>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "memory-v2": {
          "command": "uvx",
          "args": [
            "memory-v2-mcp"
          ],
          "env": {
            "MEMORY_API_TOKEN": "<MEMORY_API_TOKEN>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "memory-v2": {
          "command": "uvx",
          "args": [
            "memory-v2-mcp"
          ],
          "env": {
            "MEMORY_API_TOKEN": "<MEMORY_API_TOKEN>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "memory-v2": {
          "command": "uvx",
          "args": [
            "memory-v2-mcp"
          ],
          "env": {
            "MEMORY_API_TOKEN": "<MEMORY_API_TOKEN>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "memory-v2": {
          "command": "uvx",
          "args": [
            "memory-v2-mcp"
          ],
          "env": {
            "MEMORY_API_TOKEN": "<MEMORY_API_TOKEN>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "memory-v2": {
          "command": "uvx",
          "args": [
            "memory-v2-mcp"
          ],
          "env": {
            "MEMORY_API_TOKEN": "<MEMORY_API_TOKEN>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "memory-v2": {
          "command": "uvx",
          "args": [
            "memory-v2-mcp"
          ],
          "env": {
            "MEMORY_API_TOKEN": "<MEMORY_API_TOKEN>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • MEMORY_APIBase URL of the Memory v2 HTTP API
  • MEMORY_API_TOKENBearer token, only needed when the API is not bound to loopback

About Memory v2

Memory v2 keeps long-running agent work in a single SQLite file on your own machine. Projects hold many conversation branches, and durable facts such as decisions, constraints and preferences can be stored, superseded or retired over time.

Agents reach it through a seven-tool MCP server that talks to the local HTTP API rather than opening the database directly. Full-text search, with Russian morphology, covers both stored memories and archived messages, and archiving the same branch twice only appends new messages.

The project suits developers and power users who want agent context they can copy, back up and inspect without an account or a network dependency. It is an alpha release, so the author recommends backing up the database before relying on it.

Tools this server provides (7)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 1 of 7 tools changes data; 4 names don't say.

From the server's own tool labels and tool names; not verified by us.

memory_health
Check API availability
memory_list_projectsName suggests: reads
List projects
memory_project_context
Restore a project and its branches
memory_searchName suggests: reads
Search memories and messages
memory_archive_conversationName suggests: changes
Archive a branch idempotently
memory_upsert
Store a fact, decision, constraint or preference
memory_deprecate
Retire an old memory, optionally with a replacement

What it does

Projects and branches
Groups many conversation branches under one project with shared search and context.
Durable memories
Stores facts, decisions, constraints and preferences with importance, confidence and supersede links.
Message provenance
Keeps source fingerprints and revisions, and soft-deletes messages so they remain recoverable.
Full-text search
Searches memories and messages using SQLite FTS5 with Russian morphology support.
Idempotent archive
Re-sending a branch appends only new messages and skips duplicates.
Local-first storage
Data lives in one SQLite file, listens on loopback by default and needs no cloud account.

Good for

  • Give a coding agent persistent project context across sessions and model switches
  • Archive long chat branches so they can be restored later with one request
  • Store project decisions and constraints that an MCP client can query on demand
  • Keep agent memory offline on a personal or work machine

Pricing

Open source

Free and MIT-licensed; self-hosted.

Memory v2 FAQ

Does Memory v2 need an account or internet connection?

No account is required and the installers work offline. The API listens on loopback by default.

How do MCP clients connect to Memory v2?

The MCP server runs over stdio and is published on PyPI as memory-v2-mcp, so it can be started with uvx.

Which MCP tools are available?

Seven tools: health check, list projects, project context, search, archive conversation, upsert memory and deprecate memory.

Where is the data stored?

In a plain SQLite file, by default at data/memory_v2.db, which you can copy and inspect.

Is Memory v2 free?

Yes. Memory v2 is open source, so you can use and self-host it for free.

How do I add Memory v2 to Claude Code?

Run this command in your terminal: claude mcp add memory-v2 --env MEMORY_API_TOKEN='<MEMORY_API_TOKEN>' -- uvx memory-v2-mcp

What are the best alternatives to Memory v2?

The closest alternatives to Memory v2 are MCP Memory, Agent Memory Os, MCP Light Memory, Memkeeper and Mnemon MCP.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers