# get_setup_status

URL: https://codepanel.ai/docs/mcp-server/get_setup_status

The CodePanel MCP tool that test-calls every piece an agent run needs and returns each line green or red with its fix, never a key.

`get_setup_status` checks that your account is set up for agent runs. It test-calls each piece and answers one line per piece, green or red, with the exact fix for each red line. It never returns a key, a token or a secret, only whether each is there and works. It needs the `read` scope.

## When to call it

- **Before a run**, or from a repository's own doctor command, to see that every piece works. Read the lines by `id`; they are stable.
- **After the owner changes a key or the gateway**, to see that the change took.
- **When a run's agent gets `gateway_unavailable` or `gateway_refused`**, to see which piece is missing.

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `live` | boolean | no | false answers the saved lines without calling any provider; default true |

It only reads: the server marks it `readOnlyHint: true`, so clients that ask before a write can run it without asking.

## What it returns

`checks`: one line per piece, each with `id`, `name`, `status`, `detail`, `fix` (the exact next step, or `null`), `fixIn` and `checkedAt`. The ids:

| Id | What it checks |
| --- | --- |
| `gateway` | Whether the Cloudflare AI Gateway is set up and on (optional) |
| `gateway.token` | The gateway token: missing (`needs_token`) is red, and with a token one call through the gateway shows whether it is accepted |
| `gateway.stored_keys` | With stored keys on: whether Cloudflare answered with a key it holds, per provider (`providers[].gatewayKey`) |
| `provider_key.<provider>` | Each key saved in CodePanel, by listing its models |
| `openai.zero_data_retention` | Only the owner can confirm this: no OpenAI API reports it. See [`confirm_setup_check`](/docs/mcp-server/confirm_setup_check) |
| `github_app.<owner/name>` | Whether the CodePanel GitHub App is installed on each connected repository (up to 10) |
| `trusted_bots.<owner/repo>` | `pass`, naming the GitHub Apps the repository reviews like a member ([trusted bot authors](/docs/triggering-reviews#trusted-bot-authors)). With none trusted anywhere there is one `trusted_bots` line, `skipped`. Never blocks `ready` |
| `runner_key.<owner/repo>` | A repository runner key, the key a repository's backend issues so CodePanel runs can get its GitHub token and work leases, by calling its check URL. With none saved there is one `runner_key` line, `skipped` |

`status` is `pass`, `fail`, `warn`, `manual` (waits for the owner), `attested` (the owner confirmed it), `unchecked` or `skipped` (not needed). `ready` is true when no line is `fail` or `manual`, and `nextAction` is the first line to fix. A fix whose `fixIn` is `browser` holds a secret, such as the gateway token: tell the owner instead of trying it.

`providers`: how each provider's agent-run calls go now. Each has a `mode`: `gateway_stored_key` (Cloudflare holds the key and CodePanel sends only the gateway token), `gateway_own_key` (your key, saved in CodePanel, through the gateway), `direct_own_key`, `refused` (stored keys on, but the gateway has no token) or `none`.

The live calls are free: each lists a provider's models, never a completion. They run at most once every 30 seconds; a call sooner answers the lines from the last run.

## The same step without MCP

| Surface | Form |
| --- | --- |
| HTTP API | `GET /setup` with the `read` scope; `?live=false` reads the saved lines |
| CLI | `codepanel setup`, or `codepanel setup --saved` |
| Browser | Settings → Setup check |

## What the server tells your agent

The description your agent reads when it lists the tools:

> Use it to check that the account is set up for agent runs, before a run or from a repository's doctor command. Test-calls each piece (every provider key, the Cloudflare AI Gateway token, stored keys per provider, each connected repository's GitHub App and optional runner key; at most once per 30 seconds, live: false reads the saved lines without calling) and returns checks[] with a stable id, status (pass|fail|warn|manual|attested|unchecked|skipped), detail and the exact fix, plus providers[] with each provider's mode (gateway_stored_key, gateway_own_key, direct_own_key, refused, none), ready and nextAction. A fix with fixIn browser holds a secret: tell the owner, do not try it. Never returns a key or token.

## Related

- [`get_model_gateway`](/docs/mcp-server/get_model_gateway): the gateway's settings, which this checks.
- [`confirm_setup_check`](/docs/mcp-server/confirm_setup_check): withdraw the owner's confirmation of what no API can check.
- [Providers and keys](/docs/providers-and-keys): saving keys, the gateway and its token.
