# Sentry MCP Server π
A TypeScript implementation of a Sentry MCP (Modern Context Protocol) tool that allows AI agents to access and analyze Sentry error data. π€
## β¨ Features
- π― Retrieve and analyze Sentry issues
- π Get formatted issue details and metadata
- π¬ View detailed stacktraces
- π οΈ Support for both tool and prompt interfaces
- π‘οΈ Robust error handling
- π Real-time communication
## π¦ Installation
```bash
pnpm install
```
## π§ Configuration
Create a `.env` file in the root directory with your Sentry auth token:
```env
SENTRY_AUTH_TOKEN=your_sentry_auth_token
SENTRY_API_BASE=https://sentry.io/api/0/ # Optional, defaults to this value
```
## π Usage
### Starting the Server π
```bash
pnpm build && pnpm start
```
The server will start on port 1337 by default.
### Using with MCP π οΈ
The server provides two MCP interfaces:
1. Tool Interface: `get_sentry_issue`
```json
{
"issue_id_or_url": "12345"
}
```
2. Prompt Interface: `sentry-issue`
```json
{
"issue_id_or_url": "https://sentry.io/organizations/your-org/issues/12345/"
}
```
## π‘ Integrating with Cursor IDE
The Sentry MCP Server can be integrated with Cursor IDE for enhanced development experience:
1. π Start the MCP server locally using `pnpm start`
2. π§ Configure Cursor to use the local MCP server:

3. π Enjoy seamless Sentry issue analysis directly in your IDE!
## π€ Contributing
1. π Fork the repository
2. πΏ Create your feature branch
3. πΎ Commit your changes
4. π Push to the branch
5. π¬ Create a new Pull Request