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
访问服务器

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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选