# Install BugTape MCP in Claude Code, Cursor, and Codex (one command)

If you already ship with Claude Code, Cursor, or Codex, the missing piece is usually not another dashboard. It is evidence the agent can pull itself, then a pull request a human reviews.

BugTape is a bug tracker coding agents can close over MCP: capture what broke, the agent reads the issue over MCP, opens a pull request, you review it, and BugTape checks the fix in the release you ship and alerts you if it comes back.

It is not a claim to replace observability products such as Sentry. Those answer how the system is doing. BugTape answers what broke for this user, how often, and what the fix path looks like for an agent. A human still decides what ships.

Docs this post mirrors:

- [MCP install](/docs/mcp-install/)
- [MCP tools](/docs/mcp-tools/)
- [CLI](/docs/cli/)

## One command (fastest)

BugTape MCP is a remote HTTP server at `https://app.bugtape.ai/mcp`. Capture keys (`bt_live_` / `bt_test_`) are rejected for MCP. Use an agent connection or a PAT.

```bash
npx -y bugtape connect claude   # or: cursor, codex, grok, grok-bot
```

The CLI prints a link and a code. Open the link (or send it to whoever owns the workspace), check the code, click **Allow**, and the agent is added. This works on servers and cloud agents with no browser on the agent machine.

The same CLI with `init` can set up capture in the repo (project, key, install steps, test report). See the [CLI docs](/docs/cli/).

> The CLI package in this post is `bugtape-0.1.1.tgz`, the tarball named in the [MCP install](/docs/mcp-install/) docs. If that doc bumps the version, update this post in the same change.

## Claude Code

### One-command connect

```bash
npx -y bugtape connect claude
```

### OAuth / URL only

```bash
claude mcp add --transport http bugtape https://app.bugtape.ai/mcp
```

Then run `/mcp` in Claude Code and choose BugTape to finish sign-in.

### With a token (Team → Add an agent, or CLI `login`)

```bash
claude mcp add --transport http bugtape https://app.bugtape.ai/mcp \
  --header "Authorization: Bearer bt_pat_YOUR_TOKEN"
```

## Cursor

### One-command connect

```bash
npx -y bugtape connect cursor
```

This writes `.cursor/mcp.json`. Use `--global` for user-wide settings, as the CLI docs describe.

### OAuth / URL only

Add this under `mcpServers.bugtape`:

```json
{
  "mcpServers": {
    "bugtape": {
      "url": "https://app.bugtape.ai/mcp"
    }
  }
}
```

Cursor shows **Needs login**. Complete **Allow** in the browser.

### With a token

Save this in `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (user):

```json
{
  "mcpServers": {
    "bugtape": {
      "url": "https://app.bugtape.ai/mcp",
      "headers": {
        "Authorization": "Bearer bt_pat_YOUR_TOKEN"
      }
    }
  }
}
```

## Codex

### One-command connect

```bash
npx -y bugtape connect codex
```

### With a token (env var — do not put the PAT in the repo)

Set `BUGTAPE_MCP_TOKEN` in the environment that launches Codex. Load it from a password manager or OS keychain. Do not put the PAT in shell history, `config.toml`, source files, or the repository.

```bash
codex mcp add bugtape \
  --url https://app.bugtape.ai/mcp \
  --bearer-token-env-var BUGTAPE_MCP_TOKEN
```

Codex stores the URL and the environment variable **name** in its TOML config, then reads the token from `BUGTAPE_MCP_TOKEN` when it connects. Do not reuse Cursor’s JSON shape for Codex.

## Scopes and security notes

What the agent may do comes from permissions (scopes) you grant at **Allow** time. Do not invent tool names and treat them as scopes.

From [MCP install](/docs/mcp-install/):

- **Pick up and fix** gives `subscribe`, `get_repro_context` and `suggest_fix`.
- **Follow and read** drops `suggest_fix`.
- Sign-in adds `create_bug` unless you untick it, and `setup_capture` when you tick it.
- Permissions are not tool names. There is no `subscribe` tool.

Also true on the live product and docs:

- Capture keys only send reports. They cannot open MCP.
- Agent tokens are limited to the projects and scopes you choose ([trust](/trust/), [llms.txt](/llms.txt)).
- On Free and Prepaid credits, each agent read of a bug’s captured events costs 2 credits (Free includes 150 a month). On Pro, those reads are free. See [MCP install](/docs/mcp-install/).

**You decide what ships.** The agent opens a pull request for review. Progress can go to Slack or email. BugTape does not replace human review of the pull request.

## After connect: first useful agent request

Prefer the ranked inbox over dumping every bug:

1. `subscribe_feed` with `deliveryFeed: "urgent_critical"` (also `all`, `ui_ux`).
2. `list_recommended_critical` — issues sent with **Send to agent**, or by auto-notify, appear first (`sentToYou`).
3. `get_repro_context` for the chosen bug.
4. `ack_bug` with `action: "working"`, then again with `prUrl` when the pull request is open.
5. Optional: `listen` on `bugtape://projects/{projectId}/inbox`.

Full tool contract: [MCP tools](/docs/mcp-tools/).
Repo snippet: [AGENTS.md example](/docs/examples/AGENTS.md).

## Capture still matters

MCP without capture is an empty inbox. Install an SDK or a script tag for your stack:

- Browser, Node, Python, and Swift — start at [Docs](/docs/) and [Python](/docs/python/)
- Or run `npx -y bugtape init`

Start free (no card): [Register](/console/register)

## Summary

| Client | Fastest path |
|---|---|
| Claude Code | `connect claude` or `claude mcp add --transport http …` |
| Cursor | `connect cursor` or `{"url": "https://app.bugtape.ai/mcp"}` |
| Codex | `connect codex` or `codex mcp add` plus `BUGTAPE_MCP_TOKEN` |

BugTape MCP: evidence in, a pull request out, a human reviews the pull request, and the fix is checked on the next release.
