# Connect your agent

URL: https://codepanel.ai/docs/coding-agents

Connect Claude Code, Codex, Cursor, VS Code, or any MCP client to CodePanel's review loop, or run agents directly in the desktop app.

There are two ways to use coding agents with CodePanel:

- **Built-in (Desktop app):** Run coding agents directly inside the [CodePanel Desktop App](/docs/desktop-app) on macOS, Linux, or Windows. Agents run in isolated worktrees, open pull requests, and loop with the review panel automatically, with no MCP setup required.
- **External coding agent:** Keep using Claude Code, Codex, Cursor, VS Code, or any other MCP client, and connect it to CodePanel's hosted MCP server (`https://codepanel.ai/mcp`) so it can wait for reviews, inspect findings, fix or dispute them, and trigger tasks.

> [!NOTE]
> Complete the [Quickstart](/docs/quickstart) first so your repository is connected and a provider key or credits are configured.

## Integrations

| Tool | Guide | Setup |
| --- | --- | --- |
| Quick install (all major clients) | [Install in one command](/docs/install) | One command per client, GitHub OAuth sign-in |
| Claude Code | [Claude Code](/docs/claude-code) | Official plugin (MCP server + skills) |
| OpenAI Codex | [Codex](/docs/codex) | `codex mcp add` + skills |
| Cursor | [Cursor](/docs/cursor) | One-click deeplink or `mcp.json` + skills |
| VS Code & GitHub Copilot | [VS Code and GitHub Copilot](/docs/vs-code) | `code --add-mcp` |
| Gemini CLI, OpenCode, Amp, Cline, Zed, Devin, others | [Other MCP clients](/docs/other-agents) | Remote Streamable HTTP MCP config |
| Claude & ChatGPT web/desktop | [Claude and ChatGPT apps](/docs/claude-and-chatgpt) | Custom connector |
| GitHub Actions | [Merge gate](/docs/merge-gate) | Required commit status or CI workflow |

## What an integration adds

- **Hosted MCP server (`https://codepanel.ai/mcp`):** Gives your agent tools to wait for reviews (`wait_for_review`), read findings (`get_review`), rate or dispute them (`rate_finding`), trigger reviews (`trigger_review`), and start or steer tasks in the Agent App. See [MCP server](/docs/mcp-server).
- **Skills:** Teach your agent the review loop (`codepanel`), repository setup (`codepanel-setup`), and Agent App workflows (`codepanel-agent-app`).

Even without MCP or skills, any coding agent can participate by reading CodePanel's pull request comment and replying with `/feedback` lines.

## Sign in or use a token

**Sign in (recommended)** whenever your client supports MCP OAuth. On first use it opens CodePanel's consent page in your browser: sign in with GitHub, review the requested scopes, and approve. Revoke access anytime under **Settings → API tokens → Connected apps**.

**Use a personal token (`cpk_...`)** for clients that do not support OAuth, or for CI and scripts. Create one under **Settings → API tokens** and keep it out of committed files and chat logs.

## Verify the connection

Ask your agent: `"Use the CodePanel whoami tool."` It responds with your GitHub account and granted permissions. Then ask: `"Read CodePanel's review of owner/name#123."`

## Troubleshooting

| Symptom | Cause and fix |
| --- | --- |
| "Needs authentication" or `401` | Re-authenticate from your client's MCP menu. With a token, check that it is valid and not revoked. |
| Missing permission / scope | Reconnect and approve the required scope, or create a token with that scope. |
| "this is a CI token" | Repository CI tokens only work for the merge gate. Sign in or use a personal token. |
| "not found" for your repo | Confirm you signed in with the right GitHub account and connected the repository in CodePanel. |
| Tools do not appear | Restart your agent or open a fresh session after adding the MCP server. |
| "rate limit exceeded" | Too many requests in a short window; wait briefly and retry. |

For reviews that did not run or failed, see [Troubleshooting](/docs/troubleshooting).

## Share with your team

1. Commit the MCP server URL (never a token) in your repo's config (`.mcp.json`, `.cursor/mcp.json`, or `.vscode/mcp.json`). Each teammate signs in with their own GitHub account.
2. Run the `codepanel-setup` skill or [Repository setup](/docs/agent-setup) once so `AGENTS.md` or `CLAUDE.md` documents the review loop for everyone.

Next: [The review loop](/docs/agents) or [Desktop app](/docs/desktop-app).
