logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

sentry-mcp-adapter

Facilitates connection to the Sentry Application Performance Monitoring (APM) and error logging service. Embeds Sentry's diagnostic features directly within Large Language Model (LLM) execution contexts via a remote Model Context Protocol (MCP) intermediary.

Author

sentry-mcp-adapter logo

getsentry

Other

Quick Info

GitHub GitHub Stars 367
NPM Weekly Downloads 326
Tools 1
Last Updated 2026-02-19

Tags

sentrymiddlewarellmsentry apisentry capabilitiesconnect sentry

sentry-mcp-adapter: LLM Integration for Sentry Telemetry

Coverage Status

This MCP service from Sentry is engineered chiefly for AI-driven coding assistants engaging in human-in-the-loop operations. Our utility design and priority settings emphasize developer productivity enhancements and debugging scenarios, as opposed to furnishing a comprehensive, generalized MCP server spanning the entire Sentry feature set.

This remote MCP gateway functions as a translation layer (middleware) bridging to the core Sentry REST API, specifically optimized for integration with code-aware agents such as Cursor, Claude Code, and comparable development environments. Its architecture is inspired by Cloudflare's pioneering efforts in remote MCP servers.

Initial Setup Guide

You can find all requisite deployment information by accessing the live, operational service here:

https://mcp.sentry.dev

For those interested in source code contribution, understanding the internal mechanisms, or setting up a self-hosted instance of this Sentry intermediary, please review the subsequent sections.

Transport Mechanisms: Stdio vs. Remote Invocation

Although the primary focus of this project is operating as an MCP server over the network, we also offer support for a stdio communication transport method. This pathway is currently under active development but represents the simplest route for utilizing the MCP against a locally deployed Sentry installation.

Crucial Note: The specialized, AI-enhanced query functionalities (search_events and search_issues) necessitate a valid OpenAI API credential. These features employ natural language processing models to convert human queries into Sentry's native query dialect. Absence of the OpenAI key will disable these specific tools, though all other integrated functionalities will remain operational.

To activate the stdio transport, you must generate a User Authentication Token within Sentry, ensuring it possesses the following minimum requisite permissions:

org:read
project:read
project:write
team:read
team:write
event:write

To initiate the transport process:

npx @sentry/mcp-server@latest --access-token=sentry-user-token

If you need to interface with a self-hosted Sentry instance, append the --host parameter (providing only the hostname, e.g., --host=sentry.example.com) when executing the command.

Alternatively, environment variables can be leveraged for configuration:

SENTRY_ACCESS_TOKEN=
# Optional configurations for self-hosted setups
SENTRY_HOST=
OPENAI_API_KEY=  # Mandated for AI-driven search capabilities (search_events, search_issues)

If the host variable is omitted, the command-line interface defaults to targeting the official Sentry Software-as-a-Service platform. Configuration overrides via environment variables should only be applied when operating a self-managed Sentry deployment.

Utilizing the MCP Inspector Utility

The MCP framework incorporates an Inspector Utility designed to simplify testing of the service endpoints:

pnpm inspector

