Skip to main content
Glama

sentry-mcp

Crates.io codecov License: MIT

A fast, lightweight MCP server for Sentry, written in Rust.

Why sentry-mcp?

Compared to the official Node.js server:

  • Memory: 10x less RAM usage

  • Startup: instant cold start

  • Disk: single binary, no runtime dependencies

  • Tokens: fewer tools = smaller tool list in context

Related MCP server: cursor-rust-tools

Features

This MCP server provides tools to interact with Sentry's API:

  • get_issue_details - Retrieve detailed information about a Sentry issue including metadata, tags, stacktraces, and optionally a specific event

  • get_trace_details - Retrieve trace details including span tree and timing information for distributed tracing analysis

  • search_issue_events - Search events within an issue using Sentry's query syntax

Installation

From crates.io:

cargo install sentry-mcp

From GitHub:

cargo install --git https://github.com/utapyngo/sentry-mcp-rs.git

Or with mise:

mise use -g github:utapyngo/sentry-mcp-rs

The binary will be installed as sentry-mcp.

Configuration

Required environment variables:

  • SENTRY_AUTH_TOKEN - Your Sentry API authentication token

  • SENTRY_HOST - Your Sentry instance hostname (e.g., sentry.io)

Optional:

  • SOCKS_PROXY - SOCKS5 proxy URL (e.g., socks5://127.0.0.1:1080)

  • HTTPS_PROXY - HTTPS proxy URL

MCP Client Configuration

Add to your MCP client configuration:

{
  "mcpServers": {
    "sentry": {
      "command": "sentry-mcp",
      "env": {
        "SENTRY_AUTH_TOKEN": "your_token_here",
        "SENTRY_HOST": "sentry.io"
      }
    }
  }
}

Or without installation using mise:

{
  "mcpServers": {
    "sentry": {
      "command": "mise",
      "args": ["x", "github:utapyngo/sentry-mcp-rs", "--", "sentry-mcp"],
      "env": {
        "SENTRY_AUTH_TOKEN": "your_token_here",
        "SENTRY_HOST": "sentry.io"
      }
    }
  }
}

Development

Clone the repository and create a .env file:

git clone https://github.com/utapyngo/sentry-mcp-rs.git
cd sentry-mcp-rs
cp .env.example .env
# Edit .env with your credentials

Build and test with MCP Inspector:

cargo build --release
npx @modelcontextprotocol/inspector ./run.sh

Or configure MCP client to use the script:

{
  "mcpServers": {
    "sentry": {
      "command": "/path/to/sentry-mcp-rs/run.sh"
    }
  }
}

Tools

get_issue_details

Retrieve detailed information about a specific Sentry issue.

Parameters:

  • issue_url - Full Sentry issue URL (alternative to the parameters below)

  • organization_slug - Organization slug (required if issue_url not provided)

  • issue_id - Issue ID like PROJECT-123 or numeric ID (required if issue_url not provided)

  • event_id - Specific event ID to fetch instead of latest (optional)

get_trace_details

Retrieve trace details for distributed tracing analysis.

Parameters:

  • organization_slug - Organization slug

  • trace_id - 32-character hex trace ID

search_issue_events

Search events within an issue using Sentry's query syntax.

Parameters:

  • organization_slug - Organization slug

  • issue_id - Issue ID (e.g., PROJECT-123)

  • query - Optional Sentry search query

  • limit - Maximum events to return (default: 10, max: 100)

  • sort - Sort order: newest (default) or oldest

Available Tools

3 tools
get_issue_detailsA

Retrieve detailed information about a specific Sentry issue including metadata, tags, and optionally an event. Accepts either an issueUrl OR (organizationSlug + issueId).

ParametersJSON Schema
NameRequiredDescriptionDefault
event_idNoSpecific event ID to fetch instead of latest
issue_idNoIssue ID like 'PROJECT-123' or numeric ID (required if issue_url not provided)
issue_urlNoFull Sentry issue URL
organization_slugNoOrganization slug (required if issue_url not provided)

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses the tool is read-only (retrieve), but with no annotations, lacks details on error handling, authentication needs, or what happens if the issue does not exist. The description is adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single, well-structured sentence that immediately states purpose and key usage information. No unnecessary words; front-loaded with verb and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no output schema and no annotations, so description must compensate. It covers identification methods and high-level contents, but lacks details on return structure, pagination, or error scenarios, leaving some gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 100% description coverage, providing clear parameter roles. The description adds the constraint of mutual exclusivity between issue_url and organizationSlug+issueId, offering some extra value but not enough to exceed baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool retrieves detailed issue info from Sentry, listing metadata, tags, and optional event. It distinguishes the tool from siblings by focusing on a single issue, though not explicitly contrasting with get_trace_details or search_issue_events.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implicitly describes when to use via the two identification modes, but lacks explicit guidance on when to choose this tool over siblings, such as searching events within an issue or getting trace details.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_trace_detailsA

Retrieve trace details including span tree and timing information. Useful for analyzing distributed system performance.

ParametersJSON Schema
NameRequiredDescriptionDefault
organization_slugYesOrganization slug
trace_idYesTrace ID (32-character hex string)

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden for behavioral disclosure. 'Retrieve' implies a read-only operation, and the description lists the outputs (span tree, timing information), which is sufficient for a simple retrieval tool. However, it does not explicitly state that the operation is idempotent or has no side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is only two sentences, with the first sentence clearly stating the action and outputs. There is no redundant information, and every sentence adds value. It is front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low complexity (2 simple params, no output schema, no nested objects), the description provides adequate context. It explains the purpose and output (span tree, timing), which is sufficient for an agent to invoke the tool correctly. Could include more details about the span tree structure, but not necessary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% (both parameters have descriptions in the input schema). The description adds no additional meaning beyond the schema, as 'organization_slug' and 'trace_id' are already well-defined. Baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Retrieve'), the specific resource ('trace details'), and key outputs ('span tree and timing information'). It also differentiates from sibling tools (get_issue_details, search_issue_events) by focusing on distributed system performance analysis.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions the tool is 'useful for analyzing distributed system performance,' which gives context for when to use it. However, it lacks explicit guidance on when not to use it or when to prefer alternative tools, though the differentiation from sibling tools is implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_issue_eventsB

Search events for a specific issue using a query string. Returns matching events with their details.

ParametersJSON Schema
NameRequiredDescriptionDefault
issue_idYesIssue ID like 'PROJECT-123' or numeric ID
limitNoMaximum number of events to return (default: 10, max: 100)
organization_slugYesOrganization slug
queryNoSentry search query. Syntax: key:value pairs with optional raw text. Operators: > < >= <= for numbers, ! for negation, * for wildcard, OR/AND for logic. Event properties: environment, release, platform, message, user.id, user.email, device.family, browser.name, os.name, server_name, transaction. Examples: 'server_name:web-1', 'environment:production', '!user.email:*@test.com', 'browser.name:Chrome OR browser.name:Firefox'
sortNoSort order: 'newest' (default) or 'oldest'

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions 'search' and 'returns matching events' but does not disclose if the operation is read-only, what side effects exist, required permissions, rate limits, or what happens on empty results. The description is minimal on behavioral traits beyond the core action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, very concise with no extraneous information. It front-loads the key action and outcome. However, it could be more structured (e.g., bullets for when to use) but given its brevity, it is efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (5 parameters, no output schema, 2 siblings), the description provides the core purpose but lacks details about return format, pagination, error cases, or common event properties. It is adequate for a straightforward search tool but could be more informative for agents needing to handle edge cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with detailed descriptions for each parameter, especially 'query' which provides syntax, operators, and examples. The description only restates 'using a query string', adding little beyond the schema. Since the schema already documents parameters well, a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states it 'Search events for a specific issue using a query string. Returns matching events with their details.' It clearly identifies the action (search), the resource (events for a specific issue), and the result (matching events with details). It also distinguishes itself from sibling tools 'get_issue_details' and 'get_trace_details' which focus on issue or trace details, not events.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a general purpose but does not explicitly state when to use this tool versus alternatives. It implies usage when events are needed rather than issue details, but lacks guidance on prerequisites, when-not-to-use, or comparison with sibling tools. The schema descriptions provide some context for parameter usage but not for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observedget_issue_details
    • First observedget_trace_details
    • First observedsearch_issue_events

TDQS

A3.7/5.0

Scored across 3 tools

Disambiguation5/5

Each tool targets a distinct operation: issue details, trace details, and event search. There is no overlap or ambiguity between them.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern using snake_case, e.g., get_issue_details, get_trace_details, search_issue_events.

Tool Count4/5

Three tools is on the lower side but still reasonable for a focused Sentry server covering core issue and trace functionality.

Completeness2/5

The set lacks essential CRUD operations like listing issues, updating issue status, or resolving issues, leaving significant gaps for a comprehensive Sentry workflow.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers