Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Sentry MCP server

Vendor MCP
Open markdown

The Sentry MCP connector routes your AI agent's tool calls to Sentry's own MCP server through Scalekit. Each user signs in to Sentry once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 9 tools.

Tools
9
What they doRead · write · destructive
6 · 1 · 26 read1 write2 destructive
Users sign in with
OAuth app
Your own Sentry MCP server app

What you can do

  • Search issues: find grouped errors by status, user impact, or query in natural language or Sentry syntax
  • Query events: search and aggregate errors, logs, spans, metrics, profiles, and replays across a project
  • Inspect resources: fetch issues, events, traces, replays, monitors, and breadcrumbs by URL or ID
  • Get root cause fixes: run Seer analysis on a production error to get file locations and concrete code fixes
  • Triage issues: resolve, reopen, ignore, or assign an issue to a teammate
  • Find organizations and projects: look up the organizations and projects a user can access by name or slug

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Sentry MCP connection

    In AgentKit > Connections, create a Sentry MCP connection and copy its redirect URI. The name you give it is the connection_name your code passes. See Configure connections.

  4. Register an OAuth app

    Sentry MCP server connections use your own OAuth app. Register one with Sentry MCP server and add the redirect URI you copied.

    Then enter the app's Client ID and Client Secret on the Sentry MCP connection.

  5. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'sentrymcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Sentry MCP:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'sentrymcp_find_organizations',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • sentrymcp_find_organizationsFind organizations that the user has access to in Sentry.Read-only

    Find Organizations

    Find organizations that the user has access to in Sentry. Supports filtering by name or slug. Returns up to 25 results.

    Inputs

    querystring
    Search query to filter results by name or slug. Use this to narrow down results when there are many items.
  • sentrymcp_find_projectsFind projects within a Sentry organization.Read-only

    Find Projects

    Find projects within a Sentry organization. Supports filtering by name or slug. Returns up to 25 results.

    Inputs

    organizationSlugstringrequired
    The organization's slug. Use the find_organizations tool to list available organizations.
    querystring
    Search query to filter results by project name or slug.
    regionUrlstring
    The region URL for the organization. For sentry.io, this is typically 'https://us.sentry.io'. Omit for self-hosted installations.
  • sentrymcp_get_sentry_resourceFetch a Sentry resource by URL, or by resourceType plus resourceId.Read-only

    Get Sentry Resource

    Fetch a Sentry resource by URL, or by resourceType plus resourceId. Supports issues, events, traces, spans, AI conversations, breadcrumbs, replays, monitors, and snapshots. Pass a Sentry URL directly when possible — the resource type is auto-detected.

    Inputs

    organizationSlugstring
    The organization's slug. Required when not providing a URL.
    resourceIdstring
    Resource identifier. For issues: short ID like 'PROJECT-123'. For spans: 'traceId:spanId'. For snapshot images: 'snapshotId:image_file_name'. Required when not using a URL.
    resourceTypestring
    Resource type to fetch. Use with resourceId when not providing a URL.one of issueeventtracespanai_conversationbreadcrumbsreplaymonitorsnapshotsnapshotImage
    urlstring
    Sentry URL. The resource type is auto-detected from the URL pattern. Example: 'https://my-org.sentry.io/issues/PROJECT-123/'.
  • sentrymcp_search_eventsSearch Sentry events across datasets (errors, logs, spans, metrics, profiles, replays).Read-only

    Search Events

    Search Sentry events across datasets (errors, logs, spans, metrics, profiles, replays). Supports aggregations (counts, averages) and individual event queries. Use natural language or Sentry query syntax.

    Inputs

    organizationSlugstringrequired
    The organization's slug. Use the find_organizations tool to list available organizations.
    datasetstring
    Dataset to query: errors (exceptions), logs (log entries), spans (traces/performance), metrics (counters/gauges), profiles (profiling), replays (session replays).one of spanserrorslogsmetricsprofilesreplays
    fieldsarray
    Fields to return. Include aggregate functions like count(), avg() for statistics. Example: ['issue', 'count()'].
    includeExplanationboolean
    Include an explanation of how the query was interpreted or repaired.
    limitnumber
    Maximum number of results to return (1–100). Default is 10.
    projectSlugstring
    Filter results to a specific project by slug.
    querystring
    Natural language or Sentry event search query. Example: 'how many errors today', 'level:error', 'span.op:db'.
    regionUrlstring
    The region URL for the organization. For sentry.io, typically 'https://us.sentry.io'. Omit for self-hosted.
    sortstring
    Sort field (prefix with - for descending). Example: '-count()' for most frequent, '-timestamp' for newest.
    statsPeriodstring
    Time period to query: 1h, 24h, 7d, 14d, 30d, etc.
  • sentrymcp_search_issuesSearch for grouped issues/problems in Sentry.Read-only

    Search Issues

    Search for grouped issues/problems in Sentry. Returns a list of issues with metadata like title, status, and user count. Supports natural language or Sentry query syntax. Use search_events for counts/aggregations.

    Inputs

    organizationSlugstringrequired
    The organization's slug. Use the find_organizations tool to list available organizations.
    includeExplanationboolean
    Include an explanation of how the query was interpreted or repaired by the AI.
    limitnumber
    Maximum number of issues to return (1–100). Default is 10.
    projectSlugOrIdstring
    Filter by project slug or numeric ID (optional).
    querystring
    Natural language or Sentry issue search query. Examples: 'is:unresolved', 'level:error firstSeen:-24h', 'assigned:me', 'critical bugs from last week'.
    regionUrlstring
    The region URL for the organization. For sentry.io, typically 'https://us.sentry.io'. Omit for self-hosted.
    sortstring
    Sort order for results: date (last seen), freq (frequency), new (first seen), user (user count).one of datefreqnewuser
  • sentrymcp_search_sentry_toolsSearch the available Sentry MCP tool catalog by keyword.Read-only

    Search Sentry Tools

    Search the available Sentry MCP tool catalog by keyword. Use this to discover catalog tools and their schemas for any Sentry operation not directly exposed as a top-level tool (e.g. project management, documentation, DSNs, releases, attachments, snapshots).

    Inputs

    querystringrequired
    Natural language keywords describing the Sentry operation or resource to find. Example: 'list projects', 'issue details', 'find dsn'.
    limitinteger
    Maximum number of matching tools to return (1–20). Default is 8.
  • sentrymcp_analyze_issue_with_seerUse Sentry's Seer AI to analyze a production error and get root cause analysis with specific code fixes.Write

    Analyze Issue with Seer

    Use Sentry's Seer AI to analyze a production error and get root cause analysis with specific code fixes. Provides file locations, line numbers, and concrete fix recommendations. Results are cached — subsequent calls return instantly.

    Inputs

    instructionstring
    Optional custom instruction for the AI analysis, to focus on specific aspects of the issue.
    issueIdstring
    The Issue ID. Example: 'PROJECT-1Z43'. Required if issueUrl is not provided.
    issueUrlstring
    Full URL to the Sentry issue. Example: 'https://my-org.sentry.io/issues/PROJECT-1Z43'. Use instead of organizationSlug + issueId.
    organizationSlugstring
    The organization's slug. Use the find_organizations tool to list available organizations.
    regionUrlstring
    The region URL for the organization. For sentry.io, typically 'https://us.sentry.io'. Omit for self-hosted.
  • sentrymcp_execute_sentry_toolExecute any available Sentry MCP tool discovered through the search_sentry_tools tool.Destructive

    Execute Sentry Tool

    Execute any available Sentry MCP tool discovered through the search_sentry_tools tool. Use this to call Sentry operations that are not exposed as direct top-level tools.

    Inputs

    namestringrequired
    The name of the Sentry tool to execute, as returned by search_sentry_tools. Example: 'find_projects', 'whoami', 'get_issue_details'.
    argumentsobject
    Arguments for the target tool, matching the schema returned by search_sentry_tools. Example: {"organizationSlug": "my-org"}.