getsentry_sentry_mcp_ts

getsentry_sentry_mcp_ts

by getsentry
A Model Context Protocol (MCP) server for interacting with Sentry, enabling AI assistants to manage and analyze error data.

Sentry MCP Server: Error Monitoring and Management for AI Assistants

Overview

The Sentry MCP Server is a specialized tool designed to integrate Sentry's error monitoring and management capabilities with AI assistants. Built using TypeScript, it provides a Model Context Protocol (MCP) interface for interacting with the Sentry API, enabling AI systems to retrieve, analyze, and manage error data, projects, and application performance.

Key Features

  • Error Data Retrieval: Fetch detailed error events and issues from Sentry projects.
  • Project Management: Create, list, and manage Sentry projects and teams.
  • Replay Analysis: Access and analyze session replays for debugging.
  • Claude Integration: Seamlessly integrate with Claude for enhanced error monitoring workflows.

Requirements

To use the Sentry MCP Server, ensure you have the following:
- Node.js (v14 or higher)
- npm or yarn
- A Sentry account with API access
- A Sentry authentication token with appropriate permissions

Setup

  1. Clone the repository:
    bash git clone https://github.com/getsentry/sentry-mcp-ts.git
  2. Install dependencies:
    bash npm install

Usage with Claude

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

{
    "mcpServers": {
        "sentry": {
            "command": "npx",
            "args": ["ts-node", "/Users/<your-user-directory>/sentry-mcp-ts/index.ts"],
            "env": {
                "SENTRY_AUTH": "<YOUR_AUTH_TOKEN>"
            }
        }
    }
}

Replace <your-user-directory> with your local path and <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)
- view (string, optional): "summary" or "detailed"
- format (string, optional): "plain" or "markdown"

resolve_short_id

Retrieves details about an issue using its short ID.
- Parameters:
- organization_slug (string, required)
- short_id (string, required)
- format (string, optional): "plain" or "markdown"

get_sentry_event

Retrieves and analyzes a specific Sentry event.
- Parameters:
- issue_id_or_url (string, required)
- event_id (string, required)
- view (string, optional): "summary" or "detailed"
- format (string, optional): "plain" or "markdown"

list_error_events_in_project

Lists error events from a specific Sentry project.
- Parameters:
- organization_slug (string, required)
- project_slug (string, required)
- view (string, optional): "summary" or "detailed"
- format (string, optional): "plain" or "markdown"

create_project

Creates a new project in Sentry and retrieves its client keys.
- Parameters:
- organization_slug (string, required)
- team_slug (string, required)
- name (string, required)
- platform (string, optional)
- view (string, optional): "summary" or "detailed"
- format (string, optional): "plain" or "markdown"

list_project_issues

Lists issues from a specific Sentry project.
- Parameters:
- organization_slug (string, required)
- project_slug (string, required)
- view (string, optional): "summary" or "detailed"
- format (string, optional): "plain" or "markdown"

list_issue_events

Lists events for a specific Sentry issue.
- Parameters:
- organization_slug (string, required)
- issue_id (string, required)
- view (string, optional): "summary" or "detailed"
- format (string, optional): "plain" or "markdown"

get_sentry_issue

Retrieves and analyzes a Sentry issue.
- Parameters:
- issue_id_or_url (string, required)
- view (string, optional): "summary" or "detailed"
- format (string, optional): "plain" or "markdown"

list_organization_replays

Lists replays from a specific Sentry organization.
- Parameters:
- organization_slug (string, required)
- project_ids (string[], optional)
- environment (string, optional)
- stats_period (string, optional)
- start (string, optional)
- end (string, optional)
- sort (string, optional)
- query (string, optional)
- per_page (number, optional)
- cursor (string, optional)
- view (string, optional): "summary" or "detailed"
- format (string, optional): "plain" or "markdown"

Running the Server

Start the server using the following command:

npx ts-node index.ts

Authentication

Ensure you have a valid Sentry authentication token. Generate one in your Sentry account settings under "API Keys."

Error Handling

The server includes comprehensive error handling for:
- Missing authentication tokens
- API request failures
- Invalid parameters
- Network errors

All errors are logged to the console for debugging.

Contributors

License

This project is licensed under the MIT License. See the LICENSE file for details.

Features & Capabilities

Categories
mcp_server model_context_protocol typescript sentry api_integration claude error_management

Implementation Details

Stats

0 Views
0 Favorites
1 GitHub Stars

Repository Info

getsentry Organization

Similar Servers

continuedev_continue by continuedev
0
0
0