Skip to content

Automate

MCP server

Let Claude Code, Cursor and other AI agents manage your Showbug account.

The Model Context Protocol (MCP) lets an AI agent such as Claude Code or Cursor call tools. Showbug runs an MCP server, so an agent can manage your account with the same API token, permissions and audit log as the REST API.

What it does

  • Most operations a token can call are tools: listing and creating projects, adding origins, creating and revoking SDK keys, connecting webhooks, reading sessions and failed deliveries, and so on. The list below has them all.
  • Tools act in the token’s organisation, so none of them takes an organisation id.
  • A tool call runs through the same checks as a REST call: the token’s scopes, its creator’s role and the rate limit. Changes are written to the audit log with via naming the token.
  • Only an API token works. A dashboard sign-in is not accepted.

There are two ways to connect. Both use the same token.

SettingRemote (HTTP)Local (stdio)
HowThe client sends requests to POST https://api.showbugai.com/mcp. Nothing to install.The client starts bunx @showbug/mcp, a small bridge that forwards to the same endpoint.
TokenThe header Authorization: Bearer sbp_...The environment variable SHOWBUG_TOKEN
Another environmentUse that environment’s address, such as https://preprod-api.showbugai.com/mcp.Set SHOWBUG_API_URL to its address.
Use it whenYour client supports remote MCP servers and custom headers.Your client only starts local programs, or cannot send headers.

Treat the token like a password

An agent with a token can do what the token allows, as its creator. Create a token for the agent with only the scopes it needs, and a short expiry. See Safety.

Claude Code

Create a token under Settings → API tokens, then add the server. For the remote server:

claude mcp add --transport http showbug https://api.showbugai.com/mcp --header "Authorization: Bearer sbp_..."

Or run the local bridge:

claude mcp add showbug --env SHOWBUG_TOKEN=sbp_... -- bunx @showbug/mcp

Run claude mcp list to see that it connects, or type /mcp inside Claude Code. Then ask something that needs the token, such as “Which Showbug organisation is my token for?”. Claude Code calls get_me.

  • By default the server is private to you and to the current project. Add --scope user to use it in all your projects.
  • --scope project writes the server into .mcp.json in your repository, which your team shares. Never put a token in that file. Refer to an environment variable instead, and let each person set SHOWBUG_TOKEN with a token of their own:
{
  "mcpServers": {
    "showbug": {
      "type": "http",
      "url": "https://api.showbugai.com/mcp",
      "headers": { "Authorization": "Bearer ${SHOWBUG_TOKEN}" }
    }
  }
}

Cursor

Add the server to .cursor/mcp.json in a project, or to ~/.cursor/mcp.json for every project. For the remote server:

{
  "mcpServers": {
    "showbug": {
      "url": "https://api.showbugai.com/mcp",
      "headers": { "Authorization": "Bearer ${env:SHOWBUG_TOKEN}" }
    }
  }
}

Or for the local bridge:

{
  "mcpServers": {
    "showbug": {
      "command": "bunx",
      "args": ["@showbug/mcp"],
      "env": { "SHOWBUG_TOKEN": "${env:SHOWBUG_TOKEN}" }
    }
  }
}

Cursor replaces ${env:SHOWBUG_TOKEN} with the variable from its own environment, so the token stays out of the file. Start Cursor from a terminal where SHOWBUG_TOKEN is set, or set it in your system environment. If you paste the token into the file instead, keep the file out of version control.

Other clients

Use the remote form when the client supports remote MCP servers over streamable HTTP with custom headers. The server is stateless and answers with JSON. Give the client these two things:

  • The address https://api.showbugai.com/mcp.
  • The header Authorization: Bearer sbp_....

Otherwise use the local bridge. Most clients that start local servers, including desktop apps, take a configuration like this:

{
  "mcpServers": {
    "showbug": {
      "command": "bunx",
      "args": ["@showbug/mcp"],
      "env": { "SHOWBUG_TOKEN": "sbp_..." }
    }
  }
}

bunx comes with Bun. Without Bun, npx -y @showbug/mcp runs the same bridge with Node.js 20 or later: use npx as the command and -y and @showbug/mcp as its arguments. If the client cannot find the command, give it the full path, which which bunx prints.

Tools

A tool is named after its API operation, in snake_case: listProjects is list_projects. Its arguments are the operation’s path, query and body fields, such as project_id and origin for add_allowed_origin. Creates also take an optional idempotencyKey, so a retry cannot make a duplicate. Your client shows each tool’s full schema.

Scope is what the token needs. Destructive tools delete or revoke something, or replace a secret.

Account and organisation

ToolWhat it doesScopeDestructive
get_meShow the user, the organisation, and the token’s name, scopes and expiry.Any tokenNo
get_orgShow the organisation.org:readNo
rename_orgRename the organisation.org:writeNo

Members and invites

ToolWhat it doesScopeDestructive
list_membersList members and their roles.members:readNo
change_member_roleChange a member’s role. It cannot make or change an owner.members:writeNo
remove_memberRemove a member, and revoke the tokens that person made.members:writeYes
list_invitesList pending invites.members:readNo
create_inviteInvite someone by email. The invite link is also returned, once.members:writeNo
resend_inviteEmail an invite again, with a new link. The old link stops working.members:writeNo
revoke_inviteRevoke a pending invite.members:writeYes

