Download the PHP package stubbedev/sentry-mcp without Composer

On this page you can find all versions of the php package stubbedev/sentry-mcp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sentry-mcp

sentry-mcp

A Model Context Protocol (MCP) server for self-hosted Sentry, written in Go. Exposes tools for natural-language workflows around issues, events, stack traces, and debug-symbol triage.

Ships as a single static binary (stdlib + one small Go dependency) with a fast cold start and a tiny footprint. Install it whichever way fits your stack — npm (npx), Composer, a one-click Claude Desktop bundle, go install, a prebuilt release binary, or the Nix flake — and structured responses are projected and serialized as TOON — ~26% of the tokens of the raw nested JSON, with _full on every response to fetch back anything that was trimmed.

Note: This server targets self-hosted Sentry installs. It will also work against sentry.io, but the official Sentry MCP is a better fit there.


Tools

Workflow

Tool Description
sentry_get_dev_context Master entry point: configured instance + org, your Sentry identity, unresolved issues assigned to you, and recent unresolved issues across the org

Discovery & read

Tool Description
sentry_search Discover resources: issues (default), projects, teams, or users via resource param. Use users to look up valid usernames before assignment.
sentry_get_issue Full details for one issue (by ID or URL) with field/grep/stack-frame filtering to keep responses small
sentry_get_event Full details for one event with smart entry prioritisation and pagination
sentry_stack_frames Structured stack-trace frames only (function/file/line/inApp) — best for debug analysis
sentry_check_dsym Check whether iOS/macOS/Android debug symbols are missing for an event
sentry_raw_api Raw call to any Sentry API endpoint; drill with path, sketch with outline, filter with grepPattern, page with maxChars/charOffset

Mutation

Tool Description
sentry_mutate_issue Update status, assign, and/or add a comment on an issue in one call
sentry_comment Add, update, or delete a comment on an issue (action: add / update / delete)

Many tools accept project as an alias for projectSlug.

Natural language examples


Setup

1. Create a config file

Create ~/.sentry-mcp.json:

The $schema field is optional but enables editor autocomplete and validation.

The token needs at minimum: org:read, project:read, event:read. Add project:write and event:admin if you want to mutate issues or comment.

Alternatively, use environment variables (or a .env file in this directory):

Config is resolved in this order: --config <path> CLI arg → SENTRY_MCP_CONFIG env var → ~/.sentry-mcp.json → $XDG_CONFIG_HOME/sentry-mcp/config.json (defaults to ~/.config/sentry-mcp/config.json) → .sentry-mcp.json in cwd → environment variables. A leading ~ in --config / SENTRY_MCP_CONFIG is expanded by the server, so it also works when a GUI client launches it without a shell.

2. Install

The same server is published to both npm (@stubbedev/sentry-mcp) and Composer (stubbedev/sentry-mcp). Both fetch the prebuilt Go binary for your platform from the matching GitHub release, so neither needs Go: npm through a thin launcher, Composer at install time.

npm (Node 24+):

Composer (PHP 8.1+):

The Composer package is a Composer plugin: on composer install / update it downloads the binary for your OS and architecture to vendor/stubbedev/sentry-mcp/bin/sentry-mcp-native (sentry-mcp-native.exe on Windows), and your MCP client runs that directly, with no PHP at runtime. Composer asks once whether to trust the plugin; for non-interactive installs, allow it up front with composer config allow-plugins.stubbedev/sentry-mcp true (or composer global config ...). Set SENTRY_MCP_SKIP_DOWNLOAD=1 to skip the install-time download.

If you declined the plugin, the PHP launcher vendor/bin/sentry-mcp downloads the binary on its first run instead. With the pcntl extension (standard on Linux/macOS CLI builds) it execs the binary and exits; without it, one idle PHP process stays behind for the session.

npm and Composer download each release's binary once per user, verify it against the release's checksums.txt, and keep it in $XDG_CACHE_HOME/sentry-mcp/<version>/ (by default ~/.cache on Linux and FreeBSD, ~/Library/Caches on macOS, %LOCALAPPDATA% on Windows), and hardlink it into every install, or copy it where the install is on another filesystem. Further projects and git worktrees on the same version install without downloading anything. Delete old version directories to reclaim their space; installs keep their own link.

Every client example below uses npx. To use another install, swap only the command:

