# Make0 Brain MCP server

> Provides a shared, versioned, and local-first memory for multiple AI agents to read and write consistent facts.

- Repository: https://github.com/make0-official/brain-oss
- Page: https://hostedmcp.org/servers/make0-official/brain-oss
- Transport: stdio
- Stars: 15
- License: MIT
- Latest version: 0.3.3

## Install

### Claude Code

```sh
claude mcp add --env 'OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>' brain-oss -- npx -y @make0-ai/brain
```

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

```json
{
  "mcpServers": {
    "brain-oss": {
      "command": "npx",
      "args": [
        "-y",
        "@make0-ai/brain"
      ],
      "env": {
        "OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "brain-oss": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@make0-ai/brain"
      ],
      "env": {
        "OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"brain-oss","type":"stdio","command":"npx","args":["-y","@make0-ai/brain"],"env":{"OPENAI_API_KEY":"<YOUR_OPENAI_API_KEY>"}}'
```

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

```json
{
  "mcpServers": {
    "brain-oss": {
      "command": "npx",
      "args": [
        "-y",
        "@make0-ai/brain"
      ],
      "env": {
        "OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add brain-oss --env 'OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>' -- npx -y @make0-ai/brain
```

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

```toml
[mcp_servers.brain-oss]
command = "npx"
args = ["-y", "@make0-ai/brain"]

[mcp_servers.brain-oss.env]
OPENAI_API_KEY = "<YOUR_OPENAI_API_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>' brain-oss npx -- -y @make0-ai/brain
```

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

```json
{
  "mcpServers": {
    "brain-oss": {
      "command": "npx",
      "args": [
        "-y",
        "@make0-ai/brain"
      ],
      "env": {
        "OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `OPENAI_API_KEY` | no | yes | Optional. Turns on LLM features; Make0 Brain runs fully offline without it |
| `MAKE0_BRAIN_DB` | no | no |  |
| `MAKE0_BRAIN_EMBEDDINGS` | no | no |  |
| `MAKE0_BRAIN_HOME` | no | no | Data folder for the database, local models and .env (default ~/.make0) |
| `MAKE0_BRAIN_LLM_BASE_URL` | no | no |  |
| `MAKE0_BRAIN_LLM_MODEL` | no | no |  |
| `MAKE0_BRAIN_LLM_SEARCH` | no | no |  |

## Tools (7)

- `list_brains`: List Make0 brains this connection can use. Call this first to get a brain id for search_brain. Does not list memories. (read-only)
- `search_brain`: Search saved Brain memories. A memory may be a singular fact or a short Markdown mini-doc. Use a short, focused query with the key people, entities, preferences, or topics needed—not the full user message. Memories are retrieved with semantic + BM25 keyword search, reranked by a MiniLM cross-encoder, then expanded up to two hops along related_to graph links so connected memories surface with the seeds. Each memory includes addedBy (who first saved it) and versionCount (saved revisions). When versionCount is greater than 1, call get_memory_versions for the full history. Call get_memory whenever a result has truncated: true so you read the full note, not a clipped preview. Always pass brain from list_brains. (read-only)
- `get_memory`: Fetch one Brain memory by id. Content is either a singular fact or a short Markdown mini-doc (up to about 800 words). The memory includes addedBy (who first saved it) and versionCount (saved revisions). When versionCount is greater than 1, call get_memory_versions to read every saved revision. (read-only)
- `get_memory_versions`: Fetch every saved version of one Brain memory, newest first, including the current version. Use this when you need to see how a fact changed. Each version includes its full content. The version with current: true matches the memory returned by get_memory. (read-only)
- `add_memory`: Save a new Brain memory when the user explicitly asks to remember, save, or store something. Store either one singular fact or one short Markdown mini-doc (headings, lists, bold, links, code, and Mermaid diagrams) up to about 800 words. Use one memory for one coherent fact or note; do not paste a long document. A new memory that contradicts or restates an older one replaces it; the older one stays in version history.
- `update_memory`: Update an existing Brain memory when the user asks to correct or change it. The new content can be a singular fact or a short Markdown mini-doc (headings, lists, bold, links, code, and Mermaid diagrams) up to about 800 words. New content replaces the old content, and the previous version is kept.
- `delete_memory`: Delete a Brain memory when the user explicitly asks to remove a saved fact. The memory leaves search and reads, and every saved version is kept so the user can restore it with `npx @make0-ai/brain restore <id>`.

## FAQ

### Does Make0 Brain require an API key?

No, it runs offline with no API key after a one-time model download.

### How is the memory stored?

Everything is kept in a single SQLite file on your local machine.

### Can I import existing agent sessions?

Yes, you can import sessions from 41 different coding agents to bring existing context into the Brain.

### Is the memory shared between different AI tools?

Yes, tools like Claude Code, Cursor, and Windsurf can all read and write to the same shared memory.