Audit log

ToolWhat it doesScopeDestructive
list_audit_eventsRead the audit log, newest first, a page at a time.audit:readNo

Projects and allowed origins

ToolWhat it doesScopeDestructive
list_projectsList projects.projects:readNo
get_projectShow a project with its keys.projects:readNo
create_projectCreate a project. It comes with a key labelled Default.projects:writeNo
update_projectChange a project’s name, status, limits or review setting. Use the origin tools for origins.projects:writeNo
list_allowed_originsList the origins allowed to use a project’s keys.projects:readNo
add_allowed_originAllow one more origin. Adding one that is there changes nothing.projects:writeNo
remove_allowed_originStop allowing an origin.projects:writeYes

SDK keys

ToolWhat it doesScopeDestructive
list_project_keysList a project’s SDK keys.keys:readNo
create_project_keyCreate an SDK key.keys:writeNo
revoke_project_keyRevoke an SDK key.keys:writeYes

Integrations

ToolWhat it doesScopeDestructive
list_integrationsList a project’s integrations. Secrets are never returned.integrations:readNo
list_integration_optionsList what an integration can target: Linear teams and labels, or GitHub repositories and labels.integrations:readNo
connect_linear_api_keyConnect Linear with an API key.integrations:writeNo
connect_github_tokenConnect GitHub with a personal access token.integrations:writeNo
create_webhookCreate a webhook. The signing secret is returned once.integrations:writeNo
update_integrationChange an integration: its team, repository, URL, events or status.integrations:writeNo
test_integrationSend a test delivery, or check the stored credentials.integrations:writeNo
rotate_webhook_secretMake a new signing secret. The old one keeps working for 24 hours.integrations:writeYes
remove_integrationRemove an integration and cancel its pending deliveries.integrations:writeYes

Deliveries and sessions

ToolWhat it doesScopeDestructive
list_deliveriesList what was sent to integrations, newest first, a page at a time.integrations:readNo
retry_deliveryQueue a failed delivery again.integrations:writeNo
list_sessionsList recorded sessions, newest first, a page at a time.sessions:readNo
get_sessionShow one session with its transcript, summary and ticket state.sessions:readNo
retry_session_ticketsQueue a session’s failed ticket deliveries again.integrations:writeNo

These operations are not tools:

  • Managing API tokens and creating organisations. They need a person signed in to the dashboard. See API tokens.
  • Connecting Linear or GitHub in a browser, which needs a person to approve. Use connect_linear_api_key or connect_github_token instead.
  • Downloading a session’s page replay events and screen recording. They are too large for an agent. Use the REST API or the dashboard.

Each result is the API’s JSON answer, as text. A result over 100,000 characters is cut off, with a note to ask for less: pass limit, or page with cursor. A failed call returns an error result with the API’s error body, so the codes on the REST API page apply.

The tool list is filtered by the token: an agent is shown only the tools its scopes allow, so a read-only token never sees create_project. That is a courtesy, not the lock. The API checks the scope on every call, and one the token lacks is refused with insufficient_scope.

Safety

  • Destructive tools are labelled. Their description starts with “DESTRUCTIVE, cannot be undone: confirm with the user before calling”, and they carry the MCP destructiveHint annotation. Keep your client’s confirmation prompt on for them. Tools that only read carry readOnlyHint, so a client can run them without asking.
  • Give the agent the fewest scopes. A token with only read scopes cannot change anything, so use one to explore. Add write scopes only for a task that needs them.
  • Choose a short expiry. A few days is enough for most agent sessions. Revoke the token when you are done.
  • Treat session data as untrusted. A session holds what a visitor said and what their page showed. Text in a report could try to give an agent instructions. If an agent reads sessions, do not also give it a token that can change keys, members or integrations. Use a read-only token for reading sessions.
  • Secrets pass through the conversation. create_webhook, rotate_webhook_secret and create_invite return a secret once, and connect_linear_api_key and connect_github_token take a provider credential as an argument. Your client may keep what is said in a conversation. For these, the dashboard may be the better place.
  • Everything is recorded and limited. Changes an agent makes are in the audit log, marked with the token. The token is limited to 120 requests a minute, so an agent stuck in a loop cannot run away.

Example prompts

Prompts to try, and the scopes the token needs for each. You can name a project in plain words: the agent finds its id with list_projects.

PromptScopes
“List my Showbug projects and tell me which ones have no allowed origins.”projects:read
“Create a project called Acme staging that allows https://staging.acme.example, and give me its public key.”projects:write
“Add https://preview-42.acme.example to the allowed origins of the Marketing site project.”projects:write
“Show the failed deliveries for the Checkout project and retry the ones that failed with a 5xx error.”projects:read, integrations:write
“Summarise the five most recent sessions of the Marketing site project, and tell me which have no ticket.”projects:read, sessions:read
“What changed in this organisation this week, and which changes came from API tokens?”audit:read
“Revoke the SDK key labelled old-prod on the Checkout project.”keys:write

The last prompt uses a destructive tool, so your client should ask you to confirm before it runs.