Skip to main content
Glama
vitalypanait

sentry-self-hosted-mcp

by vitalypanait

sentry-self-hosted-mcp

MCP (Model Context Protocol) server for integrating self-hosted Sentry with AI assistants — Cursor, Claude Desktop, and any other MCP-compatible clients.

Tools

Tool

Description

list_projects

List all projects in the organization

list_issues

List issues with filtering by project, status, and level

get_issue

Issue details by numeric ID or short ID (e.g. PAYOUT-A6Z)

get_issue_with_stacktrace

Issue metadata + latest event stacktrace in a single call

get_latest_event

Latest event for an issue

get_event

Specific event by project slug and event ID

get_stack_frames

Stack frames for an event, with an option to show only in-app frames

Related MCP server: Sentry MCP Server

Requirements

  • Node.js 18+

  • Self-hosted Sentry instance with API access

  • Auth token with org:read, project:read, event:read scopes

Installation

npm install
npm run build

Configuration

The server reads three environment variables:

Variable

Description

Example

SENTRY_HOST

Your Sentry URL

https://sentry.example.com

SENTRY_TOKEN

Auth token

sntrys_...

SENTRY_ORG_SLUG

Organization slug

my-org

Tokens are created in Settings → Auth Tokens in Sentry.

Connecting to Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "sentry-selfhosted": {
      "command": "npx",
      "args": ["@vitaliypanait/sentry-self-hosted-mcp"],
      "env": {
        "SENTRY_HOST": "https://sentry.example.com",
        "SENTRY_TOKEN": "sntrys_...",
        "SENTRY_ORG_SLUG": "my-org"
      }
    }
  }
}

Local development alternative (if running from a cloned repo):

{
  "mcpServers": {
    "sentry-selfhosted": {
      "command": "node",
      "args": ["/absolute/path/to/sentry-mcp/dist/index.js"],
      "env": {
        "SENTRY_HOST": "https://sentry.example.com",
        "SENTRY_TOKEN": "sntrys_...",
        "SENTRY_ORG_SLUG": "my-org"
      }
    }
  }
}

Connecting to Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "sentry-selfhosted": {
      "command": "npx",
      "args": ["@vitaliypanait/sentry-self-hosted-mcp"],
      "env": {
        "SENTRY_HOST": "https://sentry.example.com",
        "SENTRY_TOKEN": "sntrys_...",
        "SENTRY_ORG_SLUG": "my-org"
      }
    }
  }
}

Cursor Rule

To make Cursor automatically fetch Sentry context when you mention an issue or ask about a bug, add a rule to your project.

Copy examples/cursor-rule.mdc into your project as .cursor/rules/sentry.mdc.

With alwaysApply: false the rule activates only when relevant (recommended). Change to alwaysApply: true to apply it to every request in the project.

Development

# Run the compiler in watch mode
npm run dev

# Type check
npx tsc --noEmit

Stack

  • MCP SDK — AI interaction protocol

  • Axios — HTTP client for the Sentry API

  • Zod — input validation for tools

Available Tools

7 tools
get_eventA

Get detailed information about a specific Sentry event by project slug and event ID. Returns exception details, stacktrace, tags, and context.

ParametersJSON Schema
NameRequiredDescriptionDefault
event_idYesSentry event ID (32-char hex, e.g. "81d30e43f73d45fbada20c887ede80c0")
project_slugYesSentry project slug (e.g. "payout", "billing")

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does a reasonable job by disclosing the return content (exception details, stacktrace, tags, context). It does not mention error behavior or authentication, but for a read-only lookup this is acceptable and adds value over the tool name.

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 two concise sentences, front-loaded with the core purpose and immediately followed by return details. Every word contributes value with no redundancy.

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

Completeness5/5

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

This is a simple two-parameter read-only tool with no output schema, and the description adequately covers its purpose and return value content. It is fully self-sufficient for an agent to understand what the tool does and what it returns.

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?

The input schema already describes both parameters with 100% coverage, including the event ID format and project slug examples. The description adds no extra parameter semantics beyond stating that the event is identified 'by project slug and event ID,' which is already present in the schema.

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 uses a specific verb ('Get') and resource ('detailed information about a specific Sentry event'), clearly identifying the project slug and event ID as inputs. It distinguishes this tool from siblings by focusing on a single event rather than lists or latest event.

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 implies this tool is used when detailed information about a specific event is needed, identified by project slug and event ID. It does not explicitly name alternatives or exclusions, but the context is clear enough for an agent to differentiate from list/latest tools.

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

get_issueB

Get information about a Sentry issue by its numeric ID or short ID (e.g. "PAYOUT-123"). Includes status, event count, first/last seen.

