# Cursor

URL: https://codepanel.ai/docs/cursor

Connect Cursor to CodePanel: add the MCP server to mcp.json, sign in with GitHub, and install the review-loop skills.

> [!NOTE]
> Do the [Quickstart](/docs/quickstart) up to adding a provider key first. Cursor cannot add provider keys or change spending limits.

## Setup

### 1. Add the MCP server

Put this in `~/.cursor/mcp.json`, or in `.cursor/mcp.json` for one project:

```json tab="Sign in" title="~/.cursor/mcp.json"
{
  "mcpServers": {
    "codepanel": {
      "type": "http",
      "url": "https://codepanel.ai/mcp"
    }
  }
}
```

```json tab="Token" title="~/.cursor/mcp.json"
{
  "mcpServers": {
    "codepanel": {
      "type": "http",
      "url": "https://codepanel.ai/mcp",
      "headers": {
        "Authorization": "Bearer cpk_..."
      }
    }
  }
}
```

One click, with a token: create a personal token under **Settings → API tokens**, then choose **Cursor → Add to Cursor**.

### 2. Sign in

Skip this step with a token. In **Cursor Settings → MCP**, choose CodePanel (it shows as needing a login), then approve on CodePanel's consent page.

### 3. Add the skills

```bash
npx skills add Code-Panel-AI/codepanel-tools
```

Choose both skills: `codepanel` (the review loop) and `codepanel-setup`. Cursor reads skills from `.agents/skills` and `.cursor/skills`.

### 4. Set up the repository

Ask Cursor's agent to use the `codepanel-setup` skill. It writes `.codepanel/rules.md` from your `AGENTS.md` or `CLAUDE.md`, adds the review loop to them, and opens one pull request. Or paste the [Repository setup](/docs/agent-setup) prompt.

## Verify

Ask the agent: "Use the CodePanel whoami tool." It answers with your GitHub account and its permissions. Then: "Read CodePanel's review of owner/name#123." If either fails, see [Troubleshooting](/docs/coding-agents#troubleshooting).

## Share with your team

Commit `.cursor/mcp.json` with the URL only (the **Sign in** version) and the skills in `.agents/skills/`. Each person signs in with their own GitHub account, so ratings are recorded as theirs.
