Skip to content
MCP server

Graphmem

Local SQLite memory shared by coding agents, with semantic recall and code navigation

Runs locally

Graphmem 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
CLI, macOS, Linux
Runs
Locally
Version
0.15.2
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add graphmem -- npx -y @sonic182/graphmem

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": {
    "graphmem": {
      "command": "npx",
      "args": [
        "-y",
        "@sonic182/graphmem"
      ]
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "graphmem": {
      "command": "npx",
      "args": [
        "-y",
        "@sonic182/graphmem"
      ]
    }
  }
}

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

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "graphmem": {
      "command": "npx",
      "args": [
        "-y",
        "@sonic182/graphmem"
      ]
    }
  }
}

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

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

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

{
  "mcpServers": {
    "graphmem": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@sonic182/graphmem"
      ]
    }
  }
}

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 graphmem -- npx -y @sonic182/graphmem

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.graphmem]
command = "npx"
args = ["-y", "@sonic182/graphmem"]

Codex setup guide

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

{
  "mcpServers": {
    "graphmem": {
      "command": "npx",
      "args": [
        "-y",
        "@sonic182/graphmem"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "graphmem": {
          "command": "npx",
          "args": [
            "-y",
            "@sonic182/graphmem"
          ]
        }
      }
    }

    Or run: gemini mcp add -s user graphmem npx -- -y @sonic182/graphmem

    Antigravity

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

    {
      "mcpServers": {
        "graphmem": {
          "command": "npx",
          "args": [
            "-y",
            "@sonic182/graphmem"
          ]
        }
      }
    }

    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": {
        "graphmem": {
          "command": "npx",
          "args": [
            "-y",
            "@sonic182/graphmem"
          ]
        }
      }
    }

    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": {
        "graphmem": {
          "command": "npx",
          "args": [
            "-y",
            "@sonic182/graphmem"
          ]
        }
      }
    }

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

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "graphmem": {
          "command": "npx",
          "args": [
            "-y",
            "@sonic182/graphmem"
          ]
        }
      }
    }

    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": {
        "graphmem": {
          "command": "npx",
          "args": [
            "-y",
            "@sonic182/graphmem"
          ]
        }
      }
    }

    Junie

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

    {
      "mcpServers": {
        "graphmem": {
          "command": "npx",
          "args": [
            "-y",
            "@sonic182/graphmem"
          ]
        }
      }
    }

    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": {
        "graphmem": {
          "command": "npx",
          "args": [
            "-y",
            "@sonic182/graphmem"
          ]
        }
      }
    }

    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.

About Graphmem

Graphmem lets Claude Code, Codex, OpenCode, pi and other MCP clients read and write the same project memory instead of each tool keeping its own. Memories are stored in SQLite under ~/.graphmem (or GRAPHMEM_HOME), searched with a local embedding model, and linked as entities.

Memories default to the current Git repository, or global outside one. Reads always include global memories, while writes are limited to the current repository and global, including updates and deletions. A list_scopes tool reports which scopes exist and which are writable. The CLI, gmem, can also remember, search, check which memories exceed the embedding model's token limit, and open a terminal UI.

Optional code tools in release binaries find symbol definitions, outline files, list imports and compare symbols between Git revisions without an embedding model. They index definitions, not call sites, and can be switched off with GRAPHMEM_CODE=off. The npm package contains launchers; a separate step downloads and verifies the native binary.

Tools this server provides (6)

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

From the tool list in its README, going by the names, 3 of 6 tools read data; 3 names don't say.

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

list_scopesName suggests: reads
Lists memory scopes and their write permissions.
listName suggests: reads
Pages through the memories of a selection.
find_symbolName suggests: reads
Finds a definition and its source range.
code_outline
Lists a file's definitions and nesting.
code_imports
Lists declared imports.
code_diff
Compares symbols between Git revisions.

What it does

Shared across agents
Several coding agents can use one memory store.
Repo and global scopes
Memories follow the current Git repository, with global memories always readable.
Local semantic search
Recall runs against a local embedding model with SQLite storage.
Symbol lookup
find_symbol returns a definition and its source range.
Revision diffing
code_diff compares symbols between Git revisions.
Agent plugins
Plugins exist for Claude Code, Codex, OpenCode and pi.

Good for

  • Keep project conventions across coding sessions
  • Let two different agents recall the same decisions
  • Find where a symbol is defined without a language server
  • See which symbols changed since another branch

Pricing

Open source

Graphmem FAQ

Where is the data stored?

In ~/.graphmem by default, or the directory set in GRAPHMEM_HOME.

Does Graphmem need a network at run time?

Search is local. A separate gmem-install step downloads the native binary.

Which license applies?

MIT.

Can agents write to any project's memory?

No. Writes are limited to the current repository and global scope.

Is Graphmem free?

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

How do I add Graphmem to Claude Code?

Run this command in your terminal: claude mcp add graphmem -- npx -y @sonic182/graphmem

What are the best alternatives to Graphmem?

The closest alternatives to Graphmem are REA, Codebase Memory, Serena MCP: the IDE for your agent, XERJ and Context7.

Where this comes from

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

How AIPoweredBot checks servers