ParametersJSON Schema
NameRequiredDescriptionDefault
issue_idYesSentry issue ID (numeric) or short ID (e.g. "PAYOUT-A6T")

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It says 'Get information' which implies a read-only operation, and lists some returned fields, but it does not mention any potential side effects, errors, or return format. For a simple read tool, this is adequate but not rich.

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 a single, concise sentence that immediately states the purpose and includes an example. There is no wasted wording, and the structure front-loads the key information efficiently.

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?

The tool has only one parameter and no output schema, so the description is relatively complete for basic use. However, it lacks any differentiation from the sibling get_issue_with_stacktrace and does not explain the response structure, leaving some context gaps for an agent deciding between tools.

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?

The input schema already fully documents the single parameter issue_id with a description matching the tool's text. The description adds an example short ID ('PAYOUT-123') that is similar to the schema's example, but it does not provide any additional semantic meaning beyond what the schema already offers.

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?

The description clearly states the tool gets information about a Sentry issue by numeric or short ID, listing specific fields (status, event count, first/last seen). It is a specific verb+resource, but it does not explicitly distinguish itself from the sibling get_issue_with_stacktrace.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like get_issue_with_stacktrace or get_event. It simply states what it does, without any explicit exclusions or alternative recommendations, which is a gap given the similar sibling tools.

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

get_issue_with_stacktraceB

Get issue metadata and latest event stacktrace in a single call.

ParametersJSON Schema
NameRequiredDescriptionDefault
issue_idYesSentry issue ID (numeric) or short ID (e.g. "PAYOUT-A6Z")

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 must fully disclose behavioral traits. It only states what the tool returns, not error behavior, performance implications, response format, or any side effects. This leaves the agent with limited understanding of how the tool behaves in edge cases.

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 a single concise sentence that front-loads the verb and resource. It contains no filler or redundant information, earning a top score for structure.

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

Completeness2/5

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

With no output schema and no annotations, the description fails to convey the full response structure beyond 'metadata' and 'stacktrace', and it omits error handling or when to use this tool vs alternatives. The tool's simplicity is not sufficiently documented, leaving important 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?

The schema fully describes the single parameter issue_id, including example format ('PAYOUT-A6Z'). Since schema coverage is 100%, the description adds no additional meaning beyond the schema, warranting the baseline score of 3.

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 verb 'Get' with specific resources 'issue metadata' and 'latest event stacktrace' makes the tool's purpose explicit. It clearly differentiates from siblings like get_issue (metadata only) and get_latest_event (event only) by emphasizing the combined single-call nature.

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 implies usage when both metadata and stacktrace are needed in one call, but it never explicitly states when to prefer this over separate calls to get_issue and get_latest_event. No exclusions, prerequisites, or comparison with alternatives are provided.

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

get_latest_eventB

Get the latest event for a Sentry issue.

ParametersJSON Schema
NameRequiredDescriptionDefault
issue_idYesSentry issue ID (numeric) or short ID

TDQS

B3.3/5.0
Behavior2/5

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

There are no annotations, so the description must carry the burden of disclosing behavior. It only states that it retrieves an event, with no mention of return format, ordering guarantees beyond 'latest', or any side effects. This is minimal disclosure for an unannotated tool.

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 a single, focused sentence with no redundancy or padding. It is front-loaded with the action 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?

For a simple one-parameter read tool, the description communicates the core purpose and the schema covers the input. However, it lacks behavioral details and fails to distinguish itself from the get_event sibling, making it adequate but not fully complete.

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?

The input schema documents the parameter with 100% coverage, including its type and meaning. The description adds no additional parameter information, so the schema does the heavy lifting; baseline 3 is appropriate.

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?

The description uses a specific verb ('Get') and resource ('latest event for a Sentry issue'), clearly stating the tool's scope. It distinguishes from get_event by specifying 'latest', but doesn't explicitly name the sibling alternative, so it lacks full differentiation.

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 implies a use case (wanting the most recent event for an issue) but provides no explicit context, exclusions, or alternative tool guidance. With siblings like get_event available, the description would benefit from a note on when to choose this over others.

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

get_stack_framesA

Extract and format stack frames from a Sentry event. Useful for quickly seeing the call chain without full event details.

ParametersJSON Schema
NameRequiredDescriptionDefault
event_idYesSentry event ID
in_app_onlyNoShow only application frames (exclude vendor/framework frames)
project_slugYesSentry project slug

TDQS

A3.7/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 only states the core operation and does not mention read-only nature, output format, error behavior, or permissions.

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?

Two concise sentences front-load the purpose and use case with no superfluous information.

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?

For a 3-parameter tool with no output schema and no annotations, the description lacks detail on return format and limitations, but it adequately explains core purpose and typical usage scenario.

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% descriptor coverage, so the description adds no parameter-specific meaning. Baseline 3 applies since the schema already documents all parameters.

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 ('Extract and format stack frames') and the resource ('Sentry event'), and distinguishes from full-event tools by noting it provides the call chain without full details.

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?