Provide the MCP server URL (e.g., <http://localhost:5173>) and establish the connection. This action should automatically initiate the necessary authentication sequence.

Observation: Should OAuth connection encounters difficulties when accessing the inspector via 127.0.0.1, attempt using the loopback alias localhost instead by navigating to http://localhost:6274.

Local Environment Configuration for Contributions

To facilitate ongoing development and code submissions, the local environment must be correctly provisioned:

  1. Establish Environment Configuration Files:

bash make setup-env # Generates necessary .env files from templates

  1. Register an OAuth Application within Sentry (Navigate to Settings => API => Applications):

  2. Application Homepage URI: http://localhost:5173

  3. Permitted Redirect URIs: http://localhost:5173/oauth/callback
  4. Record the generated Client Identifier and Client Secret.

  5. Input Credentials into Configuration Files:

  6. Modify the root directory's .env file to include your OPENAI_API_KEY.

  7. Update packages/mcp-cloudflare/.env with the following details:

    • SENTRY_CLIENT_ID=your_development_sentry_client_id
    • SENTRY_CLIENT_SECRET=your_development_sentry_client_secret
    • COOKIE_SECRET=my-super-secret-cookie
  8. Initiate the Development Server Stack:

bash pnpm dev

Verification Steps

Execute the server locally to ensure it is reachable at http://localhost:5173:

pnpm dev

To validate the local endpoint, input http://localhost:5173/mcp into the Inspector interface and click connect. Upon successfully navigating the required authentication prompts, the system should permit the "List Tools" operation.

Testing Protocols

Two distinct testing suites are integrated within the project structure: standard unit verification and specific evaluation benchmarks.

Unit tests can be executed using the following command:

pnpm test

Evals require the presence of a populated .env file in the project root containing the necessary operational configuration:

# .env file (located in project root)
OPENAI_API_KEY=  # Also mandatory for activating AI-driven search features in production builds

Note: The configuration in the root .env file establishes baseline defaults applicable across all packages. Individual sub-packages permit their own .env files to supersede these defaults during local iterative development.

Once configuration is complete, run the evaluation suite:

pnpm eval

Development Guidelines

Automated Code Review Systems

This repository employs automated scrutiny tools (such as Cursor BugBot) to aid in identifying potential flaws within submitted pull requests. While these agents deliver useful critique and suggested revisions, we strongly advise against enforcing these checks as mandatory merge requirements, given that their precision continues to mature and may result in spurious flagging.

The automated analysis output should be interpreted as follows:

  • Constructive Input: Recommendations to weigh during the peer review process.
  • Initiation Points: Prompts to foster dialogue and areas for refinement.
  • Non-Blocking Constraints: Not mandatory prerequisites for merging code.
  • Substitutes for Human Oversight: They do not replace diligent, human-led code inspection.

When responding to automated advisories, concentrate on resolving the fundamental issue being flagged, rather than adhering rigidly to every specific suggestion provided.

Contributor Documentation Access

If you plan to contribute code or seek the complete documentation index, refer to CLAUDE.md (which mirrors the content in AGENTS.md) detailing contributor methodologies and the full reference map. The docs/ directory houses topic-specific manuals and documentation files formatted in the .mdc standard for tool integration.

WIKIPEDIA: Enterprise administration software encompasses the systems, applications, regulatory frameworks, computational methods, and procedural blueprints utilized by commercial entities to successfully navigate evolving market dynamics, maintain a competitive edge, and elevate overall organizational effectiveness.

== General Perspective == Business tooling can be categorized based on organizational function or department, addressing aspects like strategic planning, operational control, record-keeping, personnel management, decision support, and performance monitoring. A functional classification typically recognizes these universal elements:

Mechanisms for data entry and verification across all divisions. Utilities focused on governing and refining operational workflows. Systems dedicated to data aggregation and facilitating executive judgments. Modern enterprise management solutions have undergone radical technological transformation over the past decade, presenting a challenge in selecting optimal business tools for varied corporate contexts. This situation is driven by persistent pressures to minimize expenditures, maximize revenue streams, deeply comprehend client needs, and deliver products precisely conforming to those demands. Within this dynamic environment, management must adopt a strategic framework for selecting business management instruments, rather than simply adopting the newest available technology. Over-reliance on tools without proper organizational tailoring frequently results in systemic instability. Consequently, business management applications must be chosen deliberately and subsequently customized to fit the specific requirements of the enterprise, reversing the typical approach.

== Predominant Selections == In 2013, a global assessment by Bain & Company charted the worldwide adoption rates of business methodologies. These choices reflect regional priorities shaped by market conditions and economic shifts. The leading ten methodologies identified included:

Strategic Planning Frameworks Customer Relationship Management (CRM) Employee Sentiment Surveying Competitive Benchmarking Balanced Scorecard Implementation Core Competency Analysis Outsourcing Strategy Organizational Change Management Programs Supply Chain Logistics Oversight Mission and Vision Statement Development Market Segmentation Analysis Total Quality Management (TQM)

== Commercial Software Applications == Software, or integrated collections of computer programs, employed by business personnel to execute diverse corporate functions, is termed business application software. These applications are deployed to enhance throughput, quantify performance metrics, and execute other enterprise tasks with precision. The evolution moved from early Management Information Systems (MIS) to comprehensive Enterprise Resource Planning (ERP) platforms, followed by the integration of Customer Relationship Management (CRM), ultimately leading to the current domain of cloud-based business management suites. While a verifiable link exists between IT investment and organizational success, two factors are paramount for realizing tangible value: the proficiency of the implementation process and the judicious selection and adaptation of the underlying technological tools.

== Tools Tailored for Small and Medium Enterprises (SMEs) == Tools specifically designed for SMEs hold significant importance as they furnish cost-effective pathways to implement sophisticated management practices, enabling smaller entities to scale operations effectively.

See Also

`