Skip to content

Add 'sentry mcp' subcommand to run MCP server in stdio mode #1220

Description

@dcramer

Add a sentry mcp subcommand that launches the sentry-mcp server in stdio mode, automatically binding the access token from the CLI's existing auth stack — no manual token configuration required.

Current behavior

Users must run sentry-mcp as a separate tool and manually supply an access token. There's no path to launch the MCP server with credentials already managed by the CLI.

Gap

  • MCP clients (Claude, Cursor, etc.) need a single shell command to wire up the Sentry MCP server. Wrapping it as sentry mcp gives users a zero-config entry point that reuses their existing sentry login credentials.
  • Without this, discoverability and setup friction are high — users have to know about sentry-mcp as a separate package and obtain a token independently.

Implementation notes

  • Can be done pre-repo merge by having sentry-cli take a dependency on sentry-mcp (or exec it) and invoking it in --transport stdio mode.
  • Auth binding should follow the same resolution order the CLI already uses: stored credentials → SENTRY_AUTH_TOKEN env var.
  • MCP client config would simplify to: { "command": "sentry", "args": ["mcp"] }.

--

View Junior Session in Sentry

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions