For AI agents and coding assistants

Bugsly for AI agents

Send errors from agent-written code with a Sentry SDK, then let Claude Code, Cursor or Claude Desktop read and triage them over MCP or the REST API.

What agents can do

MCP over stdio

A local server with 16 tools to list and read issues, inspect stack traces, resolve or ignore them, and check usage and monitors.

REST API

The same bearer token calls the REST API the dashboard uses, so scripts and agents without MCP support can read issues too.

Sentry-compatible ingest

Send errors with a Sentry SDK pointed at a Bugsly DSN. Nothing agent-specific to learn.

Revocable, expiring tokens

Agent tokens start with bgs_, expire after 90 days, are stored only as a hash, and can be revoked in Settings. A token cannot create other tokens.

A human pays

An agent can fetch a checkout link, but a person completes payment in the browser.

Not covered yet

No hosted MCP endpoint or OAuth connector, no MCP tool for AI analysis, alert rules or deleting projects. Use the dashboard for those.

Setup

1

Get a token

With an account: Settings, AI Agent / MCP, Generate Token. Without a browser: one call creates an account, an organization, a project and a 90-day token. Signup is rate limited to 5 requests per minute per IP.

curl -X POST https://bugsly.dev/api/v1/auth/agent-signup \
  -H "Content-Type: application/json" \
  -d '{"name": "my-agent"}'

# Returns: token (bgs_...), expires_at, org_id, project_id, dsn
2

Send errors with a Sentry SDK and your DSN

Bugsly accepts the Sentry envelope format, so a Sentry SDK pointed at the DSN works. @bugsly/node is a thin wrapper around @sentry/node.

npm install @bugsly/node

import * as Bugsly from "@bugsly/node";

Bugsly.init({ dsn: "https://<public_key>@bugsly.dev/<project_id>" });

try {
  await riskyOperation();
} catch (err) {
  Bugsly.captureException(err);
}
3

Connect your coding agent over MCP (stdio)

Needs Node.js 18.17 or newer. Replace YOUR_BUGSLY_TOKEN with the bgs_ token. In a committed .mcp.json write "${BUGSLY_TOKEN}" and export the variable instead, so the token stays out of git.

# Claude Code
claude mcp add bugsly -e BUGSLY_TOKEN=YOUR_BUGSLY_TOKEN -- npx -y @bugsly/mcp-server

# Cursor: ~/.cursor/mcp.json   Claude Desktop: claude_desktop_config.json
{
  "mcpServers": {
    "bugsly": {
      "command": "npx",
      "args": ["-y", "@bugsly/mcp-server"],
      "env": { "BUGSLY_TOKEN": "YOUR_BUGSLY_TOKEN" }
    }
  }
}
4

Or call the REST API directly

The MCP tools are thin wrappers over these endpoints; the same bearer token works for both.

curl https://bugsly.dev/api/v1/organizations \
  -H "Authorization: Bearer YOUR_BUGSLY_TOKEN"

curl "https://bugsly.dev/api/v1/projects/PROJECT_ID/issues?status=unresolved" \
  -H "Authorization: Bearer YOUR_BUGSLY_TOKEN"

# Revoke a token (id from GET /api/v1/auth/api-tokens)
curl -X DELETE https://bugsly.dev/api/v1/auth/api-tokens/TOKEN_ID \
  -H "Authorization: Bearer YOUR_BUGSLY_TOKEN"

MCP tools

All available tools in @bugsly/mcp-server

list_projects

List the projects in your first organization, with their DSNs

create_project

Create a project and get its DSN

list_issues

List issues filtered by status, search, or sort

get_issue

Get one issue with metadata

get_issue_events

Get occurrences with stack traces and breadcrumbs

resolve_issue

Mark an issue resolved (changes it for everyone on the project)

ignore_issue

Mark an issue ignored (changes it for everyone on the project)

search_errors

Search issues by title keyword

get_project_stats

Get transaction performance stats

get_usage

Check issues used, limit and plan

get_crash_free

Get crash-free sessions % and users % (release health)

get_checkout_url

Create a Polar checkout link for the Team or Business plan, for a human to pay

list_monitors

List cron monitors for a project

get_monitor

Get a cron monitor's recent check-ins

list_uptime_monitors

List uptime monitors for a project

get_uptime_status

Get uptime %, average and p95 latency

Frequently Asked Questions

What can an AI agent do through Bugsly?

Two things. It can send errors: any Sentry-compatible SDK pointed at a Bugsly DSN works. And it can read and triage them: the local MCP server (@bugsly/mcp-server, 16 tools) or the REST API lists issues, shows stack traces and breadcrumbs, and can mark an issue resolved or ignored. It does not write code by itself; your coding agent does that using what it reads.

Does Bugsly have an MCP server?

Yes: @bugsly/mcp-server runs locally over stdio through npx and authenticates with a token in the BUGSLY_TOKEN environment variable. There is no hosted MCP endpoint and no OAuth sign-in, so it cannot be added as a one-click connector in claude.ai or ChatGPT.

How do I revoke an agent token?

Open your project, Settings, AI Agent / MCP, and press Revoke next to the token under Your agent tokens. A revoked token stops working immediately. Tokens also expire after 90 days. Tokens issued before this change were 365-day JWTs that do not start with bgs_; they keep working until they expire and cannot be revoked individually.

How can an agent pay for a paid plan?

It cannot pay by itself. The get_checkout_url tool creates a Polar checkout link for the Team ($19/month) or Business ($49/month) plan and the agent hands it to a human, who pays in the browser. The tool needs an organization admin or owner, and nothing is charged until the human completes the checkout.

What are the Free plan limits?

100 issues per month (distinct bugs, not events), 7-day event retention, 1 user, and 10 AI requests per month. Events are not billed, but there is a ceiling of 50,000 events per month on Free. Cron and uptime monitors are not included on Free. Team and Business limits are on the pricing page.

What happens to an account created by agent-signup?

It is an ordinary Bugsly account with an organization and a project named default. Like any new account it starts with Team-plan limits for 7 days and then moves to the Free plan unless a paid plan is active. It has no password and no email you control, so the token (and the DSN in the response) are the only way in; when the token expires, sign up again or use a real account.

Free plan limits

100 issues per month, 7-day retention, 1 user, 10 AI requests per month, and a 50,000 events per month ceiling. Team ($19/month) and Business ($49/month) raise these; see the pricing page.

See pricing