# backlogzero for coding agents

backlogzero (https://backlogzero.xyz) is an issue tracker. This guide connects you, a coding agent, to it for the person who asked you, and says how to work there. You act as that person, with only what they allow.

There are two ways in. Pick the first that works:

1. **MCP**, if your client speaks MCP 2026-07-28 with OAuth (Claude Code does; Codex as an opt-in). Tools appear as `issue_queue`, `issue_claim`, `issue_get`, …
2. **The `bz` CLI**, wherever you can run shell commands. Same actions, same permissions.

Never ask the person to paste a key or token into the chat. They type it into a prompt or their own terminal.

## 1. MCP

Server: `https://backlogzero.xyz/mcp`

### Claude Code

```sh
claude mcp add --transport http backlogzero https://backlogzero.xyz/mcp
```

Sign-in: the person runs `claude mcp login backlogzero` in their own terminal (it needs an interactive terminal), or the client asks on first use.

### Codex (`~/.codex/config.toml`)

```toml
[mcp_servers.backlogzero]
url = "https://backlogzero.xyz/mcp"
```

Sign-in: the person runs `codex mcp login backlogzero` in their own terminal (it needs an interactive terminal), or the client asks on first use.

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "backlogzero": {
      "url": "https://backlogzero.xyz/mcp"
    }
  }
}
```

Sign-in: the client opens the browser on first use.

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "backlogzero": {
      "type": "http",
      "url": "https://backlogzero.xyz/mcp"
    }
  }
}
```

Sign-in: the client opens the browser on first use.

What the person sees: their browser opens backlogzero's sign-in, then a consent screen where they pick the organization and what you may do. For engineering work they keep **Edit issues**, **Assign issues** (claiming) and **Comment** on. Deleting stays off unless they need it.

After signing in, start a new session of your client: MCP tools load when a session starts. Check with `issue_queue` and `{"queue":"mine"}`.

If the server refuses your client (a 2025 MCP revision, or no OAuth), use `bz` instead.

## 2. The bz CLI

Needs Node 20 or later (`node --version`), or Bun.

Install, macOS and Linux (`~/.local/bin` must be on the PATH):

```sh
mkdir -p ~/.local/bin
curl -fsSL https://backlogzero.xyz/cli/bz.mjs -o ~/.local/bin/bz
chmod +x ~/.local/bin/bz
bz --version
```

Install, Windows PowerShell:

```powershell
New-Item -ItemType Directory -Force "$HOME\.backlogzero" | Out-Null
Invoke-WebRequest https://backlogzero.xyz/cli/bz.mjs -OutFile "$HOME\.backlogzero\bz.mjs"
function bz { node "$HOME\.backlogzero\bz.mjs" @args }
bz --version
```

Point it at this instance:

```sh
bz config set url https://backlogzero.xyz
```

Give it a key. The person makes one in the dashboard (https://backlogzero.xyz/dashboard, Settings → API keys: name it after you, pick the organization and permissions), then either runs `bz config set key` and pastes it (end the input with Ctrl+D, or Ctrl+Z and Enter on Windows), or sets `BZ_API_KEY` in the environment you run in. bz refuses a key given as an argument.

Check it:

```sh
bz whoami
```

## Working in backlogzero

- Add `--json` to every command: stdout is one JSON value, errors are problem details on stderr. Exit codes: 0 done, 1 refused or unreachable, 2 wrong usage (nothing was sent).
- Name issues by key (`PLT-12`). Every issue action takes `key` in place of `issueId`, over MCP and in `bz action`.
- `bz actions` lists every action with its description; `bz action NAME '<json>'` runs any of them. Over MCP each is a tool named with `_` for `.` (`issue.claim` is `issue_claim`).

Everyday commands:

```sh
bz issue list --mine --open
bz issue show PLT-12
bz issue create --team PLT --title "Fix the export" --priority high
bz issue state PLT-12 "In Progress"
bz issue comment PLT-12 "Found the cause: …"
bz actions
```

### Engineer: your urgent work, claim it, read it, hand off the PR

```sh
bz action issue.queue '{"queue":"mine"}'
bz action issue.queue '{"queue":"available"}'
bz action issue.claim '{"key":"PLT-12"}'
bz issue show PLT-12
bz action handoff.report '{"key":"PLT-12","prUrl":"https://github.com/acme/app/pull/7","headSha":"<commit>","summary":"What changed","tests":[{"name":"unit","outcome":"passed"}],"readyForQa":true}'
```

### QA: what waits for QA, claim it, read the evidence, report on the tested commit

```sh
bz action issue.queue '{"queue":"qa"}'
bz action issue.claim '{"key":"PLT-12","expectedAssigneeId":"<engineer's actor id from the queue>"}'
bz action handoff.list '{"key":"PLT-12"}'
bz action handoff.reportQa '{"key":"PLT-12","prUrl":"https://github.com/acme/app/pull/7","sha":"<tested commit>","outcome":"passed","findings":"What you checked"}'
```

### Rules

- A claim never overwrites anyone: if someone else has the issue, it is refused and names them.
- Report evidence you have: the PR, its head commit, the tests you actually ran. It stays "reported" until the GitHub integration verifies it.
- QA passing moves the issue to ready to merge. The merge happens in the repository; never report one that did not happen.
- Proposals (planning) are reviewed and published only in the dashboard, by a person.

People can read the same in the browser: https://backlogzero.xyz/cli
