Sentry MCP HTTP Bridge
Go HTTP wrapper around the official @sentry/mcp-server stdio transport. Clients authenticate with a whitelisted Sentry access token via Authorization: Bearer <token> (CodeRabbit and most MCP clients). Sentry-Bearer is also accepted for compatibility with mcp.sentry.dev-style configs.
The bridge spawns npx @sentry/[email protected] as a subprocess and forwards MCP Streamable HTTP requests to its stdin/stdout.
Quick start
make build
cp passfile.example passfile
chmod 600 passfile
# edit passfile — add user:token lines
./bin/sentry-mcp-bridge
Connect from an MCP client (use a token from the passfile):
{
"mcpServers": {
"sentry": {
"url": "http://localhost:8080/mcp",
"headers": {
"Authorization": "Bearer ${SENTRY_ACCESS_TOKEN}"
}
}
}
}
CodeRabbit: In the MCP server form, set auth header name to Authorization and value to Bearer <your-passfile-token> (the token from the user:access-token line, not the user name).
Scoped endpoints match the hosted service:
http://localhost:8080/mcp— all organizationshttp://localhost:8080/mcp/my-org— one organizationhttp://localhost:8080/mcp/my-org/my-project— one project
Query parameters:
?experimental=1— enable experimental tools?skills=inspect,issues— restrict enabled skills?disable-skills=seer— remove skills from the default set
Configuration
Authentication
Access is controlled by a passfile whitelist (passfile by default, mode 0600 required). Each line is user:access-token (htpasswd-style):
coderabbit:sntryu_your_sentry_user_token
brandon:another_token
Clients send the passfile access token as Authorization: Bearer <access-token>. The bridge maps the token to user for logs and audit. Sentry-Bearer is accepted as an alias. Unknown tokens receive 401.
Copy passfile.example to passfile, set mode 600, and add your entries. The passfile is gitignored.
Logging
Structured JSON logs go to stderr (server events) and logs/audit.jsonl (HTTP audit trail).
Audit fields include user, method, path, status, duration_ms, mcp_method, mcp_session_id_in / mcp_session_id_out, and redacted token_in / token_out (first 4 + last 4 characters).
Bearer token scope
This bridge uses standard Bearer for whitelisted Sentry user tokens (unlike mcp.sentry.dev, where Bearer is reserved for MCP OAuth grants). The passfile token is forwarded to the stdio server via --access-token and is not refreshed by the bridge.
Development
make test
make verify-upstream # optional: checks npx can run the pinned package