DevelopersAI assistants

MCP server

Rustrak's built-in MCP server lets Claude, Cursor, VS Code and other AI assistants read and triage your errors with 79 tools. Nothing to install.

Rustrak has a built-in Model Context Protocol server. Turn it on and Claude, Cursor, VS Code or any other MCP client can read and triage your errors with 79 tools. There is nothing to install: the client connects to your Rustrak instance at /mcp.

┌─────────────────────┐   Streamable HTTP    ┌─────────────────────┐
│  AI client          │ ───────────────────▶ │  Rustrak server     │
│  (Claude, Cursor…)  │   POST /mcp          │  /mcp  →  same      │
└─────────────────────┘   Bearer <token>     │  handlers as /api   │
                                             └─────────────────────┘

Every tool runs the same handler as the matching REST endpoint, so it has the same permission checks, the same validation and the same response shape as the API.

Replacing @rustrak/mcp: the npm package is deprecated. The tools keep their names, so swapping the client configuration below for your old npx @rustrak/mcp entry is the whole migration.

Setup

1. Turn it on

In the dashboard, open Settings → AI assistants (MCP) and switch the MCP server on. This takes mcp:update, which owners always hold, and it is off by default: until someone turns it on, /mcp answers 404.

The same page shows your endpoint URL and the configuration snippets below, already filled in.

2. Connect your assistant

There are two ways in, and both act as one user: the assistant can do what that user can, and nothing more. A member only reaches what their roles allow; an owner can do anything, including the destructive tools. An API token can narrow that further; an OAuth connection cannot.

Web assistants: sign in and approve (claude.ai, ChatGPT)

Add a custom connector with your endpoint URL, https://your-rustrak.example.com/mcp, and nothing else. The assistant opens Rustrak, you sign in (SSO included) and approve it, and it is connected. No token to copy.

Under the hood this is the OAuth 2.1 flow the MCP specification asks for, with Rustrak as its own authorization server: the assistant identifies itself with a Client ID Metadata Document, proves its request with PKCE, and gets an access token that lasts an hour and works only at /mcp. Its refresh token works once: every refresh replaces both.

Every connection is listed under Settings → AI assistants (MCP) → Connected assistants, where disconnecting one cuts it off at once. A refresh token presented twice means it was stolen, and ends the connection for whoever holds it.

Signing in needs DASHBOARD_URL or PUBLIC_URL. The MCP server is on the dashboard’s address: DASHBOARD_URL when it is set, PUBLIC_URL otherwise. The settings page shows the endpoint URL to give your assistant. The authorization server, the consent screen, the token endpoint and the resource the tokens are bound to are all named after that address, never after the request or the bind address. Without either address there is no sign-in to discover, and the settings page says so; API tokens still work.

Desktop and CLI clients: an API token (Claude Code, Cursor, VS Code)

Create a token in Settings → API Tokens (see API Tokens) and pass it as a header.

Claude Code

claude mcp add --transport http rustrak https://your-rustrak.example.com/mcp \
  --header "Authorization: Bearer your-40-char-token"
Shell

Cursor (~/.cursor/mcp.json) and other clients that read mcpServers:

{
  "mcpServers": {
    "rustrak": {
      "type": "http",
      "url": "https://your-rustrak.example.com/mcp",
      "headers": {
        "Authorization": "Bearer your-40-char-token"
      }
    }
  }
}
JSON

VS Code (.vscode/mcp.json, or MCP: Open User Configuration). VS Code asks for the token the first time and keeps it encrypted, so the file holds no secret and can be committed:

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

"type": "http" matters: a client that reads a URL without it, such as Claude Code’s .mcp.json, takes the entry for a local stdio server. The settings page shows these snippets with your own URL filled in.

How it works

  • Stateless. /mcp speaks protocol version 2026-07-28 over Streamable HTTP. Every call is one POST that carries its own token, and the server keeps nothing between calls, so the endpoint costs nothing while idle.
  • Bearer only. /mcp takes an OAuth access token or an API token. The dashboard’s session cookie is not accepted, so a browser tab cannot call tools for its user, and an OAuth token is not accepted anywhere but /mcp.
  • Errors are results. A failed call comes back as tool output with isError: true, so the assistant reads what went wrong instead of losing the call.
  • Destructive tools are marked with destructiveHint, and clients that support it ask before running them. The storage cleanup tools also require an explicit confirm=true.

Available tools

Projects

ToolDescription
list_projectsProjects you have access to
get_projectOne project, with its DSN
create_projectCreate a project

Issues

