> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.livingbrain.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.livingbrain.com/_mcp/server.

# MCP server

Generated by Fern

Living Brain hosts a [Model Context Protocol](https://modelcontextprotocol.io) server, so AI
agents can capture knowledge, search pages, and manage brains without any code on your side.

```
https://livingbrain.fernmcp.dev/livingbrain
```

It uses the Streamable HTTP transport and calls the production API at
`https://api.livingbrain.com`.

## Connect a client

**Pick your client** · [Browse all 60 tools ↗](https://livingbrain.fernmcp.dev/livingbrain)

**Claude Code** (Terminal): Run it in a terminal. Claude Code picks the server up on its next start.

```bash
claude mcp add --transport http livingbrain \
  https://livingbrain.fernmcp.dev/livingbrain \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'x-subject-id: YOUR_SUBJECT_ID'
```

**Codex** (\~/.codex/config.toml): A url key rather than a command is what makes it remote. codex mcp add --url writes the entry, but not the headers.

```toml
[mcp_servers."livingbrain"]
url = "https://livingbrain.fernmcp.dev/livingbrain"
http_headers = { "x-api-key" = "YOUR_API_KEY", "x-subject-id" = "YOUR_SUBJECT_ID" }
```

**Cursor** (\~/.cursor/mcp.json): Global to every project, or .cursor/mcp.json for one. Cursor lists them under Customize in the sidebar.

```json
{
  "mcpServers": {
    "livingbrain": {
      "type": "http",
      "url": "https://livingbrain.fernmcp.dev/livingbrain",
      "headers": {
        "x-api-key": "YOUR_API_KEY",
        "x-subject-id": "YOUR_SUBJECT_ID"
      }
    }
  }
}
```

**VS Code** (.vscode/mcp.json): This file is committed with the project, so put the credential in an inputs prompt rather than in the file.

```json
{
  "servers": {
    "livingbrain": {
      "type": "http",
      "url": "https://livingbrain.fernmcp.dev/livingbrain",
      "headers": {
        "x-api-key": "YOUR_API_KEY",
        "x-subject-id": "YOUR_SUBJECT_ID"
      }
    }
  }
}
```

**Other**: The endpoint and the headers to send with it, for any other client that supports remote HTTP servers.

```text
https://livingbrain.fernmcp.dev/livingbrain
x-api-key: YOUR_API_KEY
x-subject-id: YOUR_SUBJECT_ID
```

For Claude Code, add `--scope user` to install the server for every project instead of only the current one.

Replace `YOUR_API_KEY` and `YOUR_SUBJECT_ID` with your own values (see [Authenticate](#authenticate)).
Any other MCP client that supports remote HTTP servers with custom headers works the same way.

## Authenticate

The server forwards the same two headers as the SDKs and CLI. Configure your client to send
both on every request:

| Header         | Value                                          |
| -------------- | ---------------------------------------------- |
| `x-api-key`    | Your Living Brain API key                      |
| `x-subject-id` | The end user whose brains the agent works with |

See [Authentication](/docs/authentication) for how the key and subject relate. Treat the
config file like any other place you store the key.

## Tools

Each API operation is one tool, named `<namespace>_<method>` after the SDK methods and grouped
into toolsets by namespace:

| Toolset   | Examples                                                                                 |
| --------- | ---------------------------------------------------------------------------------------- |
| Brains    | `brains_list`, `brains_create`, `brains_run_brief`                                       |
| Captures  | `captures_capture`, `captures_capture_chat_turn`, `captures_list_sources`                |
| Workspace | `workspace_search_pages`, `workspace_get_page`, `workspace_archive`, `workspace_restore` |
| Slack     | `slack_status`, `slack_start_oauth`, `slack_bind`, `slack_disconnect_installation`       |
| Telegram  | `telegram_status`, `telegram_connect`, `telegram_disconnect`                             |
| Webhooks  | `webhooks_list`, `webhooks_create`, `webhooks_update`, `webhooks_remove`                 |

Tool arguments follow the [API Reference](/api-reference): path, query, and body parameters
become tool inputs, and calls return the same JSON responses.