# MCP for coding agents (/docs/agents/mcp)



[Install the CLI and log in](/docs/agents/cli) first. The MCP server runs on your machine when the agent connects; it does not require another hosted server or a separate monthly bill.

## Connect your client [#connect-your-client]

Add this server to your MCP client's configuration:

```json
{
  "mcpServers": {
    "berrybox": {
      "command": "berrybox",
      "args": ["mcp"],
      "env": {
        "BERRYBOX_API_URL": "https://berrybox.io"
      }
    }
  }
}
```

If the client does not inherit your terminal's PATH, run `command -v berrybox` and use that **absolute path** as `command`. Configuration file locations vary by client. Restart or reconnect the server after changing configuration.

Do not put the API key in the JSON. The server reads the private credentials saved by `berrybox login`, or an inherited `BERRYBOX_TOKEN` provided securely by your environment.

## Start read-only [#start-read-only]

By default, the server exposes read tools and workflow migration preview. Ask your agent to:

> Read my team's runner settings, show the latest failed jobs and search the published logs for errors. Do not change settings or start a workflow.

The server's tool schemas describe their input. Tool errors are structured; the agent should report missing scope, expired keys or unavailable logs instead of guessing.

## Enable mutations deliberately [#enable-mutations-deliberately]

Only when you need write tools, add `BERRYBOX_ALLOW_WRITES: "1"` to the server's environment and reconnect it. The key also needs the relevant write scope, and the creator's current team role must permit the operation. This exposes tools that can change configuration, invitations, billing and other team state.

A Checkout tool returns a browser link; a person completes payment. GitHub installation also requires a browser handoff. Secret-returning key creation and rotation are not MCP tools.

## Spending and concurrency [#spending-and-concurrency]

Spending protection is currently **per team**, through prepaid credit, runtime reservations, monthly budgets and concurrency limits. A short-lived agent key restricts API access; it does not create a separate per-agent CI wallet. GitHub-triggered job charges are attributed to the team, not the agent key.

[Billing and limits](/docs/teams-and-billing/billing) · [Management API](/docs/api-reference/ci)
