mcpField
M
mcp-sentry: A Sentry MCP Server

mcp-sentry: A Sentry MCP Server

Local
github.com/elliottlawsonDeveloper Tools1Updated 84w ago

About mcp-sentry: A Sentry MCP Server

mcp-sentry is an MCP server for developers and assistants investigating application errors in Sentry. It retrieves issue metadata and full stack traces by issue ID or URL, and provides a prompt for presenting the details as conversation context.

Key features

  1. 01Retrieve issues by ID or URL
  2. 02Inspect status, level, and event counts
  3. 03View first and last seen times
  4. 04Read full stack traces
  5. 05Use the sentry-issue prompt

Use cases

  1. 01Investigate a Sentry issue during debugging
  2. 02Review an error's stack trace and activity
  3. 03Provide issue details as assistant context

MCP support

Exposes a Sentry issue retrieval tool and the sentry-issue prompt to MCP clients. Access requires a Sentry authentication token.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"sentry-elliottlawson": {
"command": "npx",
"args": [
"-y",
"mcp-sentry"
]
}
}
}
Run commandnpx -y mcp-sentry

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmmcp-sentry

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

mcp-sentry: A Sentry MCP Server

A Model Context Protocol server for retrieving and analyzing issues from Sentry.io. This server provides tools to inspect error reports, stacktraces, and other debugging information from your Sentry account.

Overview

This MCP server allows AI assistants to access and analyze Sentry issues, providing detailed information about errors in your applications.

Tools
  1. get_sentry_issue

    Retrieve and analyze a Sentry issue by ID or URL

    Input:

    • issue_id_or_url (string): Sentry issue ID or URL to analyze

    Returns: Issue details including:

    • Title
    • Issue ID
    • Status
    • Level
    • First seen timestamp
    • Last seen timestamp
    • Event count
    • Full stacktrace
Prompts
  1. sentry-issue

    Retrieve issue details from Sentry

    Input:

    • issue_id_or_url (string): Sentry issue ID or URL

    Returns: Formatted issue details as conversation context

Installation

Prerequisites
  • Node.js 14 or later
  • A Sentry account with an authentication token
Using npm
npm install -g mcp-sentry

After installation, you can run it as a command:

mcp-sentry --auth-token YOUR_SENTRY_TOKEN

Or with the environment variable:

SENTRY_TOKEN=YOUR_SENTRY_TOKEN mcp-sentry
Using npx (without installation)
npx mcp-sentry --auth-token YOUR_SENTRY_TOKEN

Development

Project Structure
mcp-sentry/
├── src/
│   ├── index.ts           # Main entry point
│   ├── server.ts          # MCP server implementation
│   ├── sentry-client.ts   # Sentry API client
│   ├── models.ts          # Data models
│   ├── utils.ts           # Utility functions
│   └── types/             # Type definitions
├── build/                 # Compiled JavaScript files (included in the repository for direct npx execution)
├── package.json
├── tsconfig.json
└── README.md
Building
npm run build

Note: Unlike typical Node.js projects, the build directory is committed to this repository to support direct npx execution without requiring users to build the project themselves.

Running in Development Mode
npm run dev -- --auth-token YOUR_SENTRY_TOKEN

Authentication

This server requires a Sentry authentication token to access the Sentry API. You can provide this token in two ways:

  1. Using the --auth-token command-line option:

    mcp-sentry --auth-token YOUR_SENTRY_TOKEN
    
  2. Using the SENTRY_TOKEN environment variable:

    SENTRY_TOKEN=YOUR_SENTRY_TOKEN mcp-sentry
    

Usage with Claude Desktop

Add this to your Claude Desktop configuration:

"mcpServers": {
  "sentry": {
    "command": "mcp-sentry",
    "args": ["--auth-token", "YOUR_SENTRY_TOKEN"]
  }
}

Usage with Zed

Add to your Zed settings.json:

"context_servers": [
  "mcp-server-sentry": {
    "command": {
      "path": "mcp-sentry",
      "args": ["--auth-token", "YOUR_SENTRY_TOKEN"]
    }
  }
],

Debugging

You can use the MCP inspector to debug the server:

npx @modelcontextprotocol/inspector mcp-sentry --auth-token YOUR_SENTRY_TOKEN

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.