Table of contents

Developers building tools that integrate with Sentry, such as an alert routing system that pages the right team based on error context, need to understand Sentry's data model while writing the code.
What are the valid project slugs for API endpoint paths? What does a Sentry event payload actually contain, and how are exception frames structured? What condition types does Sentry accept when creating alert rules programmatically?
Without the MCP connection, answering those questions means leaving Cursor, authenticating against Sentry's API separately, running test calls, and copying responses back into the session where the integration code is being written.
To help your developers inspect Sentry's data model and query real project data without leaving Cursor, we'll show you how to connect Sentry with Merge Agent Handler's Sentry MCP server.
Merge Agent Handler connects Cursor to the Sentry API through the Merge CLI.
Install the CLI, authenticate once, and run a single setup command from your project root.
That command writes a ## Merge CLI section to the project's .cursorrules file, which tells Cursor's agent when to call merge search-tools and merge execute-tool to reach Sentry.
Once connected, Merge handles Sentry's authentication token lifecycle so you never store API credentials locally or rewire auth when tokens change.
Here's the registration command:
Before getting started, you'll need the following:
pipx --version to confirm, or install via pip install pipx)If you want to connect Merge Agent Handler's Sentry MCP with internal or customer-facing agentic products, you can follow the steps in our docs.
Run the following to install the Merge CLI: pipx install merge-api
Verify your installation: merge --version
Related: How to use the Sentry MCP in Claude Code
Authenticate the CLI with your Merge Agent Handler account: merge login
This links the CLI to your account so it can make authorized requests to Sentry on your behalf.
Run the following from the root of the project where you want to use Merge tools:
This writes a ## Merge CLI section to .cursorrules so Cursor knows to use the CLI for third-party services. The command is idempotent, safe to re-run if you need to reset.
Open a Cursor chat in your project and start with a query that reflects real integration work. For example: "Fetch the list of projects in my Sentry organization, including their slugs, platform types, and team assignments, so I can write correct API endpoint paths in my integration."
The first time you invoke a Sentry tool, a Magic Link will appear to complete connector authentication.

{{this-blog-only-cta}}
In case you have more questions on setting up and using the Sentry MCP in Cursor, we've addressed several more commonly-asked questions below.
With Sentry connected, Cursor can:
You can connect directly to Sentry's API using an auth token. Sentry's REST API is well-documented, token generation is straightforward, and for a single developer building against their own organization the setup is fast.
The access control problem appears when you scale beyond one developer or one agent.
A Sentry auth token carries the permissions of the account that generated it. Sharing it across agents or team members means every agent operates with the same level of access, with no way to restrict which projects or operations a given agent can reach. Rotating the token requires updating every system that holds it at once.
Merge Agent Handler handles Sentry authentication centrally.
You define exactly which Sentry operations each agent is allowed to call. Every call is also logged with the timestamp, tool, and inputs, so you have a full audit trail of what each agent read or modified.
For teams running multiple agents against a shared Sentry organization, that combination of scoped access and central logging is the difference between a controlled deployment and a shared credential problem.
Sentry's API data isn't something you can accurately reconstruct from documentation alone.
These values are organization-specific: slug identifiers differ across environments, tag schemas reflect what your instrumentation actually emits, and alert rule conditions reflect the exact threshold types your organization has configured.
Connecting Sentry to Cursor puts that discovery step inside the editor.
Use Merge Agent Handler’s 150+ connectors (including Sentry) to power reliable, secure, and powerful agents.