# Graphmem MCP server

> Provides shared local memory for coding agents using SQLite, semantic search, and linked entities to maintain project context across sessions.

- Repository: https://github.com/sonic182/graphmem
- Page: https://hostedmcp.org/servers/sonic182/graphmem
- Transport: stdio
- Stars: 9
- License: MIT
- Latest version: 0.15.2

## Install

### Claude Code

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

### Cursor (`~/.cursor/mcp.json`)

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

### VS Code (`.vscode/mcp.json`)

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

### VS Code CLI

```sh
code --add-mcp '{"name":"graphmem","type":"stdio","command":"npx","args":["-y","@sonic182/graphmem"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

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

### Codex

```sh
codex mcp add graphmem -- npx -y @sonic182/graphmem
```

### Codex config.toml (`~/.codex/config.toml`)

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

### Gemini CLI

```sh
gemini mcp add -s user graphmem npx -- -y @sonic182/graphmem
```

### Gemini settings.json (`~/.gemini/settings.json`)

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

## FAQ

### How do I install Graphmem for use with an MCP client?

You can install it via npm using `npm install --global @sonic182/graphmem` and then running `gmem-install`, or by using `npx -y @sonic182/graphmem mcp` for clients that support npx.

### Where is the memory data stored?

Data is stored locally in the `~/.graphmem` directory, though you can change this by setting the `GRAPHMEM_HOME` environment variable.

### Can I use Graphmem to navigate my code?

Yes, optional code tools allow you to find symbol definitions, outline files, list imports, and compare symbols between Git revisions.

### Does Graphmem require a configuration file?

No configuration file is required by default, but you can create `~/.graphmem/config.toml` to customize embeddings, retrieval, or code indexing.
