MCP Sentry para Cursor

MCP Sentry para Cursor

Um servidor MCP completo para integração com Sentry no Cursor, oferecendo 27 ferramentas para monitoramento de erros, performance e saúde de aplicações.

Category
Visit Server

Tools

sentry_capture_exception

Capture and send an exception to Sentry

sentry_capture_message

Capture and send a message to Sentry

sentry_add_breadcrumb

Add a breadcrumb for debugging context

sentry_set_user

Set user context for Sentry

sentry_set_tag

Set a tag that will be sent with all events

sentry_set_context

Set custom context data

sentry_start_transaction

Start a performance monitoring transaction

sentry_finish_transaction

Finish the current transaction

sentry_start_session

Start a new session for release health monitoring

sentry_end_session

End the current session with a specific status

sentry_set_release

Set the release version for release health tracking

sentry_capture_session

Manually capture a session for server-mode/request-mode

sentry_list_projects

List all projects in the organization

sentry_list_issues

List issues for a project

sentry_create_release

Create a new release

sentry_list_releases

List releases for a project

sentry_get_organization_stats

Get organization statistics

sentry_create_alert_rule

Create an alert rule for a project

sentry_resolve_short_id

Retrieve details about an issue using its short ID. Maps short IDs to issue details, project context and status.

sentry_get_event

Retrieve a specific Sentry event from an issue. Requires issue ID/URL and event ID.

sentry_list_error_events_in_project

List error events from a specific Sentry project. View recent errors, frequency patterns and occurrence timestamps.

sentry_create_project

Create a new project in Sentry. Track deployments, releases and health metrics.

sentry_list_issue_events

List events for a specific Sentry issue. Analyze event details, metadata and patterns.

sentry_get_issue

Retrieve and analyze a Sentry issue. Accepts issue URL or ID.

sentry_list_organization_replays

List replays from a Sentry organization. Monitor user sessions, interactions, errors and experience issues.

sentry_setup_project

Set up Sentry for a project returning a DSN and instructions for setup.

sentry_search_errors_in_file

Search for Sentry errors occurring in a specific file. Find all issues related to a particular file path or filename.

README

🚀 MCP Sentry para Cursor - Model Context Protocol Server

Um servidor MCP completo para integração com Sentry no Cursor, oferecendo 27 ferramentas para monitoramento de erros, performance e saúde de aplicações.

✨ Características

  • 27 Ferramentas Completas: 12 SDK + 15 API
  • Release Health: Monitoramento completo de sessões
  • Performance Monitoring: Transações e spans
  • Alertas Customizados: Regras de alerta automatizadas
  • Busca Avançada: Por arquivo, short ID, queries complexas
  • Setup Automático: Configuração de projetos com um comando
  • Monitor em Tempo Real: Script de monitoramento incluído

🛠️ Instalação Rápida

1. Clone e Configure

cd /Users/agents/Desktop/context-engineering-intro/sentry-mcp-cursor
npm install
npm run build

2. Configure as Credenciais

# Edite config.env com suas credenciais (já configurado)
nano config.env

3. Adicione ao Cursor

./add-to-cursor.sh

📚 Scripts Disponíveis

🚀 Inicialização

  • ./start-cursor.sh - Script otimizado para Cursor
  • ./start-standalone.sh - Inicia com validações e status detalhado
  • ./start.sh - Script padrão
  • ./start-mcp.sh - Script com configurações hardcoded

🧪 Testes e Monitoramento

  • ./test-standalone.sh - Executa suite completa de testes
  • ./monitor.sh - NOVO! Monitor em tempo real com estatísticas

🔧 Gerenciamento

  • ./add-to-cursor.sh - NOVO! Adiciona ao Cursor automaticamente
  • ./add-to-claude-code.sh - Adiciona ao Claude Code
  • ./remove-from-claude-code.sh - Remove do Claude Code

🎯 Ferramentas Disponíveis

