BrainAPI
BrainAPI
Extend

For the complete BrainAPI documentation index, see llms.txt. A markdown version of any docs page is available by appending .md to its URL. Docs MCP: /docs/mcp.

BrainAPI Product MCP

How to use MCP with BrainAPI

BrainAPI supports the MCP protocol. You can use MCP with BrainAPI or with your remote deployed BrainAPI instance. There are several ways to connect, you can use your client of choice to connect to the MCP server.

Looking for documentation tools instead? Use the separate Docs MCP at https://brain-api.dev/mcp (search + markdown fetch). The rest of this page covers the product MCP on your API host.

Connect Claude Desktop

Claude Desktop uses a local stdio process, while BrainAPI exposes MCP over HTTP. Connect the two with either the Node.js adapter or the pre-built BrainAPI bridge.

1. Open the configuration file

In Claude Desktop, open Settings, select Developer, and choose Edit Config. Using the button avoids relying on an operating-system-specific or user-specific file path.

2. Choose one bridge

If npx is available on Claude Desktop's process path, add the Node.js adapter:

{
  "mcpServers": {
    "brainapi": {
      "command": "npx",
      "args": [
        "-y",
        "@pyroprompts/mcp-stdio-to-streamable-http-adapter"
      ],
      "env": {
        "URI": "https://api.example.com/mcp",
        "MCP_NAME": "brainapi",
        "BEARER_TOKEN": "brainpat_replace_me"
      }
    }
  }
}

Alternatively, download the bridge from the BrainAPI MCP bridge release and configure its absolute executable path:

{
  "mcpServers": {
    "brainapi": {
      "command": "/absolute/path/to/brainapi-mcp-http-adapter",
      "args": [],
      "env": {
        "URI": "https://api.example.com/mcp",
        "MCP_NAME": "brainapi",
        "BEARER_TOKEN": "brainpat_replace_me"
      }
    }
  }
}

Replace the example URL and PAT locally. Never commit the resulting configuration or share a screenshot containing its token or local file path.

3. Restart and verify

Save the file and restart Claude Desktop. The configured brainapi server should appear in the MCP tools list. If it does not, verify that the bridge command runs in a terminal, the URL ends in /mcp, and the PAT can access the intended BrainAPI instance.

Graph, changelog, and versions

These reads are on the product MCP, alongside semantic search and search_memory.

  • traverse_graph walks the live graph from a start node. The response keeps every hop and also lists superseded relationships in invalidated when a relationship property includes invalid_at or deprecated.
  • list_changelogs lists graph changelog entries, newest first. Filter with query_text or a changelog type. get_changelog reads one entry by id.
  • list_source_versions returns the current copy and previous copies of a source. Pass source_key, or a query when the key is unknown. The query is used only to find the source. If embedding fails, the tool returns an error and no versions.
Edit on GitHub

Last updated on

On this page