Install command args before the server flags
npx npx -y, @stubbedev/sentry-mcp@latest
npm global sentry-mcp —
npm per project node_modules/.bin/sentry-mcp —
Composer global sentry-mcp (with Composer's bin dir on PATH) —
Composer per project vendor/stubbedev/sentry-mcp/bin/sentry-mcp-native —
go install / release binary / Nix sentry-mcp, or its absolute path —

GUI clients (Claude Desktop, Cursor launched from the dock, and so on) do not inherit your shell's PATH or working directory, so give them an absolute command path — see Claude Desktop.

3. Connect to your AI tool

Which run method should I use?

Method Best for Trade-off
.mcpb bundle Claude Desktop — double-click install, credentials entered in a dialog Claude Desktop only; update by installing the next release's bundle
go install / prebuilt binary / Nix Lowest overhead — the MCP client execs the native binary directly, no Node or PHP process You manage updates (re-run go install, or nix run re-resolves on each launch)
npx @latest Easiest, zero install, always the newest version Auto-downloads the matching binary, but leaves one small idle Node process for the session (zero per-call latency — stdio is inherited)
Composer PHP projects — pin the version in composer.json/composer.lock next to the rest of your tooling and share one .mcp.json with the team Updates with composer update; needs PHP 8.1+

Recommendation: for day-to-day use point your client at the native binary (go install or Nix) for the leanest process; reach for npx when you want zero setup or pinned auto-updates, and Composer when the repo you work in is a PHP project. All the client configs below are interchangeable — swap the command/args for whichever method you picked.

Note: with npx, --prefer-online can break MCP startup in some clients. Keep the command simple and use the update steps when you want to refresh.


Claude Code

For a PHP project that has stubbedev/sentry-mcp in require-dev, commit a project-scoped .mcp.json so everyone on the team gets the server pinned to the version in composer.lock (Claude Code starts it from the project root, so the relative path resolves):

The same file with "command": "npx", "args": ["-y", "@stubbedev/sentry-mcp@latest"] does the job for an npm project. Credentials then come from each developer's ~/.sentry-mcp.json.


Claude Desktop

One-click (recommended). Grab the .mcpb bundle for your platform from the latest release — sentry-mcp_darwin_arm64.mcpb (Apple Silicon), sentry-mcp_windows_amd64.mcpb — then double-click it, drag it onto the Claude Desktop window, or use Settings → Extensions → Advanced settings → Install Extension…. The install dialog asks for the Sentry URL, auth token and org slug; the token is stored by Claude Desktop rather than in a file. Leaving the fields blank reuses an existing ~/.sentry-mcp.json.

The bundle carries the binary, so there is no Node, no npx, no PATH to fix and no JSON to edit. MCP Bundles are a Claude Desktop feature today; other clients use the config files below.

Manual config. Claude Desktop is a GUI app: it launches the server with a minimal PATH, no shell, and / as the working directory. So command must be an absolute path (a bare npx fails with spawn npx ENOENT), and a .env file or a relative --config path never resolves — pass credentials as env instead:

To keep npx, set command to the absolute path of your launcher (which npx, e.g. /opt/homebrew/bin/npx) with "args": ["-y", "@stubbedev/sentry-mcp@latest"]. For a Composer global install, use the absolute path of the proxy, e.g. /Users/you/.composer/vendor/bin/sentry-mcp (composer global config bin-dir --absolute prints the directory).

Server stderr is logged to ~/Library/Logs/Claude/mcp-server-sentry.log (macOS) or %APPDATA%\Claude\logs\mcp-server-sentry.log (Windows) — read that first when a connection fails.


Cursor

Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project-only):


Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:


Zed

Add to ~/.config/zed/settings.json:


OpenCode

Add to opencode.json in your project root (or ~/.config/opencode/opencode.json for global):

environment accepts the SENTRY_* variables if you would rather not keep a config file. Set "type": "remote" with "url" and "headers" to point at a shared HTTP server instead.


Codex (CLI, IDE extension, app)

One command — it writes the config all three read:

Or edit ~/.codex/config.toml directly (.codex/config.toml in a trusted project for a project-scoped server). Note the TOML table name is mcp_servers, with an underscore:

Codex picks the transport from the keys present: command means stdio, url means streamable HTTP — so a shared HTTP server is url = "http://127.0.0.1:8765/mcp" instead of command.


VS Code / GitHub Copilot

Or commit .vscode/mcp.json with a servers object of the same shape to share it with the repo.


Go install (no npm)

If you have Go installed and prefer a native binary on your PATH:

Then point your MCP client at the sentry-mcp command directly, e.g. for Claude Code:

Prebuilt binaries for every platform are also attached to each GitHub release if you'd rather not build.


Nix (flake)

The repo is a flake exposing a sentry-mcp package, app, and dev shell. Run it directly:

Or consume it from your own flake:

For an MCP client, point the command at the built binary, e.g.:

The package version is read from package.json (so it follows releases), and CI keeps vendorHash current automatically — see Releases.


Any other MCP-compatible tool

Most clients accept the Claude Desktop shape — an mcpServers object keyed by name, with command, args and env:

