Connect your agent via MCP (BYO Agent)

Cloud machine only. Connect your own AI agent (Claude Code, Cursor, Codex CLI…) to your Blave Agent cloud machine through Blave's MCP server (Model Context Protocol): it runs on your own subscription, with no Blave AI fee.

Last updated 2026-08

How do you connect? Open the workspace, click "More" at the bottom of the sidebar, then go to "Settings" › "Connections". Under "Connect your agent via MCP", click "Generate access code", then "Copy message" and paste it to the agent you use — that completes the setup (your server needs to be running). This page lists the config shape and caveats for each tool; it is written for humans and for agents sent here to read the setup details. Three core facts:

  • MCP endpoint: https://mcp.blave.org/mcp (HTTP transport).
  • Auth: HTTP header Authorization: Bearer <YOUR_ACCESS_CODE>.
  • The access code is shown only once at generation; while your server is running you can regenerate or revoke it any time (the old code is invalidated immediately).

How do I configure each tool?

Claude Code

Shell
claude mcp add --scope user --transport http blave https://mcp.blave.org/mcp --header "Authorization: Bearer <YOUR_ACCESS_CODE>"

Run in a terminal. --scope user makes it global (the default local only applies to the current project directory). After regenerating the access code, run claude mcp remove blave first, add again (a same-name entry is not overwritten), and restart Claude Code.

Codex CLI

TOML
[mcp_servers.blave]
url = "https://mcp.blave.org/mcp"
http_headers = { "Authorization" = "Bearer <YOUR_ACCESS_CODE>" }

Paste into ~/.codex/config.toml. Use the table-header form shown above — a one-line dotted key pasted after another [section] gets nested under the wrong section.

Cursor

JSON
{
  "mcpServers": {
    "blave": {
      "url": "https://mcp.blave.org/mcp",
      "headers": { "Authorization": "Bearer <YOUR_ACCESS_CODE>" }
    }
  }
}

Paste into .cursor/mcp.json (project) or ~/.cursor/mcp.json (global). If the file already has mcpServers, merge the blave entry in instead of replacing the whole file.

Gemini CLI

Shell
gemini mcp add --scope user --transport http blave https://mcp.blave.org/mcp --header "Authorization: Bearer <YOUR_ACCESS_CODE>"

Run in a terminal. --scope user is required: the default scope is project, and running in your home directory errors out. After regenerating the access code, just run it again — it overwrites.

Antigravity

JSON
{
  "mcpServers": {
    "blave": {
      "serverUrl": "https://mcp.blave.org/mcp",
      "headers": { "Authorization": "Bearer <YOUR_ACCESS_CODE>" }
    }
  }
}

Open the config from the agent panel: … → MCP Servers → Manage MCP Servers → View raw config (the file path varies by version). If it already has mcpServers, merge the blave entry in.

VS Code Copilot

JSON
{
  "servers": {
    "blave": {
      "type": "http",
      "url": "https://mcp.blave.org/mcp",
      "headers": { "Authorization": "Bearer <YOUR_ACCESS_CODE>" }
    }
  }
}

Paste into .vscode/mcp.json (workspace) or run MCP: Open User Configuration for the user-level file. Note the top-level key is servers, not mcpServers.

Cline

JSON
{
  "mcpServers": {
    "blave": {
      "type": "streamableHttp",
      "url": "https://mcp.blave.org/mcp",
      "headers": { "Authorization": "Bearer <YOUR_ACCESS_CODE>" }
    }
  }
}

Open the MCP Servers settings JSON from the Cline panel and paste it in. type must be camelCase streamableHttp. Neither http nor streamablehttp works.

opencode

JSON
{
  "mcp": {
    "blave": {
      "type": "remote",
      "url": "https://mcp.blave.org/mcp",
      "oauth": false,
      "headers": { "Authorization": "Bearer <YOUR_ACCESS_CODE>" }
    }
  }
}

Paste into opencode.json. Keep "oauth": false — it explicitly disables automatic OAuth detection so the access-code header auth is used.

Warp

JSON
{
  "blave": {
    "url": "https://mcp.blave.org/mcp",
    "headers": { "Authorization": "Bearer <YOUR_ACCESS_CODE>" }
  }
}

Settings → AI → MCP Servers (or Warp Drive → MCP Servers) → Add, then paste. The top level is the server name directly — no mcpServers wrapper.

Windsurf

JSON
{
  "mcpServers": {
    "blave": {
      "serverUrl": "https://mcp.blave.org/mcp",
      "headers": { "Authorization": "Bearer <YOUR_ACCESS_CODE>" }
    }
  }
}

Paste into ~/.codeium/windsurf/mcp_config.json. Note the url field is named serverUrl. (The product is being renamed: the docs now call it Devin Desktop; this config applies to the legacy Cascade agent.)

Trae

JSON
{
  "mcpServers": {
    "blave": {
      "url": "https://mcp.blave.org/mcp",
      "headers": { "Authorization": "Bearer <YOUR_ACCESS_CODE>" }
    }
  }
}

Add manually in the MCP settings and paste the JSON, or write it to .trae/mcp.json in the project root.

Can't connect, or actions get blocked?

  • Actions blocked by permissions: add mcp__blave to permissions.allow (in Claude Code auto mode also allow Bash(ssh:*)), or use the default mode.
  • New access code not taking effect: after regenerating, restart the agent session (restart the tool or open a new conversation) — existing connections don't pick up the new code.
  • Claude Code config change has no effect: a same-name entry in local scope wins over user. Run claude mcp get blave to see which scope is active and remove the one you don't want.
  • Same-name server already exists: Claude Code errors and does not overwrite — run claude mcp remove blave first; Gemini CLI simply overwrites on re-run.

Connected — what should the agent do?

  1. Call get_ssh_access first to obtain short-lived SSH credentials (15 minutes; just call again when expired).
  2. After SSHing into the server, read AGENTS.md in the workspace root /opt/blave-agent/workspace and follow it: use lib/ for backtests and orders, don't touch control/.
  3. Enable SSH multiplexing (parameters are in the usage returned by get_ssh_access) so follow-up commands skip the handshake.