> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to the Sentry MCP server

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.

**Authentication:** OAuth 2.1/DCR
**Categories:** Monitoring, Developer Tools
**Tools:** 9: 6 read, 1 write, 2 destructive
**Users sign in with:** OAuth
**OAuth app:** Your own Sentry MCP server app
**Built by:** Vendor MCP
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=SENTRYMCP)

## 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

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".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](/agentkit/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

   **Node.js** (`quickstart.mts`)

   ```typescript
   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)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "sentrymcp"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Sentry MCP:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="sentrymcp_find_organizations",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user signs in once. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'sentrymcp_find_organizations',
  toolInput: {},
  connector: 'sentrymcp',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="sentrymcp_find_organizations",
    tool_input={},
    connection_name="sentrymcp",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `sentrymcp_find_organizations`

Find Organizations · Read-only

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

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `query` (`string`, optional): Search query to filter results by name or slug. Use this to narrow down results when there are many items.

Example input: `{}`

### `sentrymcp_find_projects`

Find Projects · Read-only

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

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `organizationSlug` (`string`, required): The organization's slug. Use the find_organizations tool to list available organizations.
- `query` (`string`, optional): Search query to filter results by project name or slug.
- `regionUrl` (`string`, optional): The region URL for the organization. For sentry.io, this is typically 'https://us.sentry.io'. Omit for self-hosted installations.

Example input: `{"organizationSlug":"<organizationSlug>"}`

### `sentrymcp_get_sentry_resource`

Get Sentry Resource · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `organizationSlug` (`string`, optional): The organization's slug. Required when not providing a URL.
- `resourceId` (`string`, optional): 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.
- `resourceType` (`string`, optional): Resource type to fetch. Use with resourceId when not providing a URL. One of: `issue`, `event`, `trace`, `span`, `ai_conversation`, `breadcrumbs`, `replay`, `monitor`, `snapshot`, `snapshotImage`.
- `url` (`string`, optional): Sentry URL. The resource type is auto-detected from the URL pattern. Example: 'https://my-org.sentry.io/issues/PROJECT-123/'.

Example input: `{}`

### `sentrymcp_search_events`

Search Events · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `organizationSlug` (`string`, required): The organization's slug. Use the find_organizations tool to list available organizations.
- `dataset` (`string`, optional): Dataset to query: errors (exceptions), logs (log entries), spans (traces/performance), metrics (counters/gauges), profiles (profiling), replays (session replays). One of: `spans`, `errors`, `logs`, `metrics`, `profiles`, `replays`.
- `fields` (`array`, optional): Fields to return. Include aggregate functions like count(), avg() for statistics. Example: ['issue', 'count()'].
- `includeExplanation` (`boolean`, optional): Include an explanation of how the query was interpreted or repaired.
- `limit` (`number`, optional): Maximum number of results to return (1–100). Default is 10.
- `projectSlug` (`string`, optional): Filter results to a specific project by slug.
- `query` (`string`, optional): Natural language or Sentry event search query. Example: 'how many errors today', 'level:error', 'span.op:db'.
- `regionUrl` (`string`, optional): The region URL for the organization. For sentry.io, typically 'https://us.sentry.io'. Omit for self-hosted.
- `sort` (`string`, optional): Sort field (prefix with - for descending). Example: '-count()' for most frequent, '-timestamp' for newest.
- `statsPeriod` (`string`, optional): Time period to query: 1h, 24h, 7d, 14d, 30d, etc.

Example input: `{"organizationSlug":"<organizationSlug>"}`

### `sentrymcp_search_issues`

Search Issues · Read-only

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.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `organizationSlug` (`string`, required): The organization's slug. Use the find_organizations tool to list available organizations.
- `includeExplanation` (`boolean`, optional): Include an explanation of how the query was interpreted or repaired by the AI.
- `limit` (`number`, optional): Maximum number of issues to return (1–100). Default is 10.
- `projectSlugOrId` (`string`, optional): Filter by project slug or numeric ID (optional).
- `query` (`string`, optional): Natural language or Sentry issue search query. Examples: 'is:unresolved', 'level:error firstSeen:-24h', 'assigned:me', 'critical bugs from last week'.
- `regionUrl` (`string`, optional): The region URL for the organization. For sentry.io, typically 'https://us.sentry.io'. Omit for self-hosted.
- `sort` (`string`, optional): Sort order for results: date (last seen), freq (frequency), new (first seen), user (user count). One of: `date`, `freq`, `new`, `user`.

Example input: `{"organizationSlug":"<organizationSlug>"}`

### `sentrymcp_search_sentry_tools`

Search Sentry Tools · Read-only

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).

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `query` (`string`, required): Natural language keywords describing the Sentry operation or resource to find. Example: 'list projects', 'issue details', 'find dsn'.
- `limit` (`integer`, optional): Maximum number of matching tools to return (1–20). Default is 8.

Example input: `{"query":"list projects"}`

### `sentrymcp_analyze_issue_with_seer`

Analyze Issue with Seer · Write

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.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `instruction` (`string`, optional): Optional custom instruction for the AI analysis, to focus on specific aspects of the issue.
- `issueId` (`string`, optional): The Issue ID. Example: 'PROJECT-1Z43'. Required if issueUrl is not provided.
- `issueUrl` (`string`, optional): Full URL to the Sentry issue. Example: 'https://my-org.sentry.io/issues/PROJECT-1Z43'. Use instead of organizationSlug + issueId.
- `organizationSlug` (`string`, optional): The organization's slug. Use the find_organizations tool to list available organizations.
- `regionUrl` (`string`, optional): The region URL for the organization. For sentry.io, typically 'https://us.sentry.io'. Omit for self-hosted.

Example input: `{}`

### `sentrymcp_execute_sentry_tool`

Execute Sentry Tool · Destructive

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.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): The name of the Sentry tool to execute, as returned by search_sentry_tools. Example: 'find_projects', 'whoami', 'get_issue_details'.
- `arguments` (`object`, optional): Arguments for the target tool, matching the schema returned by search_sentry_tools. Example: {"organizationSlug": "my-org"}.

Example input: `{"name":"find_projects"}`

### `sentrymcp_update_issue`

Update Issue · Destructive

Update a Sentry issue's status or assignment. Use to resolve, reopen, assign, or ignore an issue. Provide issueUrl or organizationSlug + issueId. At least one of status or assignedTo is required.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `assignedTo` (`string`, optional): Assignee in format 'user:ID' or 'team:ID_OR_SLUG'. Example: 'user:123456', 'team:my-team-slug'.
- `ignoreCount` (`integer`, optional): Number of occurrences before the issue stops being ignored when ignoreMode is 'untilOccurrenceCount'.
- `ignoreDurationMinutes` (`integer`, optional): Minutes to ignore the issue when ignoreMode is 'forDuration'.
- `ignoreMode` (`string`, optional): How ignored issues should behave: untilEscalating (Sentry default), forever, forDuration, untilOccurrenceCount, or untilUserCount. One of: `untilEscalating`, `forever`, `forDuration`, `untilOccurrenceCount`, `untilUserCount`.
- `ignoreUserCount` (`integer`, optional): Number of affected users before the issue stops being ignored when ignoreMode is 'untilUserCount'.
- `ignoreUserWindowMinutes` (`integer`, optional): Optional time window in minutes for ignoreUserCount. Maximum 10080 (1 week).
- `ignoreWindowMinutes` (`integer`, optional): Optional time window in minutes for ignoreCount. Maximum 10080 (1 week).
- `issueId` (`string`, optional): The Issue ID, e.g. 'PROJECT-1Z43'. Required if issueUrl is not provided.
- `issueUrl` (`string`, optional): Full URL to the Sentry issue. Use instead of organizationSlug + issueId.
- `organizationSlug` (`string`, optional): The organization's slug. Required if issueUrl is not provided.
- `reason` (`string`, optional): Optional reason for the action. When provided, posted as a comment on the issue's activity feed.
- `regionUrl` (`string`, optional): The region URL for the organization. For sentry.io, typically 'https://us.sentry.io'. Omit for self-hosted.
- `status` (`string`, optional): New status for the issue: resolved, resolvedInNextRelease, unresolved, or ignored. One of: `resolved`, `resolvedInNextRelease`, `unresolved`, `ignored`.

Example input: `{}`

## Related

Other Monitoring connectors ([all 22](/agentkit/connectors/?category=monitoring)):

- [Datadog](/agentkit/connectors/datadog/): Scalekit connector, API key, 105 tools
- [PagerDuty](/agentkit/connectors/pagerduty/): Scalekit connector, OAuth, 71 tools
- [Agency Analytics MCP server](/agentkit/connectors/agencyanalyticsmcp/): Vendor MCP, OAuth, 35 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
