# MaxGraph MCP server

> Provides self-hosted persistent memory for AI agents using a knowledge graph and hybrid semantic search to maintain project context across sessions.

- Repository: https://github.com/RuMemory/maxgraph
- Page: https://hostedmcp.org/servers/rumemory/maxgraph
- Transport: remote
- Stars: 3
- Latest version: 1.9.5

## Install

### Claude Code

```sh
claude mcp add --env MEMORY_TOKEN=<YOUR_MEMORY_TOKEN> maxgraph -- docker run -i --rm ghcr.io/rumemory/maxgraph:1.9.5
```

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

```json
{
  "mcpServers": {
    "maxgraph": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/rumemory/maxgraph:1.9.5"
      ],
      "env": {
        "MEMORY_TOKEN": "<YOUR_MEMORY_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "maxgraph": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/rumemory/maxgraph:1.9.5"
      ],
      "env": {
        "MEMORY_TOKEN": "<YOUR_MEMORY_TOKEN>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "maxgraph": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/rumemory/maxgraph:1.9.5"
      ],
      "env": {
        "MEMORY_TOKEN": "<YOUR_MEMORY_TOKEN>"
      }
    }
  }
}
```

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

```toml
[mcp_servers.maxgraph]
command = "docker"
args = ["run", "-i", "--rm", "ghcr.io/rumemory/maxgraph:1.9.5"]

[mcp_servers.maxgraph.env]
MEMORY_TOKEN = "<YOUR_MEMORY_TOKEN>"
```

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

```json
{
  "mcpServers": {
    "maxgraph": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/rumemory/maxgraph:1.9.5"
      ],
      "env": {
        "MEMORY_TOKEN": "<YOUR_MEMORY_TOKEN>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `MEMORY_TOKEN` | yes | yes | Access token for the server (choose any strong value; the dashboard and MCP clients use the same one) |

## FAQ

### How does MaxGraph help with token usage?

It prevents the need to re-read entire histories by providing summaries, reducing token consumption by approximately 43%.

### Where is my data stored?

All records are stored locally on your computer as plain text files in a data folder, ensuring privacy and offline capability.

### Is there a free trial available?

Yes, there is a 7-day free trial that starts upon the first launch without requiring a credit card.
