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 Linear, GitHub, Slack and 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 | The examples on this page use this environment’s address. For another, use its API address from Base URLs, followed by /mcp. | Set SHOWBUG_API_URL to its API address. The examples on this page set this environment’s; without it the bridge uses production. |
| 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_... --env SHOWBUG_API_URL=https://api.showbugai.com -- 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}",
"SHOWBUG_API_URL": "https://api.showbugai.com"
}
}
}
}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_...", "SHOWBUG_API_URL": "https://api.showbugai.com" }
}
}
}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.
Linear and GitHub are connected once for the organisation (connect_linear_api_key, connect_github_token), then create_integration sends a project’s reports through that connection to a Linear team or a GitHub repository. Pick the team or repository with list_connection_options.
Account
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
get_me | Show who the credential is. | Any token | No |
Organisation
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
get_org | Get the organisation. | org:read | No |
rename_org | Rename the organisation. | org:write | No |
Members
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
list_members | List members. | members:read | No |
change_member_role | Change a member's role. | members:write | No |
remove_member | Remove a member. | members:write | Yes |
Invites
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
list_invites | List pending invites. | members:read | No |
create_invite | Invite someone to the organisation. | members:write | No |
resend_invite | Email an invite again. | members:write | No |
revoke_invite | Revoke a pending invite. | members:write | Yes |
Audit log
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
list_audit_events | List the audit log. | audit:read | No |
Projects
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
list_projects | List projects. | projects:read | No |
create_project | Create a project. | projects:write | No |
get_project | Get a project with its keys. | projects:read | No |
update_project | Update a project. | projects:write | No |
Allowed origins
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
list_allowed_origins | List a project's allowed origins. | projects:read | No |
add_allowed_origin | Allow a page's origin to use the project's keys. | projects:write | No |
remove_allowed_origin | Stop allowing a page's 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 |
get_install_snippet | Get the script tag that installs the widget. | keys:read | 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. | integrations:read | No |
create_integration | Send a project's reports to Linear or GitHub. | integrations:write | No |
create_webhook | Create a webhook integration. | integrations:write | No |
create_slack_integration | Post a project's reports to Slack. | integrations:write | No |
update_integration | Update an integration. | integrations:write | No |
remove_integration | Remove an integration. | integrations:write | Yes |
test_integration | Test an integration. | integrations:write | No |
send_test_issue | Send a test issue. | integrations:write | No |
rotate_webhook_secret | Rotate a webhook's signing secret. | integrations:write | Yes |
list_connections | List the organisation's connections. | 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 |
list_connection_options | List what a connection can target. | integrations:read | No |
test_connection | Test a connection. | integrations:write | No |
disconnect_connection | Disconnect Linear or GitHub. | integrations:write | Yes |
Deliveries
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
list_deliveries | List the delivery log. | integrations:read | No |
retry_delivery | Retry a delivery. | integrations:write | No |
Sessions
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
list_sessions | List recorded sessions. | sessions:read | No |
get_session_triage_counts | Count the sessions that need triage. | sessions:read | No |
bulk_update_sessions | Triage several sessions at once. | sessions:write | No |
get_session | Get a session. | sessions:read | No |
update_session | Triage a session. | sessions:write | No |
retry_session_tickets | Retry a session's failed ticket deliveries. | integrations:write | No |
Saved views
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
list_saved_views | List saved views. | sessions:read | No |
create_saved_view | Save a view. | sessions:write | No |
update_saved_view | Change a saved view. | sessions:write | No |
delete_saved_view | Delete a saved view. | sessions:write | Yes |
Comments
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
list_session_comments | List a session's comments. | comments:read | No |
create_session_comment | Comment on a session. | comments:write | No |
update_session_comment | Edit a comment. | comments:write | No |
delete_session_comment | Delete a comment. | comments:write | Yes |
Insights
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
list_session_facets | Count sessions by environment. | sessions:read | No |
get_org_stats | Get the organisation's trends. | sessions:read | No |
Notifications
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
get_notification_preferences | Get your notification preferences. | notifications:read | No |
update_notification_preferences | Change your notification preferences. | notifications:write | No |
Usage
| Tool | What it does | Scope | Destructive |
|---|---|---|---|
get_usage | Get the plan and usage. | usage:read | 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. - Deleting a session. Only an admin or owner signed in to the dashboard can, so no API token can, through MCP or REST.
- 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, and connect it for the whole organisation. 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 |
| “Connect our Linear workspace with this API key, then send the Checkout project’s reports to the Web team.” | integrations:write |
| “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.