ToolDescription
list_issuesIssues of a project, filtered by state or free text
get_issueOne issue with its details
resolve_issue / unresolve_issueResolve or re-open an issue
mute_issueMute an issue so it stops alerting
update_issue_statusSet status (unresolved, resolved, ignored, resolvedInNextRelease), optionally the release it is resolved in (statusDetails), and priority
assign_issueAssign an issue, or clear the assignment
bulk_update_issuesSet status or priority on many issues
delete_issue⚠️ Delete an issue and its events
bulk_delete_issues⚠️ Delete issues by id or by state
get_issue_hashesGrouping hashes that map to an issue
get_issue_tag_valuesValues of one tag across an issue
get_issue_aggregatesAffected users and top tags
get_issue_statsEvent count over 24h or 30d
get_issue_activityStatus changes and comments
comment_on_issueAdd a comment
bookmark_issue / subscribe_issue / mark_issue_seenYour bookmark, subscription and seen state
list_user_reports / submit_user_reportUser feedback attached to an issue
list_feedbackA project’s user feedback, with what each user submitted

Events

ToolDescription
list_eventsOccurrences of an issue
get_eventOne event with its full Sentry payload and stack trace
get_attachmentA file sent with an event, such as a feedback’s screenshot: images come back as images

Performance, logs and AI agents

ToolDescription
list_transactions / get_transactionTransactions and one transaction’s payload
get_transaction_statsThroughput, p50/p95/p99 and failure rate per transaction
get_transaction_spansSpans of a transaction in waterfall order
list_spansSpans of a project, filterable by op, status, trace or AI operation
list_logsLogs, filterable by level or trace
get_agent_runs / get_agent_durationAI agent run counts and durations over time
get_agent_models_by_calls / get_agent_models_by_tokens / get_agent_toolsTop models and tools
list_agent_tracesAI agent traces with duration, tokens and tool calls

Health, stats and crons

ToolDescription
get_error_volumeError events over time by severity
get_project_statsHeadline counters against the previous window
get_release_healthCrash-free sessions and users per release
list_monitors / get_monitor / list_monitor_checkinsCron monitors and their check-ins
create_monitor / update_monitorCreate, reconfigure or mute a monitor
delete_monitor⚠️ Delete a monitor and its check-ins
preview_scheduleValidate a crontab or interval and list its next runs
get_server_versionThe server’s version

Alerts

ToolDescription
list_alert_channelsNotification channels
create_alert_channel / update_alert_channelCreate or change a channel
preview_alert_templateRender a custom webhook body against a sample alert
test_alert_channelSend a test notification
list_alert_rulesAlert rules of a project

Team, tokens and storage

Each tool needs the permission that its description names, such as storage:read, invitations:create or project-members:update. Token tools work on the caller’s own tokens; api-tokens:read and api-tokens:delete also reach everyone else’s. See Team & Access.

ToolDescription
list_team_members / update_member_roleUsers and their global role
remove_team_member⚠️ Remove a user from the instance
create_invitation / list_invitationsInvite by email
revoke_invitation⚠️ Revoke a pending invitation
list_project_members / set_project_memberA project’s members and their roles
remove_project_member⚠️ Remove a user from a project
list_tokens / get_tokenAPI tokens
revoke_token⚠️ Revoke a token
get_storage_summary / get_storage_by_projectWhat is using storage
preview_storage_cleanup / execute_storage_cleanup⚠️ Delete data older than N days, with confirm=true
get_storage_cleanup_statusProgress of the running cleanup
preview_storage_source_maps_gc / gc_storage_source_maps⚠️ Remove orphaned source maps, with confirm=true
get_retention / preview_retentionRetention settings and what they would delete
update_retention / run_retention⚠️ Save or enforce retention, with confirm=true

Tools marked ⚠️ are annotated with destructiveHint.

Example prompts

  • “List the unresolved issues in project 1”
  • “Show me the stack trace of the latest event of issue abc-123”
  • “Which transactions got slower this week?”
  • “Resolve every TypeError issue from the last release”
  • “Invite alice@example.com as a member and give me the invite link”

Security notes

  • Error events are written by the applications you monitor, so their text can be anything, including instructions aimed at an assistant. The server tells clients to treat event content as data, but review what an assistant proposes before letting it run destructive tools.
  • Give an assistant the least privileged token that does the job: limit it to the permissions and projects it needs. A token never exceeds its owner, and the MCP server cannot create tokens.
  • Disconnecting the assistant, revoking its token, disabling its user or turning the switch off cuts it off at once.
  • The consent screen cannot be framed by another site, and an authorization request whose client or redirect Rustrak cannot verify is refused without sending the browser anywhere.
Esc

Type to search guides, configuration and the API.