# BrainAPI Product MCP (https://brainapi.lumen-labs.ai/docs/v2/agentic/MCP)

> For the complete BrainAPI documentation index, see [llms.txt](https://brainapi.lumen-labs.ai/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL (e.g. https://brainapi.lumen-labs.ai/docs/v2/agentic/MCP.md).

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](https://brainapi.lumen-labs.ai/docs/v2/agentic/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:

```json
{
  "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](https://github.com/Lumen-Labs/brainapi2/releases/tag/mcp-bridge-v0.1.0) and configure its absolute executable path:

```json
{
  "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.
