mcp-sentry
A Model Context Protocol (MCP) server for seamless integration with Sentry.io, enabling real-time error tracking and debugging in your AI-powered development workflow.
Features
- π Real-time Issue Analysis: Fetch and analyze Sentry issues directly in your development environment
- π Seamless Integration: Works with Claude Desktop, Zed, and other MCP-compatible clients
- π Comprehensive Data: Access full stacktraces, error patterns, and issue statistics
- π Multiple Installation Options: Support for pip, uv, and Docker installations
- π Flexible Configuration: Environment variables or config file-based setup
Quick Start
Prerequisites
- Python 3.10 or higher
- Sentry account with API access
- MCP-compatible client (Claude Desktop, Zed, etc.)
Installation
Choose your preferred installation method:
Using uv (Recommended)
uvx mcp-sentry
Using pip
pip install mcp-sentry
Using Docker
docker pull mcp/sentry
Configuration
Required Environment Variables
SENTRY_TOKEN=your_sentry_auth_token
SENTRY_PROJECT_SLUG=your_project_slug
SENTRY_ORGANIZATION_SLUG=your_organization_slug
Client Configuration
Claude Desktop
Add to claude_desktop_config.json
:
{
"mcpServers": {
"sentry": {
"command": "uvx",
"args": [
"mcp-sentry",
"--auth-token", "YOUR_SENTRY_TOKEN",
"--project-slug", "YOUR_PROJECT_SLUG",
"--organization-slug", "YOUR_ORGANIZATION_SLUG"
]
}
}
}
Zed
Add to settings.json
:
{
"context_servers": {
"mcp-sentry": {
"command": {
"path": "uvx",
"args": [
"mcp-sentry",
"--auth-token", "YOUR_SENTRY_TOKEN",
"--project-slug", "YOUR_PROJECT_SLUG",
"--organization-slug", "YOUR_ORGANIZATION_SLUG"
]
}
}
}
}
Available Tools
1. get_sentry_issue
Retrieve and analyze specific Sentry issues:
- Input:
issue_id_or_url
(Sentry issue ID or URL) - Returns: Detailed issue information including stacktrace
2. get_list_issues
List and analyze issues for a project:
- Input: Project and organization slugs
- Returns: List of issues with key metrics
Development
Setup Development Environment
# Clone the repository
git clone https://github.com/qianniuspace/mcp-sentry.git
cd mcp-sentry
# Install development dependencies
uv pip install -e ".[dev]"
Running Tests
pytest
Debugging
Use the MCP inspector for debugging:
npx @modelcontextprotocol/inspector uvx mcp-sentry \
--auth-token YOUR_SENTRY_TOKEN \
--project-slug YOUR_PROJECT_SLUG \
--organization-slug YOUR_ORGANIZATION_SLUG
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Original codebase: MCP Servers Sentry
- Sentry.io for their excellent error tracking platform
- The MCP community for their continuous support
Support
- π Documentation
- π Issue Tracker
- π¬ Discussions