It provides a clear use case ('quickly seeing the call chain') and contrasts with full event details, but does not explicitly name alternative tools or state when not to use it.

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

list_issuesB

List Sentry issues with optional filters. Supports search queries like "is:unresolved", "level:error", etc.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMax number of results (default: 25)
queryNoSearch query (default: "is:unresolved"). E.g. "is:unresolved level:error"
project_slugNoFilter by project slug

TDQS

B3.3/5.0
Behavior2/5

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

There are no annotations to rely on, so the description carries the full burden of behavioral disclosure. It only says 'List' which implies a read operation, but doesn't explicitly state safety, pagination behavior, ordering, or what the returned data represents. It also doesn't mention that the default query is 'is:unresolved' (only the schema does).

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 two sentences, front-loaded with the core action 'List Sentry issues', and provides a concise, relevant example. Every word earns its place with no fluff or redundancy.

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?

For a simple list tool with only optional parameters, this description is minimally viable. However, it doesn't address return value shape, ordering, or whether it returns full issue details or summaries. Given the absence of an output schema and the presence of sibling tools that retrieve single issues, a bit more context about the list result would improve completeness.

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%, so the baseline is 3. The description mentions 'optional filters' and example query formats, but the schema already documents each parameter with the same examples. Thus the description adds no meaningful semantic value beyond the schema.

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?

The description states 'List Sentry issues' with a specific verb and resource, making the core purpose clear. It doesn't explicitly distinguish from sibling tools like 'list_projects' or 'get_issue', but the verb 'list' and resource 'issues' are enough to differentiate in most contexts.

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 provides example search queries ('is:unresolved', 'level:error'), which give practical usage guidance for filters. However, it doesn't explicitly mention when to use this tool over alternatives like 'get_issue' or 'list_projects', nor does it state any exclusions or prerequisites.

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

list_projectsA

List all Sentry projects in the organization.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations provided, the description carries full burden. It communicates a read-only list operation by using the verb 'list' and specifies scope ('all projects in the organization'), but does not disclose additional behaviors such as pagination, authentication requirements, or return format. Given the simplicity of the operation, this is adequate but not rich.

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 a single, front-loaded sentence with no wasted words. It immediately conveys the essential information about the tool's function.

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?

The tool is simple with no parameters and no output schema. The description explains the core function but does not describe the return format or possible limitations (e.g., pagination, archived projects). For a basic list operation, this is minimally complete but leaves some uncertainty about the response structure.

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

Parameters4/5

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

The input schema has zero parameters, and schema coverage is effectively complete. Per baseline, 0 params merit a score of 4. The description adds no parameter-specific semantics because none exist.

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 ('List'), the resource ('projects'), and the scope ('all in the organization'). It effectively distinguishes from sibling tools that focus on issues/events rather than projects.

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 implies usage for retrieving projects but does not explicitly state when to use this tool versus alternatives. While sibling names indicate a focus on issues, no direct guidance or when-not-to-use is provided, leaving the context clear but without explicit exclusions.

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. 7 tool updatesv1.0.0
    • First observedget_event
    • First observedget_issue
    • First observedget_issue_with_stacktrace
    • First observedget_latest_event
    • First observedget_stack_frames
    • First observedlist_issues
    • First observedlist_projects

TDQS

A3.7/5.0

Scored across 7 tools

Disambiguation4/5

Most tools have distinct purposes: list vs. get, issue vs. event vs. stacktrace. Some minor overlap exists between get_event and get_stack_frames, as both return stacktrace data, but they are differentiated by level of detail and formatting.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case. The 'get_' and 'list_' prefixes clearly indicate action type, and resource names are used uniformly across the set.

Tool Count5/5

With 7 tools, the server is well-scoped for a read-only Sentry debugging workflow. Each tool provides a meaningful view into issues and events without unnecessary bloat or redundancy.

Completeness3/5

The tool surface covers exploration and retrieval well, including issues, events, stacktraces, and projects. However, it lacks any mutating operations (e.g., updating issue status, resolving issues) and has no way to list all events for an issue, which could create dead ends in a complete debugging workflow.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    B
    quality
    D
    maintenance
    A Model Context Protocol server that retrieves and analyzes Sentry.io issues, allowing users to inspect error reports, stacktraces, and debugging information from their Sentry account.
    2
    22
    -
  • F
    license
    B
    quality
    F
    maintenance
    A Model Context Protocol server that enables AI assistants to interact with Sentry for error tracking and monitoring, allowing retrieval and analysis of error data, project management, and performance monitoring through the Sentry API.
    11
    21
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that connects to Sentry.io or self-hosted Sentry instances to retrieve and analyze error reports, stack traces, and debugging information.
    2
    -
  • F
    license
    B
    quality
    F
    maintenance
    A Model Context Protocol server that lets AI assistants interact with the Sentry API to retrieve and analyze error data, manage projects, and monitor application performance.
    11
    11
    -