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.
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
bash
git clone https://github.com/getsentry/sentry-mcp-ts.git
bash
npm install
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.
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"
Start the server using the following command:
npx ts-node index.ts
Ensure you have a valid Sentry authentication token. Generate one in your Sentry account settings under "API Keys."
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.
This project is licensed under the MIT License. See the LICENSE file for details.