Navigation
Sentry MCP Server: Real-Time Tracking & AI/ML Observability - MCP Implementation

Sentry MCP Server: Real-Time Tracking & AI/ML Observability

Sentry MCP Server: Real-time model context tracking and enhanced AI/ML observability, seamlessly integrated with Sentry to optimize performance and accelerate issue resolution.

Developer Tools
4.5(94 reviews)
141 saves
65 comments

44% of users reported increased productivity after just one week

About Sentry MCP Server

What is Sentry MCP Server: Real-Time Tracking & AI/ML Observability?

Sentry MCP Server is a protocol interface designed to bridge AI/ML systems with Sentry's error tracking and performance monitoring platform. It enables real-time access to Sentry's API, allowing tools like chatbots or automation scripts to analyze application errors, track project health, and monitor system performance. The server supports both summary and detailed views, with outputs tailored for human readability or programmatic parsing.

How to use Sentry MCP Server: Real-Time Tracking & AI/ML Observability?

Start by installing Node.js and dependencies via npm. Configure authentication using your Sentry API token, then initialize the server with platform-specific settings. For example, integrate with Claude by specifying the server path in JSON configuration. Use CLI commands like npx ts-node index.ts to run the server. All tools require specifying organization/project slugs and optional parameters like view formats or query filters.

Sentry MCP Server Features

Key Features of Sentry MCP Server: Real-Time Tracking & AI/ML Observability?

  • Real-time access to error data with machine learning-ready outputs
  • 10+ tools for project management, issue resolution, and event analysis
  • Adaptive response formats (plain text vs. structured markdown)
  • Granular error handling with detailed logging
  • IDE compatibility with Codeium Windsurf (Cursor currently unsupported)

Use cases of Sentry MCP Server: Real-Time Tracking & AI/ML Observability?

Scenario 1: Automated Error Analysis

Use resolve_short_id to instantly get issue details when a user reports an error code like PROJ-456. The server returns context about the error's occurrence, stack traces, and impact metrics.

Scenario 2: Performance Benchmarking

Run list_project_issues with stats_period=7d to generate weekly error trend reports for DevOps reviews. Combine with get_sentry_event to drill into critical incidents.

Scenario 3: CI/CD Integration

Automate project setup using create_project to provision new Sentry projects during deployment. The tool automatically returns API keys needed for application configuration.

Sentry MCP Server FAQ

FAQ from Sentry MCP Server: Real-Time Tracking & AI/ML Observability?

How do I generate an API token?
Create tokens in your Sentry account settings, ensuring they have project:read and org:read scopes.
Does it support older Node versions?
Requires Node.js 14+ due to modern TypeScript dependencies. Downgrade paths aren't officially maintained.
What happens if authentication fails?
Returns a 401 error with guidance to check token validity and permissions. Logs detailed attempts for security audits.
Can I customize output formats?
Yes - use format=plain for scripting or format=markdown for human-readable reports with tables and links.
Will this work with OpenAI models?
Requires configuring the MCP server endpoint in your model's tool settings. Currently tested with Claude and Codeium only.

Content

Sentry MCP Server

A Model Context Protocol (MCP) server for interacting with Sentry. This MCP server provides tools to interact with the Sentry API, allowing AI assistants to retrieve and analyze error data, manage projects, and monitor application performance.

Requirements

  • Node.js (v14 or higher)
  • npm or yarn
  • Sentry account with API access
  • Sentry authentication token with appropriate permissions

Setup

  1. Install dependencies:

    npm install

Using this within an IDE

This MCP has been verified to work against Codeium Windsurf.

Cursor is currently having issues with its MCP implementation; and this tool is not yet fully functional.

Using with Claude

To use this MCP server with Claude, add the following configuration to your Claude settings:

{
    "mcpServers": {
        "sentry": {
            "command": "npx",
            "args": ["ts-node", "/Users/<your-user-directory>/mcp-sentry-ts/index.ts"],
            "env": {
                "SENTRY_AUTH": "<YOUR_AUTH_TOKEN>"
            }
        }
    }
}
  • Update with your directory path in the args field.
  • Replace <YOUR_AUTH_TOKEN> with your Sentry authentication token.

Available Tools

list_projects

Lists all accessible Sentry projects for a given organization.

Parameters:

  • organization_slug (string, required): The slug of the organization to list projects from
  • view (string, optional): View type, either "summary" or "detailed" (default: "detailed")
  • format (string, optional): Output format, either "plain" or "markdown" (default: "markdown")

resolve_short_id

Retrieves details about an issue using its short ID.

Parameters:

  • organization_slug (string, required): The slug of the organization the issue belongs to
  • short_id (string, required): The short ID of the issue to resolve (e.g., PROJECT-123)
  • format (string, optional): Output format, either "plain" or "markdown" (default: "markdown")

get_sentry_event

Retrieves and analyzes a specific Sentry event from an issue.

Parameters:

  • issue_id_or_url (string, required): Either a full Sentry issue URL or just the numeric issue ID
  • event_id (string, required): The specific event ID to retrieve
  • view (string, optional): View type, either "summary" or "detailed" (default: "detailed")
  • format (string, optional): Output format, either "plain" or "markdown" (default: "markdown")

list_error_events_in_project

Lists error events from a specific Sentry project.

Parameters:

  • organization_slug (string, required): The slug of the organization the project belongs to
  • project_slug (string, required): The slug of the project to list events from
  • view (string, optional): View type, either "summary" or "detailed" (default: "detailed")
  • format (string, optional): Output format, either "plain" or "markdown" (default: "markdown")

create_project

Creates a new project in Sentry and retrieves its client keys.

Parameters:

  • organization_slug (string, required): The slug of the organization to create the project in
  • team_slug (string, required): The slug of the team to assign the project to
  • name (string, required): The name of the new project
  • platform (string, optional): The platform for the new project
  • view (string, optional): View type, either "summary" or "detailed" (default: "detailed")
  • format (string, optional): Output format, either "plain" or "markdown" (default: "markdown")

list_project_issues

Lists issues from a specific Sentry project.

Parameters:

  • organization_slug (string, required): The slug of the organization the project belongs to
  • project_slug (string, required): The slug of the project to list issues from
  • view (string, optional): View type, either "summary" or "detailed" (default: "detailed")
  • format (string, optional): Output format, either "plain" or "markdown" (default: "markdown")

list_issue_events

Lists events for a specific Sentry issue.

Parameters:

  • organization_slug (string, required): The slug of the organization the issue belongs to
  • issue_id (string, required): The ID of the issue to list events from
  • view (string, optional): View type, either "summary" or "detailed" (default: "detailed")
  • format (string, optional): Output format, either "plain" or "markdown" (default: "markdown")

get_sentry_issue

Retrieves and analyzes a Sentry issue.

Parameters:

  • issue_id_or_url (string, required): Either a full Sentry issue URL or just the numeric issue ID
  • view (string, optional): View type, either "summary" or "detailed" (default: "detailed")
  • format (string, optional): Output format, either "plain" or "markdown" (default: "markdown")

list_organization_replays

Lists replays from a specific Sentry organization.

Parameters:

  • organization_slug (string, required): The slug of the organization to list replays from
  • project_ids (string[], optional): List of project IDs to filter replays by
  • environment (string, optional): Environment to filter replays by
  • stats_period (string, optional): Time period for stats (e.g., "24h", "7d")
  • start (string, optional): Start date for filtering replays
  • end (string, optional): End date for filtering replays
  • sort (string, optional): Field to sort replays by
  • query (string, optional): Search query to filter replays
  • per_page (number, optional): Number of replays per page
  • cursor (string, optional): Cursor for pagination
  • view (string, optional): View type, either "summary" or "detailed" (default: "detailed")
  • format (string, optional): Output format, either "plain" or "markdown" (default: "markdown")

Running the Server

npx ts-node index.ts

Authentication

This tool requires a Sentry authentication token with appropriate permissions to access the Sentry API. You can generate a token in your Sentry account settings under "API Keys".

Error Handling

The server includes comprehensive error handling for:

  • Missing authentication token
  • API request failures
  • Invalid parameters
  • Network errors

All errors are logged to the console for debugging.

Related MCP Servers & Clients