SDK Tools (12)

  1. mcp__sentry__sentry_capture_exception - Captura exceções
  2. mcp__sentry__sentry_capture_message - Captura mensagens
  3. mcp__sentry__sentry_add_breadcrumb - Adiciona breadcrumbs
  4. mcp__sentry__sentry_set_user - Define usuário
  5. mcp__sentry__sentry_set_tag - Define tags
  6. mcp__sentry__sentry_set_context - Define contexto
  7. mcp__sentry__sentry_start_transaction - Inicia transação
  8. mcp__sentry__sentry_finish_transaction - Finaliza transação
  9. mcp__sentry__sentry_start_session - Inicia sessão
  10. mcp__sentry__sentry_end_session - Finaliza sessão
  11. mcp__sentry__sentry_set_release - Define release
  12. mcp__sentry__sentry_capture_session - Captura sessão

API Tools (15)

  1. mcp__sentry__sentry_list_projects - Lista projetos
  2. mcp__sentry__sentry_list_issues - Lista issues
  3. mcp__sentry__sentry_create_release - Cria release
  4. mcp__sentry__sentry_list_releases - Lista releases
  5. mcp__sentry__sentry_get_organization_stats - Estatísticas
  6. mcp__sentry__sentry_create_alert_rule - Cria alertas
  7. mcp__sentry__sentry_resolve_short_id - Resolve IDs curtos
  8. mcp__sentry__sentry_get_event - Obtém evento
  9. mcp__sentry__sentry_list_error_events_in_project - Lista erros
  10. mcp__sentry__sentry_create_project - Cria projeto
  11. mcp__sentry__sentry_list_issue_events - Lista eventos de issue
  12. mcp__sentry__sentry_get_issue - Obtém issue
  13. mcp__sentry__sentry_list_organization_replays - Lista replays
  14. mcp__sentry__sentry_setup_project - Setup de projeto
  15. mcp__sentry__sentry_search_errors_in_file - Busca erros em arquivo

💡 Uso no Cursor

No Cursor, as ferramentas ficam disponíveis com o prefixo mcp__sentry__:

// Capturar exceção
await mcp__sentry__sentry_capture_exception({
  error: "Database connection failed",
  level: "error",
  tags: {
    component: "database"
  }
});

// Listar projetos
await mcp__sentry__sentry_list_projects();

// Criar release
await mcp__sentry__sentry_create_release({
  version: "app@1.0.0",
  projects: ["coflow"]
});

📊 Monitor em Tempo Real

Execute o monitor para acompanhar estatísticas:

./monitor.sh

O monitor exibe:

  • Status do servidor MCP
  • Configuração no Cursor
  • Estatísticas das últimas 24h
  • Issues não resolvidas
  • Última release
  • Total de ferramentas disponíveis
  • Atualização automática a cada 30s

🧪 Testes

Execute a suite completa de testes:

./test-standalone.sh

🔍 Troubleshooting

Servidor não aparece no Cursor

# Verificar configuração
cat ../.cursor/mcp.json

# Reinstalar
./add-to-cursor.sh

# Reiniciar Cursor

Monitor não encontra servidor

# Verificar se o servidor está rodando
ps aux | grep "node dist/index.js"

# Reiniciar servidor no Cursor

📝 Configuração

config.env

SENTRY_DSN=https://782bbb46ddaa4e64a9a705e64f513985@o927801.ingest.us.sentry.io/5877334
SENTRY_AUTH_TOKEN=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
SENTRY_ORG=coflow
SENTRY_API_URL=https://sentry.io/api/0/
SENTRY_RELEASE=mcp-sentry-cursor@1.0.0
SENTRY_ENVIRONMENT=production

🎯 Melhorias Implementadas

Do MCP Claude Code:

  • ✅ Script monitor.sh para monitoramento em tempo real
  • ✅ Script add-to-cursor.sh para instalação automatizada
  • ✅ Melhor suporte para config.env no start-cursor.sh
  • ✅ Documentação atualizada com prefixos do Cursor

🔗 Links Úteis

📄 Licença

MIT


Desenvolvido com ❤️ para Cursor

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured