Skip to main content
Glama
MCP Sentry para Cursor

MCP Sentry para Cursor

🚀 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

Related MCP server: Sentry MCP Server

🛠️ 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

📄 Licença

MIT


Desenvolvido com ❤️ para Cursor

Available Tools

27 tools
sentry_add_breadcrumbC

Add a breadcrumb for debugging context

Inputs: message (required), category, level, data.

sentry_capture_exceptionC

Capture and send an exception to Sentry

Inputs: error (required), level, tags, context, +1 more.

sentry_capture_messageC

Capture and send a message to Sentry

Inputs: message (required), level, tags, context.

sentry_capture_sessionC

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

Inputs: sessionId (required), distinctId, status, duration, +1 more.

sentry_create_alert_ruleC

Create an alert rule for a project

Inputs: projectSlug (required), name (required), conditions, actions, +1 more.

sentry_create_projectC

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

Inputs: name (required), slug (required), team (required), platform.

sentry_create_releaseC

Create a new release

Inputs: version (required), projects, url, dateReleased.

sentry_end_sessionC

End the current session with a specific status

Inputs: status.

sentry_finish_transactionC

Finish the current transaction

Inputs: status.

sentry_get_eventB

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

Inputs: projectSlug (required), eventId (required).

sentry_get_issueB

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

Inputs: issueId (required).

sentry_get_organization_statsC

Get organization statistics

Inputs: stat (required), since, until, resolution.

sentry_list_error_events_in_projectC

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

Inputs: projectSlug (required), limit, query.

sentry_list_issue_eventsC

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

Inputs: issueId (required), limit.

sentry_list_issuesC

List issues for a project

Inputs: projectSlug (required), query.

sentry_list_organization_replaysC

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

Inputs: project, limit, query.

sentry_list_projectsB

List all projects in the organization

Inputs: no named parameters.

sentry_list_releasesC

List releases for a project

Inputs: projectSlug (required).

sentry_resolve_short_idB

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

Inputs: shortId (required).

sentry_search_errors_in_fileB

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

Inputs: projectSlug (required), filename (required).

sentry_set_contextC

Set custom context data

Inputs: name (required), context (required).

sentry_set_releaseC

Set the release version for release health tracking

Inputs: release (required), dist.

sentry_set_tagC

Set a tag that will be sent with all events

Inputs: key (required), value (required).

sentry_setup_projectC

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

Inputs: projectSlug (required), platform.

sentry_set_userC

Set user context for Sentry

Inputs: id, email, username, ip_address, +1 more.

sentry_start_sessionC

Start a new session for release health monitoring

Inputs: distinctId, sessionId, release, environment.

sentry_start_transactionC

Start a performance monitoring transaction

Inputs: name (required), op (required), description.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 27 tools

    Disambiguation4/5

    Most tools have distinct purposes targeting specific Sentry resources or actions, with clear separation between event capture, issue management, project operations, and monitoring. However, some overlap exists between 'sentry_setup_project' and 'sentry_create_project', and between 'sentry_capture_session' and 'sentry_start_session/end_session', which could cause minor confusion.

    Naming Consistency5/5

    All tools follow a consistent 'sentry_verb_noun' pattern with snake_case throughout, making them predictable and easy to parse. The naming convention is uniform across all 27 tools, with no deviations in style or structure.

    Tool Count3/5

    With 27 tools, the count is borderline high for a Sentry integration, feeling somewhat heavy compared to typical well-scoped servers (3-15 tools). While Sentry is a complex platform, this many tools may overwhelm agents and suggest potential fragmentation or redundancy in the surface.

    Completeness5/5

    The tool set provides comprehensive coverage of Sentry's core functionalities, including error/exception capture, issue management, project/release operations, performance monitoring, session tracking, and alerting. There are no obvious gaps, and the surface supports full CRUD/lifecycle workflows for the domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      F
      maintenance
      A Model Context Protocol server that enables AI assistants to interact with Sentry for error tracking and monitoring, allowing retrieval and analysis of error data, project management, and performance monitoring through the Sentry API.
      11
      21
      ISC
    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that connects to Sentry.io or self-hosted Sentry instances to retrieve and analyze error reports, stack traces, and debugging information.
      3
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that instruments Cursor AI agent interactions with OpenTelemetry traces and logs to monitor agent turns and performance. It enables tracking of user queries, assistant responses, and tool usage through GenAI-compliant telemetry spans.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      MCP server for self-hosted Sentry instances, providing tools to query and triage issues and events, inspect stack frames, manage releases, and access raw Sentry API.
      28
      35 npm
      10
      MIT