Docs · Bugzor MCP server

AI agents

Bugzor MCP server

Bugzor has a built-in Model Context Protocol (MCP) server. Point an AI coding agent at it and the agent can look up an error, read its stack trace and breadcrumbs, open the trace behind it, search your logs, check a cron job, and resolve or assign the issue, without you copy-pasting from the dashboard.

It works for one workspace: the one the API token belongs to.

  • Endpoint: https://www.bugzor.com/mcp
  • Transport: Streamable HTTP (JSON-RPC over POST)
  • Auth: Authorization: Bearer bgz_… (a workspace API token)

Create a token#

Owners and admins create tokens under Settings → API tokens. For an agent that only looks things up, pick the read scopes:

Text
issues:read  projects:read  org:read  traces:read  logs:read  crons:read

To let it triage as well, add issues:write (resolve, ignore, reopen, assign) and crons:write (mute monitors). A token can’t be edited later, so create a new one if you need more scopes. Each tool lists the scopes it needs, and a tool the token can’t use returns an error that names the missing scope. Treat the token like a password: keep it in an environment variable or your secret store, never in a repository.

Connect your agent#

Claude Code#

Terminal
export BUGZOR_TOKEN=bgz_…
claude mcp add --transport http bugzor https://www.bugzor.com/mcp \
  --header "Authorization: Bearer $BUGZOR_TOKEN"

Cursor#

Add to .cursor/mcp.json (or ~/.cursor/mcp.json), with BUGZOR_TOKEN set in your environment:

JSON
{
  "mcpServers": {
    "bugzor": {
      "url": "https://www.bugzor.com/mcp",
      "headers": { "Authorization": "Bearer ${env:BUGZOR_TOKEN}" }
    }
  }
}

VS Code#

Add to .vscode/mcp.json. VS Code asks for the token once and keeps it out of the file:

JSON
{
  "inputs": [
    { "type": "promptString", "id": "bugzor-token", "description": "Bugzor API token", "password": true }
  ],
  "servers": {
    "bugzor": {
      "type": "http",
      "url": "https://www.bugzor.com/mcp",
      "headers": { "Authorization": "Bearer ${input:bugzor-token}" }
    }
  }
}

Any other client#

Use the endpoint above with a remote (HTTP) MCP server and an Authorization header. The server is stateless: no sessions, no server-sent events. Ask the agent to call whoami first: it shows the workspace, the token’s scopes, and which tools that token can use.

What to ask#

  • “What are the three noisiest unresolved errors in production this week?”
  • “Look at issue 1234. What’s the stack trace, what did the user do before it, and what release introduced it?”
  • “Open the trace for that error. Which span is slow?”
  • “Find the slowest POST /checkout request today and show me where the time went.”
  • “Search the logs for payment gateway timeout around that trace.”
  • “Did the nightly-report job run last night?”
  • “Resolve everything from the 1.4.2 release that’s already fixed and assign the rest to Sam.”

Tools#

Lists are paged: pass a result’s next_cursor back as cursor. Results are size-limited and say when they were truncated.

Workspace#

ToolWhat it doesScope
whoamiWorkspace, token name and scopes, available tools, who writes act asany
list_projectsProjects with id, slug, platformprojects:read
get_projectOne project with its public DSN and 24-hour numbersprojects:read
list_membersMembers with roleorg:read
get_activityNew issues and regressions in a windowissues:read
get_statsPer-project events, new issues and users in a windowissues:read, projects:read
get_usageBilling-period usage and the trace/log storage caporg:read

Issues and events#

ToolWhat it doesScope
list_issuesIssues by status, project, environment, level, assignee, text, timeissues:read
search_issuesIssues whose title or culprit contains textissues:read
get_issueCounts, first/last seen, assignee, regressed time, latest event summaryissues:read
get_issue_eventsAn issue’s events, compact, newest firstissues:read
get_eventA full event: stack frames with source, breadcrumbs, tags, request, user, trace idsissues:read
get_latest_eventThe same, for the newest eventissues:read
list_releasesReleases with crash-free sessions and error countsissues:read
get_releaseA release’s issues, marking the ones it introducedissues:read

Traces and logs#

ToolWhat it doesScope
get_traceA trace as a span tree with durations, self time, hotspots and linked errorstraces:read
get_issue_traceThe trace behind an issue’s eventtraces:read, issues:read
list_transactionsTransactions by name with count, p50, p95 and failure ratetraces:read
list_tracesIndividual transactions, newest or slowest first, with trace idstraces:read
get_spanOne span with all its attributestraces:read
list_profilesRecent profiles (per request, or continuous chunks) with ids, platform, release and a link; where your plan has the Profilertraces:read
get_profileOne profile: metadata, threads, and the hottest functions by own and total timetraces:read
profile_hot_functionsThe hottest functions of a project, release, environment or transaction over up to 30 days, with sharestraces:read
get_flamegraphCollapsed stacks (root first, heaviest first), for a window or one profiletraces:read
profile_diffTwo releases, or this window against the one before: functions that got hotter or cooler; no claim without enough samplestraces:read
trace_profileThe profile behind one trace id, or a plain “no profile”traces:read
search_logsLogs by text, level, project, trace and timelogs:read
get_trace_logsEvery log line of one tracelogs:read

Cron monitors#

ToolWhat it doesScope
list_monitorsMonitors with schedule, last status and recent runscrons:read
get_monitorOne monitor: next expected run, missed-run outage, run historycrons:read
mute_monitorStop notifications for a monitorcrons:write
unmute_monitorTurn them back oncrons:write

Changing issues#

ToolWhat it doesScope
resolve_issueMark resolved (it reopens as a regression if it happens again)issues:write
ignore_issueMark ignoredissues:write
reopen_issueMark unresolvedissues:write
assign_issueAssign to a member by emailissues:write
unassign_issueRemove the assigneeissues:write
bulk_update_issuesSet a status and/or assignee on up to 100 issues, reporting each resultissues:write

Who changes things#

Changes are made as the member who created the token, with that member’s role. They go through the same checks as the dashboard (a lapsed subscription is read-only) and appear in the workspace audit log, marked as made through the token.

Integrations that act for many people, such as a chat bot, can use a token with the owner-only act:member scope and send Bugzor-Act-As: person@example.com. The change is then made, and audited, as that member. A token without act:member that sends the header is refused.

Limits and what’s left out#

  • Rate limit: about 120 requests per minute per token, in bursts. Over the limit you get HTTP 429 and a Retry-After header.
  • Size: a result is capped at about 120 KB. Stack traces keep the frames nearest the crash, breadcrumbs keep the most recent ones, and the result says what it left out. Use the max_frames, max_spans and limit arguments to ask for more or less.
  • Secrets: Bugzor removes values stored under keys such as password, token, authorization, cookie and api_key, and Bugzor tokens, from events, spans and logs before sending them to the agent. Free text such as an exception message is sent as your app reported it, so keep credentials out of messages. The public DSN key is shown; secret keys never are.
  • Your data stays in your workspace: a token only ever sees the workspace it belongs to.
  • Retention: traces and logs are available for as long as your plan keeps them.
  • Not included: Bugzor stores the raised exception of an event, not its chain of causes. “Ignore until” and issue comments aren’t available yet.

Troubleshooting#

  • 401 Unauthorized: the token is missing, mistyped or revoked. It must start with bgz_.
  • “This token is missing the scope …”: create a token with that scope; scopes can’t be added to an existing one.
  • A trace or log tool says storage isn’t configured: traces and logs need the Rich Trace Logs storage of your plan.
  • 429: wait for Retry-After seconds, and ask the agent to make fewer, larger requests.

Something unclear or out of date? Tell us.