LM Studio uses exactly that shape in its own mcp.json (edit it from the app's plugin panel); Cherry Studio, Witsy, Jan and 5ire have in-app MCP dialogs with the same fields.

Goose is the exception — its ~/.config/goose/config.yaml uses extensions: with cmd rather than command:

Every GUI client brings the caveats from the Claude Desktop section: absolute command path, minimal PATH, no usable cwd — so pass credentials as env (or an absolute --config path) rather than relying on a .env file.


ChatGPT (desktop / web) — not supported

ChatGPT connectors accept remote HTTPS MCP servers only (streamable HTTP or SSE, with OAuth or no auth); it cannot spawn a local stdio server. This server's --http mode speaks the right protocol, but making it work would mean exposing an endpoint that reaches your self-hosted Sentry to OpenAI's servers, with no place in the connector UI for authentication this server would recognise. Use a client from the list above.

HTTP transport (behind a proxy)

By default the server speaks JSON-RPC over stdio. It can also serve the MCP Streamable HTTP transport on a single endpoint — useful when running behind a reverse proxy or sharing one process across clients.

Enable it with --http (or the SENTRY_MCP_HTTP_ADDR env var):

Flag Env Default
--http[=addr] SENTRY_MCP_HTTP_ADDR (or SENTRY_MCP_HTTP=1) 127.0.0.1:8765
--http-path=<path> SENTRY_MCP_HTTP_PATH /mcp

Behaviour:

Sentry credentials still come from the config file / env vars — the whole server uses one Sentry identity.

Workspace roots (cwd / repo root)

So the server can know which repo/working-tree it is acting on (e.g. for a future shell-calling tool), it accepts the working root two ways:

  1. MCP roots — if the client advertises the roots capability at initialize, the server requests roots/list over the SSE stream and caches the result (refreshed on notifications/roots/list_changed).
  2. Proxy header — a reverse proxy/harness can pin the root directly with a request header, avoiding the round-trip. Accepted headers (comma-separated for multiple, file:// URI or plain path):

    A header value takes precedence over roots/list.

The resolved roots are shown in sentry_get_dev_context. (No tool shells out today, so roots are currently informational — the plumbing is in place for when one does.)

Quick check:

Updating existing installs

If your MCP client is already configured and you want the newest package version:

Then restart your MCP client. Each update replaces the package directory, so the launcher fetches the new release's binary on the next start.


Manual install (optional)

If you prefer to clone and build locally (requires Go 1.26+):

Then use /path/to/sentry-mcp/sentry-mcp instead of the npx or Composer command in the configs above.


Output format (TOON)

Structured responses are serialized as TOON (Token-Oriented Object Notation) by default — a compact, LLM-friendly format that cuts ~30-60% of the tokens of equivalent JSON, with the biggest savings on uniform tables (issue lists, stack frames, users). Example:

Every data tool accepts format (toon | json) to override per call, and the env var SENTRY_MCP_FORMAT=json flips the default process-wide. Plain-text tools (sentry_get_dev_context, project listings, mutation/comment confirmations) are unaffected.


Issue references

Every tool that takes an issue accepts whichever form you have, because these are the forms the server itself hands out:

Form Example
Numeric ID 60741
Short ID KONTAINER-BACKEND-4JH — what sentry_get_dev_context prints and every issue row returns
Issue URL https://sentry.example.com/organizations/org/issues/60741/ (short-ID and ?query= links too)

Short IDs resolve through /organizations/{org}/shortids/{shortId}/; numeric IDs and URLs are parsed locally with no extra request.

Issue → trace in one call

sentry_get_event, sentry_stack_frames, and sentry_check_dsym take issueIdOrUrl on its own and read that issue's latest event — no project slug, no event ID:

The full resolution order is: an issue reference (with an optional eventId, where latest is the default) uses the issue-scoped endpoint; projectSlug + eventId reads that event; projectSlug alone falls through to the project's most recent issue. Failing that, the error names both routes and lists the org's project slugs.

sentry_search resource=issues searches the whole organization when no projectSlug is given, so listing projects first is no longer a prerequisite.

Assignment

sentry_mutate_issue assignedTo= accepts a username, an email, a real name, or team:slug, and resolves it against the org's members. An ambiguous name is an error listing the candidates. Sentry accepts an actor string it cannot resolve and silently leaves the issue unassigned, so the response is verified — an assignment that did not stick is reported as an error rather than a confirmation.


Compact responses

Sentry events can blow past LLM context limits — a single event with a long stack trace and many breadcrumbs is easily 100K+ tokens. TOON is only half the saving; the other half is projecting each payload before it is serialized. On a 25-issue list the two together come to ~26% of the raw nested shape (see TestIssueListStaysTabular).

TOON only collapses an array into a table when every row is a flat object with the same key set — one nested object, or one key missing from a single row, and the whole array falls back to expanded per-field blocks at ~2.5x the characters. So compact.go keeps rows flat and uniform:

Identifiers always survive — id, shortId, eventID, next_cursor are never hoisted or dropped — so a row can always be cross-referenced against another call.

Getting the detail back

Every projected response carries _full: the sentry_raw_api endpoint that returns the complete, unprojected payload. Nothing is lost, it just does not sit in the context window until asked for.

path walks the response with dot notation and numeric array indices, and a wrong path replies with the keys that were actually available. This is deliberately an endpoint string rather than a server-side handle: a handle would need session affinity to resolve, so it would die on restart and would not work across replicas or under stateless HTTP.

A response over ~20K tokens comes back as a shape sketch instead of its contents, so the follow-up is a path into the part that matters rather than a guessed grep pattern.

Per-call knobs

grepPattern filters the rendered response — the TOON or JSON text you would otherwise receive, not the raw Sentry JSON — so patterns are written against what the response actually looks like. It returns matching lines plus one line of context either side, always keeps the table header (without it the matched rows have no column names), and is case-insensitive.


Reliability

Tool annotations. Every tool declares whether it writes, via the MCP annotations field: the six read tools carry readOnlyHint, and sentry_mutate_issue, sentry_comment, and sentry_raw_api carry destructiveHint. Hosts use these to stop prompting for reads and gate the ones that mutate. sentry_raw_api is declared destructive because it accepts PUT/POST/DELETE, even though GET is the common case.

Transient failures are retried. A request is sent up to 3 times with exponential backoff from 250ms, honouring a Retry-After header when the server sends one. 429 is retried for any method, since the request was rejected before it did anything; 502/503/504 are retried only for GET/PUT/DELETE, because a POST that may already have been applied would double-post a comment. Request bodies are replayed per attempt. A wait that would outlast the call's deadline is declined rather than slept through, so a retry never eats the whole 60s tool-call budget just to fail at the end of it.

Startup does not block on Sentry. The identity and project-list lookups that decorate the server instructions run concurrently under a 5s budget, and the server starts with whatever came back. Previously they ran sequentially on an unbounded context inside main() before the transport started, so an unresponsive instance could leave a GUI client looking hung with no tools listed.


Releases (Maintainers)

Each release ships prebuilt Go binaries (attached to the GitHub release), the npm wrapper @stubbedev/sentry-mcp, and the Composer wrapper stubbedev/sentry-mcp. .github/workflows/publish.yml runs on a pushed v* tag and: cross-compiles binaries for 13 targets — linux (amd64, arm64, arm/v7, 386, ppc64le, s390x, riscv64), darwin (arm64), windows (amd64, arm64, 386), and freebsd (amd64, arm64) — packs five of them into .mcpb bundles for one-click Claude Desktop install (darwin arm64, windows/linux × amd64/arm64), attaches everything to the GitHub release, then publishes the npm package.

Bundle sources live in packaging/mcpb/ (manifest.template.json, icon.png, pack.sh). CI packs and validates one bundle on every run, so a manifest typo fails on the PR. npm run bundle builds one for the host platform into dist/.

Use semantic versioning. Breaking tool-surface changes should bump the minor version while <1.0.0 (for example 0.0.x -> 0.1.0).

Release flow — use the helper scripts (they run go vet + go test + smoke via preversion, bump package.json, then commit, tag, and push):

This runs npm version <type> (which creates the version commit and vX.Y.Z tag) then git push --follow-tags, which triggers publish.yml. Equivalent by hand:

The publish workflow verifies that package.json version matches the tag before publishing.

Required setup (one-time):


Creating a Sentry auth token

  1. Log in to your Sentry instance.
  2. Click your profile avatar → User settings → Auth tokens (or visit /settings/account/api/auth-tokens/).
  3. Click Create New Token.
  4. Give the token a name (e.g. sentry-mcp) and grant scopes:
    • org:read
    • project:read
    • event:read
    • project:write (only if you want to update issue status or assignee)
    • event:admin (only if you want to comment on issues)
  5. Click Create Token and copy the value — it will only be shown once.

Paste the token as sentry.token in your config file.


Development

Requires Go 1.26+. The only third-party dependency is the TOON encoder (github.com/toon-format/toon-go); everything else is the standard library.

To use a specific config file:

Built on the official modelcontextprotocol/go-sdk, which provides the JSON-RPC protocol, the stdio and Streamable HTTP transports, and the client roots round-trip.

Layout:


All versions of sentry-mcp with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-openssl Version *
composer-plugin-api Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package stubbedev/sentry-mcp contains the following files

Loading the files please wait ...