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
vianaming 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.
| Setting | Remote (HTTP) | Local (stdio) |
|---|---|---|
| How | The 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. |
| Token | The header Authorization: Bearer sbp_... | The environment variable SHOWBUG_TOKEN |
| Another environment | Use that environment’s address, such as https://preprod-api.showbugai.com/mcp. | Set SHOWBUG_API_URL to its address. |
| Use it when | Your 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/mcpRun 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 userto use it in all your projects. --scope projectwrites the server into.mcp.jsonin your repository, which your team shares. Never put a token in that file. Refer to an environment variable instead, and let each person setSHOWBUG_TOKENwith 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
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
get_me | Show the user, the organisation, and the token’s name, scopes and expiry. | Any token | No |
get_org | Show the organisation. | org:read | No |
rename_org | Rename the organisation. | org:write | No |
Members and invites
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
list_members | List members and their roles. | members:read | No |
change_member_role | Change a member’s role. It cannot make or change an owner. | members:write | No |
remove_member | Remove a member, and revoke the tokens that person made. | members:write | Yes |
list_invites | List pending invites. | members:read | No |
create_invite | Invite someone by email. The invite link is also returned, once. | members:write | No |
resend_invite | Email an invite again, with a new link. The old link stops working. | members:write | No |
revoke_invite | Revoke a pending invite. | members:write | Yes |
Audit log
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
list_audit_events | Read the audit log, newest first, a page at a time. | audit:read | No |
Projects and allowed origins
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
list_projects | List projects. | projects:read | No |
get_project | Show a project with its keys. | projects:read | No |
create_project | Create a project. It comes with a key labelled Default. | projects:write | No |
update_project | Change a project’s name, status, limits or review setting. Use the origin tools for origins. | projects:write | No |
list_allowed_origins | List the origins allowed to use a project’s keys. | projects:read | No |
add_allowed_origin | Allow one more origin. Adding one that is there changes nothing. | projects:write | No |
remove_allowed_origin | Stop allowing an origin. | projects:write | Yes |
SDK keys
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
list_project_keys | List a project’s SDK keys. | keys:read | No |
create_project_key | Create an SDK key. | keys:write | No |
revoke_project_key | Revoke an SDK key. | keys:write | Yes |
Integrations
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
list_integrations | List a project’s integrations. Secrets are never returned. | integrations:read | No |
list_integration_options | List what an integration can target: Linear teams and labels, or GitHub repositories and labels. | integrations:read | No |
connect_linear_api_key | Connect Linear with an API key. | integrations:write | No |
connect_github_token | Connect GitHub with a personal access token. | integrations:write | No |
create_webhook | Create a webhook. The signing secret is returned once. | integrations:write | No |
update_integration | Change an integration: its team, repository, URL, events or status. | integrations:write | No |
test_integration | Send a test delivery, or check the stored credentials. | integrations:write | No |
rotate_webhook_secret | Make a new signing secret. The old one keeps working for 24 hours. | integrations:write | Yes |
remove_integration | Remove an integration and cancel its pending deliveries. | integrations:write | Yes |
Deliveries and sessions
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
list_deliveries | List what was sent to integrations, newest first, a page at a time. | integrations:read | No |
retry_delivery | Queue a failed delivery again. | integrations:write | No |
list_sessions | List recorded sessions, newest first, a page at a time. | sessions:read | No |
get_session | Show one session with its transcript, summary and ticket state. | sessions:read | No |
retry_session_tickets | Queue a session’s failed ticket deliveries again. | integrations:write | No |
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_keyorconnect_github_tokeninstead. - 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
destructiveHintannotation. Keep your client’s confirmation prompt on for them. Tools that only read carryreadOnlyHint, 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_secretandcreate_invitereturn a secret once, andconnect_linear_api_keyandconnect_github_tokentake 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.
| Prompt | Scopes |
|---|---|
| “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.