Sentry MCP
Officialsentry-mcp
Сервис MCP от Sentry в первую очередь предназначен для агентов кодирования с участием человека (human-in-the-loop). Наш выбор инструментов и приоритеты сосредоточены на рабочих процессах разработчиков и сценариях отладки, а не на предоставлении MCP-сервера общего назначения для всей функциональности Sentry.
Этот удаленный MCP-сервер выступает в качестве промежуточного звена для вышестоящего API Sentry, оптимизированного для помощников по программированию, таких как Cursor, Claude Code и аналогичных инструментов разработки. Он основан на работе Cloudflare по созданию удаленных MCP.
Начало работы
Вы найдете всю необходимую информацию, посетив развернутый сервис в рабочей среде:
Если вы хотите внести свой вклад, узнать, как это работает, или запустить это для self-hosted версии Sentry, продолжайте чтение ниже.
Плагин Claude Code
Установите как плагин Claude Code для автоматического делегирования субагентам:
claude plugin marketplace add getsentry/sentry-mcp
claude plugin install sentry-mcp@sentry-mcpЭто предоставляет субагент sentry-mcp, которому Claude автоматически делегирует задачи, когда вы спрашиваете об ошибках, инцидентах, трассировках или производительности в Sentry.
Для перспективных вариантов инструментов и функций:
claude plugin install sentry-mcp@sentry-mcp-experimentalStdio против Remote
Хотя этот репозиторий ориентирован на работу в качестве MCP-сервиса, мы также поддерживаем транспорт stdio. Это все еще находится в стадии разработки, но является самым простым способом адаптировать и запустить MCP для self-hosted установки Sentry.
Примечание: Инструменты поиска на базе ИИ (search_events, search_issues и т. д.) требуют провайдера LLM (OpenAI или Anthropic). Эти инструменты используют обработку естественного языка для перевода запросов в синтаксис запросов Sentry. Без настроенного провайдера эти конкретные инструменты будут недоступны, но все остальные инструменты будут функционировать нормально.
Чтобы использовать транспорт stdio, вам нужно создать токен аутентификации пользователя (User Auth Token) в Sentry с необходимыми областями доступа (scopes). На момент написания это:
org:read
project:read
project:write
team:read
team:write
event:writeЗапустите транспорт:
npx @sentry/mcp-server@latest --access-token=sentry-user-tokenНужно подключиться к self-hosted развертыванию? Добавьте --host (только имя хоста, например, --host=sentry.example.com) при выполнении команды.
Некоторые функции (например, Seer) могут быть недоступны в self-hosted экземплярах. Вы можете отключить определенные навыки, чтобы предотвратить отображение неподдерживаемых инструментов:
npx @sentry/mcp-server@latest --access-token=TOKEN --host=sentry.example.com --disable-skills=seerПеременные окружения
SENTRY_ACCESS_TOKEN= # Required: Your Sentry auth token
# LLM Provider Configuration (required for AI-powered search tools)
EMBEDDED_AGENT_PROVIDER= # Required: 'openai' or 'anthropic'
OPENAI_API_KEY= # Required if using OpenAI
ANTHROPIC_API_KEY= # Required if using Anthropic
# Optional overrides
SENTRY_HOST= # For self-hosted deployments
MCP_DISABLE_SKILLS= # Disable specific skills (comma-separated, e.g. 'seer')Важно: Всегда устанавливайте EMBEDDED_AGENT_PROVIDER, чтобы явно указать вашего провайдера LLM. Автоматическое определение только на основе ключей API является устаревшим и будет удалено в будущих выпусках. См. docs/embedded-agents.md для получения подробных параметров конфигурации.
Пример конфигурации MCP
{
"mcpServers": {
"sentry": {
"command": "npx",
"args": ["@sentry/mcp-server"],
"env": {
"SENTRY_ACCESS_TOKEN": "your-token",
"EMBEDDED_AGENT_PROVIDER": "openai",
"OPENAI_API_KEY": "sk-..."
}
}
}
}Если вы оставите переменную хоста не установленной, CLI автоматически нацеливается на SaaS-сервис Sentry. Устанавливайте переопределение только при работе с self-hosted Sentry.
Для self-hosted экземпляров, которые не поддерживают Seer:
{
"mcpServers": {
"sentry": {
"command": "npx",
"args": ["@sentry/mcp-server"],
"env": {
"SENTRY_ACCESS_TOKEN": "your-token",
"SENTRY_HOST": "sentry.example.com",
"MCP_DISABLE_SKILLS": "seer"
}
}
}
}Инспектор MCP
MCP включает Инспектор для легкого тестирования сервиса:
pnpm inspectorВведите URL-адрес MCP-сервера (http://localhost:5173) и нажмите «connect». Это должно запустить для вас процесс аутентификации.
Примечание: Если у вас возникли проблемы с потоком OAuth при доступе к инспектору на 127.0.0.1, попробуйте использовать localhost, посетив http://localhost:6274.
Related MCP server: Sentry MCP Server
Локальная разработка
Чтобы внести изменения, вам нужно настроить локальную среду:
Настройка среды и навыков агента:
make setup-env # Creates .env files and installs shared agent skillsЭто также запускает
npx @sentry/dotagents installдля установки общих навыков из getsentry/skills в.agents/skills/(символические ссылки в.claude/skillsи.cursor/skills). Если вам нужно обновить навыки позже, запустите это напрямую:npx @sentry/dotagents installСоздайте OAuth-приложение в Sentry (Настройки => API => Приложения):
URL домашней страницы:
http://localhost:5173Авторизованные URI перенаправления:
http://localhost:5173/oauth/callbackЗапишите свой Client ID и сгенерируйте Client secret
Настройте свои учетные данные:
Отредактируйте
.envв корневом каталоге и добавьте свойOPENAI_API_KEYОтредактируйте
packages/mcp-cloudflare/.envи добавьте:SENTRY_CLIENT_ID=ваш_клиентский_id_для_разработкиSENTRY_CLIENT_SECRET=ваш_клиентский_секрет_для_разработкиCOOKIE_SECRET=мой-супер-секретный-cookie
Запустите сервер разработки:
pnpm dev
Проверка
Запустите сервер локально, чтобы сделать его доступным по адресу http://localhost:5173
pnpm devЧтобы протестировать локальный сервер, введите http://localhost:5173/mcp в Инспекторе и нажмите «connect». Как только вы выполните инструкции, вы сможете «List Tools» (перечислить инструменты).
Тесты
Включены три набора тестов: модульные тесты, оценки (evals) и ручное тестирование.
Модульные тесты можно запустить с помощью:
pnpm testОценки требуют наличия файла .env в корне проекта с некоторой конфигурацией:
# .env (in project root)
OPENAI_API_KEY= # Also required for AI-powered search tools in productionПримечание: Корневой файл .env предоставляет значения по умолчанию для всех пакетов. Отдельные пакеты могут иметь свои собственные файлы .env для переопределения этих значений во время разработки.
Как только это будет сделано, вы можете запустить их с помощью:
pnpm evalРучное тестирование (предпочтительно для тестирования изменений MCP):
# Test with local dev server (default: http://localhost:5173)
pnpm -w run cli "who am I?"
# Test agent mode (use_sentry tool only)
pnpm -w run cli --agent "who am I?"
# Test against production
pnpm -w run cli --mcp-host=https://mcp.sentry.dev "query"
# Test with local stdio mode (requires SENTRY_ACCESS_TOKEN)
pnpm -w run cli --access-token=TOKEN "query"Примечание: CLI по умолчанию использует http://localhost:5173. Переопределите с помощью --mcp-host или установите переменную окружения MCP_URL.
Комплексные руководства по тестированию:
Тестирование Stdio: См.
docs/testing-stdio.mdдля получения полного руководства по сборке, запуску и тестированию реализации stdio (IDE, MCP Inspector)Удаленное тестирование: См.
docs/testing-remote.mdдля получения полного руководства по тестированию удаленного сервера (OAuth, веб-интерфейс, CLI-клиент)
Примечания по разработке
Автоматизированный обзор кода
Этот репозиторий использует инструменты автоматизированного обзора кода (например, Cursor BugBot), чтобы помочь выявить потенциальные проблемы в запросах на слияние (pull requests). Эти инструменты предоставляют полезные отзывы и предложения, но мы не рекомендуем делать эти проверки обязательными, так как точность все еще развивается и может давать ложные срабатывания.
Автоматизированные обзоры следует рассматривать как:
✅ Полезные предложения, которые стоит учесть при обзоре кода
✅ Отправные точки для обсуждения и улучшения
❌ Не блокирующие требования для слияния PR
❌ Не замена человеческому обзору кода
При работе с автоматизированными отзывами сосредоточьтесь на основных проблемах, а не на строгом выполнении каждого предложения.
Документация для участников
Хотите внести свой вклад или изучить полную карту документации? См. CLAUDE.md (также доступен как AGENTS.md) для рабочих процессов участников и полного индекса документации. Папка docs/ содержит тематические руководства и файлы .md, интегрированные с инструментами.
Available Tools
7 toolscreate_projectBInspect
Create a new project in Sentry, giving you access to a new SENTRY_DSN.
Use this tool when you need to:
Create a new project in a Sentry organization
Inputs: name (required), teamSlug (required), organizationSlug, platform.
create_teamBInspect
Create a new team in Sentry.
Use this tool when you need to:
Create a new team in a Sentry organization
Inputs: name (required), organizationSlug.
get_error_detailsAInspect
Retrieve error details from Sentry for a specific Issue ID, including the stacktrace and error message. Either issueId or issueUrl MUST be provided.
Use this tool when you need to:
Investigate a specific production error
Access detailed error information and stacktraces from Sentry
Inputs: issueId, issueUrl, organizationSlug.
list_organizationsBInspect
List all organizations that the user has access to in Sentry.
Use this tool when you need to:
View all organizations in Sentry
Inputs: no named parameters.
list_projectsBInspect
Retrieve a list of projects in Sentry.
Use this tool when you need to:
View all projects in a Sentry organization
Inputs: organizationSlug.
list_teamsAInspect
List all teams in an organization in Sentry.
Use this tool when you need to:
View all teams in a Sentry organization
Inputs: organizationSlug.
search_errors_in_fileAInspect
Search for errors recently occurring in a specific file. This is a suffix based search, so only using the filename or the direct parent folder of the file. The parent folder is preferred when the filename is in a subfolder or a common filename.
Use this tool when you need to:
Search for production errors in a specific file
Analyze error patterns and frequencies
Find recent or frequently occurring errors.
Inputs: filename (required), organizationSlug, sortBy.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools have distinct purposes, such as create_project vs. list_projects, but get_error_details and search_errors_in_file could potentially overlap in error investigation scenarios, which might cause slight confusion. Overall, the boundaries are clear with only minor ambiguity.
All tools follow a consistent verb_noun naming pattern using snake_case, such as create_project, list_organizations, and search_errors_in_file. This uniformity makes the tool set predictable and easy to understand.
With 7 tools, the count is reasonable for a Sentry-focused server, covering core operations like project, team, and error management. However, it feels slightly thin as it lacks update or delete operations, which are common in such domains.
The tool set covers creation and listing for projects, teams, and organizations, plus error retrieval and search, but it has notable gaps. Missing update/delete tools for projects and teams, and no error resolution or comment features, limit full lifecycle coverage for Sentry's domain.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
The Telnyx MCP server is an official implementation of the Model Context Protocol that enables AI clients (like Claude Desktop, Cursor, and OpenAI Agents) to interact with Telnyx's telephony, messaging, and AI assistant APIs. It provides comprehensive capabilities including making and managing phone calls, sending SMS/MMS messages, purchasing and configuring phone numbers, creating AI assistants with custom instructions, managing cloud storage buckets, scraping and embedding website content, and handling integration secrets. The server exists as both a local implementation and a remotely hosted version, allowing developers to integrate real-world communication infrastructure directly into AI applications.
A Model Context Protocol server for Wix AI tools
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Related MCP Servers
- FlicenseBqualityDmaintenanceA Model Context Protocol server that retrieves and analyzes Sentry.io issues, allowing users to inspect error reports, stacktraces, and debugging information from their Sentry account.223-
- AlicenseBqualityFmaintenanceA 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.1121ISC
- AlicenseNot gradedqualityDmaintenanceA TypeScript implementation of a Model Context Protocol server that connects to Sentry error tracking service, allowing AI models to query and analyze error reports and events.17 npmMIT
- AlicenseNot gradedqualityDmaintenanceA TypeScript server that allows AI agents to access, retrieve, and analyze Sentry error data through the Modern Context Protocol.34 npm2MIT