# BladeCP MCP: Connect a client

How an MCP client such as Claude Code, Codex or Cursor connects to BladeCP MCP: the transport, the key header and the plugin that registers the server.

The server address and the setup for each client will be published on this page at launch. This page explains how the connection works, so you can prepare your key now.

## How the connection works

- The server is registered in the client as a remote MCP server named `bladecp`, with the Streamable HTTP transport.
- The key comes from the `BLADECP_API_KEY` environment variable and travels in the `X-API-KEY` header. Clients that only support bearer tokens can send `Authorization: Bearer` instead.
- The server does not use OAuth sign-in. Without the variable, it works with the documentation only.
- Never write the key itself into a versioned file: the configuration only names the variable.

## Claude Code, Codex and Cursor

The [BladeCP Agent Skills](/skills.md) plugin installs the skills and registers this server at once, with the key read from `BLADECP_API_KEY`. In Codex and Cursor, the plugin's server runs in documentation-only mode; an entry in the configuration of the client, published here with the setup, enables the account tools.

## Other clients

Any client that supports remote MCP servers with the Streamable HTTP transport can connect. The server goes into the configuration of the client, with the `X-API-KEY` header read from an environment variable.

## Prepare now

1. Create the [personal key](/getting-started/api-keys.md) the server will use. [Keys and permissions](/mcp/keys.md) lists the scopes it needs.
2. Keep it in your secret manager and export it as `BLADECP_API_KEY` in the environment where your agent starts.
3. Until launch, your agent can already read this documentation in Markdown and call the Customer API with that key: see [AI agents](/agents.md).

## Next step

[Tools](/mcp/tools.md): what the agent can do once connected.
