@sentry/mcp-server

0.16.0 • Public • Published

sentry-mcp

This is a prototype of an MCP server, acting as a middleware to the upstream Sentry API provider.

This package is primarily for running the stdio MCP server. If you do not know what that is, or do not need it, we suggest using the public remote service:

https://mcp.sentry.dev

To utilize the stdio transport, you'll need to create an User Auth Token in Sentry with the necessary scopes. As of writing this is:

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

Launch the transport:

npx @sentry/mcp-server@latest --access-token=sentry-user-token --host=sentry.example.com
# or with full URL
npx @sentry/mcp-server@latest --access-token=sentry-user-token --url=https://sentry.example.com

Note: You can also use environment variables:

SENTRY_ACCESS_TOKEN=your-token
SENTRY_HOST=sentry.example.com     # Custom hostname
SENTRY_URL=https://sentry.io       # OR base URL (precedence over SENTRY_HOST)

The host configuration accepts two distinct formats:

  • SENTRY_HOST: Hostname only (no protocol)
    • Examples: sentry.io, sentry.example.com, localhost:8000
  • SENTRY_URL: Full URLs (hostname will be extracted)
    • Examples: https://sentry.io, https://sentry.example.com
    • Takes precedence over SENTRY_HOST if both are provided

Note: Only HTTPS connections are supported for security reasons.

By default we also enable Sentry reporting (traces, errors) upstream to our cloud service. You can disable that, or send it to a different Sentry instance by using the --sentry-dsn flag:

# disable sentry reporting
npx @sentry/mcp-server@latest --sentry-dsn=

# use custom sentry instance
npx @sentry/mcp-server@latest --sentry-dsn=https://publicKey@mysentry.example.com/...

/@sentry/mcp-server/

    Package Sidebar

    Install

    npm i @sentry/mcp-server

    Weekly Downloads

    1,492

    Version

    0.16.0

    License

    FSL-1.1-ALv2

    Unpacked Size

    5.14 MB

    Total Files

    494

    Last publish

    Collaborators

    • billyvg
    • mitsuhiko
    • haza
    • jauer
    • sentry-bot
    • evanpurkhiser
    • lynnagara
    • leedongwei
    • markstory
    • zeeg