Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d188199
ref(mcp): Retire @sentry/mcp-server in favor of sentry mcp
sentry-junior[bot] Oct 29, 2026
0a9030e
fix(cli): Keep SENTRY_ACCESS_TOKEN docs out of command example checks
sentry-junior[bot] Oct 29, 2026
d0d205e
fix(mcp): Tag sentry mcp telemetry with the stdio environment
sentry-junior[bot] Oct 29, 2026
38feffc
fix(mcp): Use refreshed tokens after an upstream 401 and fix the fx s…
sentry-junior[bot] Oct 29, 2026
916bc64
Merge remote-tracking branch 'origin/main' into ref/retire-mcp-server…
sentry-junior[bot] Oct 29, 2026
418e851
fix(lint): Apply the CLI import ban to toolkit-core sources
sentry-junior[bot] Oct 29, 2026
e5188d1
Merge remote-tracking branch 'origin/main' into ref/retire-mcp-server…
sentry-junior[bot] Oct 29, 2026
982a007
feat(mcp-server): Ship @sentry/mcp-server as a slim bundle of sentry mcp
sentry-junior[bot] Oct 29, 2026
1dba7c6
fix(mcp): Tear down after --help, --version, and sentry-mcp auth
sentry-junior[bot] Oct 29, 2026
26387b2
docs(mcp): Keep @sentry/mcp-server as the recommended stdio install
sentry-junior[bot] Oct 29, 2026
47afbd0
fix(mcp-server): Point auth hints at the package's own auth login
sentry-junior[bot] Oct 30, 2026
b83e10d
docs(mcp): Lead stdio docs with @sentry/mcp-server, document one acco…
sentry-junior[bot] Oct 30, 2026
d43709b
fix(mcp): Pin token refreshes to the account the server started with
sentry-junior[bot] Oct 30, 2026
e2f60b2
fix(mcp): Check the pinned account's identity on every refresh
sentry-junior[bot] Oct 30, 2026
d8f5d23
fix(mcp): Apply the .sentryclirc URL trust gate before serving
sentry-junior[bot] Oct 30, 2026
44563a2
fix(mcp): Keep fatal exit codes and handle closed pipes in the bundle
sentry-junior[bot] Oct 30, 2026
ebb182f
fix(mcp): Make dev:stdio launch the CLI MCP server
sentry-junior[bot] Oct 30, 2026
4c673d3
fix(mcp): Trust matching org tokens for rc targets and keep the rc sh…
sentry-junior[bot] Oct 30, 2026
aeb2251
ref(mcp): Publish @sentry/mcp-server with every CLI release
sentry-junior[bot] Oct 30, 2026
9995e37
ref(mcp-server): Own the bundle script, stub CLI-only modules, report…
sentry-junior[bot] Oct 30, 2026
1dcae12
Merge remote-tracking branch 'origin/main' into ref/retire-mcp-server…
sentry-junior[bot] Oct 30, 2026
83ef177
fix(mcp): Name the running binary in arg errors and tag its real version
sentry-junior[bot] Oct 30, 2026
f5c4c31
fix(mcp): Always report the running release and keep the release work…
sentry-junior[bot] Oct 30, 2026
53fc92f
fix(mcp): Serialize manual MCP Registry retries with the release run
sentry-junior[bot] Oct 30, 2026
f9ba7f9
perf(cli): Bundle only Zod's English locale
sentry-junior[bot] Oct 30, 2026
d783533
perf(cli): Load syntax highlighting lazily and allow compiling it out
sentry-junior[bot] Oct 30, 2026
85e554e
ref(cli): Read the route tree from a registry instead of app.ts
sentry-junior[bot] Oct 30, 2026
d4ce7e9
Merge remote-tracking branch 'origin/main' into ref/retire-mcp-server…
sentry-junior[bot] Oct 30, 2026
8a8dbf4
Merge remote-tracking branch 'origin/ref/cli-route-registry' into ref…
sentry-junior[bot] Oct 30, 2026
cea3755
Merge remote-tracking branch 'origin/perf/cli-lazy-syntax-highlight' …
sentry-junior[bot] Oct 30, 2026
2eb9077
Merge remote-tracking branch 'origin/perf/zod-english-locales' into r…
sentry-junior[bot] Oct 30, 2026
261e371
feat(mcp): Serve stdio on MCP SDK v2
sentry-junior[bot] Oct 31, 2026
ffeaf9b
ref(mcp-server): Run the CLI runner with an mcp, auth, and help app
sentry-junior[bot] Oct 31, 2026
7a2f0a2
docs(mcp): Name the package's own auth commands in stdio-auth
sentry-junior[bot] Oct 31, 2026
69e6525
fix(mcp-server): Keep a lone -v printing the version
sentry-junior[bot] Oct 31, 2026
9977bb0
fix(cli): Keep mcp-core out of the command tree
sentry-junior[bot] Oct 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions .agents/skills/mcp-qa/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,27 @@ Fix any failures before proceeding.
This is the primary QA path for tool behavior. Stdio runs the local MCP server
against prod Sentry without depending on the Cloudflare worker, local `/mcp`
route, or Cloudflare OAuth configuration.
When validating code or tool changes, build first because the test client
launches `packages/mcp-server/dist/index.js`:
The test client launches `sentry mcp` from CLI source
(`pnpm --dir packages/cli run cli mcp`), which reads mcp-core's build output, so
build first when validating code or tool changes:

```bash
pnpm -w run build
```

Check auth first:
Check auth first. `sentry mcp` uses the CLI's credentials:

```bash
pnpm --filter @sentry/mcp-server start auth status
pnpm --filter sentry run cli auth status
```

If no cache exists, warm the device-code cache:
If you are not logged in, log in once (or pass `--access-token` to the test
client):

```bash
pnpm --filter @sentry/mcp-server start auth login
pnpm --filter sentry run cli auth login
```

Device-code auth uses the bundled stdio public client ID, requires no client
secret, is separate from the Cloudflare OAuth app, and caches the token in
`~/.sentry/mcp.json`.

First prove startup and auth:

```bash
Expand Down Expand Up @@ -96,9 +94,9 @@ For agent-client-specific behavior, replace the default harness prompt with the
same realistic prod prompt used for stdio QA. Passing QA requires the same
changed-tool transcript evidence, not only `whoami`.

as an isolated auth cache. Real clients do not give stdio subprocesses a TTY,
so warm the cache before running the harness. It also runs the built
`packages/mcp-server/dist/index.js`, so build first to avoid stale code.
Real clients do not give stdio subprocesses a TTY, so log in with
`sentry auth login` before running the harness. Build first to avoid stale
mcp-core code.

## 4. Cloudflare HTTP Only When Relevant

Expand Down Expand Up @@ -144,7 +142,7 @@ dev-time source execution:

```bash
pnpm -w run build
pnpm --filter @sentry/mcp-server start auth status
pnpm --filter sentry run cli auth status
pnpm -w run cli --transport stdio "who am I?"
```

Expand Down
22 changes: 8 additions & 14 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ workspaces:
packages/cli:
changelog:
policy: auto
# The CLI release also ships the documentation workspace.
# The CLI release also ships the documentation workspace and
# @sentry/mcp-server.
includePaths:
- apps/cli-docs
- packages/mcp-server
aiSummary:
llm:
model: gpt-5.6-luna-utility
Expand All @@ -24,10 +26,15 @@ workspaces:
Build:
- "/^sentry-.*$/"
- "npm-package"
- "mcp-server-npm-package"
- "vercel"
targets:
- name: npm
includeNames: '/^sentry-\d.*\.tgz$/'
# The standalone MCP server, published at the CLI's version.
- name: npm
id: "@sentry/mcp-server"
includeNames: '/^sentry-mcp-server-\d.*\.tgz$/'
- name: github
tagPrefix: "cli@"
- name: vercel
Expand Down Expand Up @@ -103,16 +110,3 @@ workspaces:
assert_match version.to_s, shell_output("#{bin}/sentry --version").chomp
end
end
packages/mcp-server:
changelogPolicy: none
preReleaseCommand: >-
bash -c 'set -e; for package in packages/mcp-* packages/smoke-tests; do
(cd "$package" && npm version "$CRAFT_NEW_VERSION" --no-git-tag-version);
done'
releaseBranchPrefix: release/mcp
targets:
- name: github
includeNames: '/^sentry-mcp-server-\d.*\.tgz$/'
- name: npm
id: "@sentry/mcp-server"
includeNames: '/^sentry-mcp-server-\d.*\.tgz$/'
13 changes: 13 additions & 0 deletions .github/workflows/cli-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,19 @@ jobs:
with:
name: npm-package
path: packages/cli/*.tgz
# Every CLI release also publishes @sentry/mcp-server at the same version.
- name: Bundle mcp-server
run: pnpm --filter @sentry/mcp-server run bundle
- name: Test mcp-server bundle
run: pnpm --filter @sentry/mcp-server run test:bundle
- name: Pack mcp-server
working-directory: packages/mcp-server
run: npm pack
- name: Upload mcp-server npm artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: mcp-server-npm-package
path: packages/mcp-server/*.tgz

test-npm:
name: Test npm Package (Node ${{ matrix.node }})
Expand Down
31 changes: 24 additions & 7 deletions .github/workflows/mcp-registry.yml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what this file is or what it does but it looks like we can do whatever we are doing for the CLI now? Use Sentry Release Registry or something? What exactly is this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It publishes our listing (io.github.getsentry/sentry-mcp) to the official MCP Registry at registry.modelcontextprotocol.io. That's the directory MCP clients and marketplaces read to discover servers. It isn't the Sentry Release Registry: that one is the Craft registry target the CLI already uses, which writes version metadata to getsentry/sentry-release-registry.

Craft has no MCP Registry target, so the job stays a workflow. Once the npm package is live, it runs mcp-publisher with GitHub OIDC, so it needs no secret. The workflow already exists on main. This PR only changes its trigger to cli@ releases, because that's where @sentry/mcp-server ships now.

If you'd rather not keep a workflow for it, the clean replacement is an mcp-registry target in Craft. I can open that upstream.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, let's keep it then and file an issue over at getsentry/craft for this target?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed getsentry/craft#944 for an mcp-registry target. Once it ships, we can delete this workflow and list the target in the cli workspace config.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:
inputs:
version:
description: Existing stable release (e.g. 0.40.0)
description: Existing stable @sentry/mcp-server version (e.g. 0.48.0)
required: true
type: string

Expand All @@ -17,37 +17,54 @@ defaults:
run:
shell: bash

# Key on the release tag so a manual retry of `0.48.0` queues behind the
# `cli@0.48.0` release run instead of racing it to publish the same version.
concurrency:
group: mcp-registry-${{ inputs.version || github.event.release.tag_name }}
group: mcp-registry-${{ github.event_name == 'release' && github.event.release.tag_name || format('cli@{0}', inputs.version) }}
cancel-in-progress: false

jobs:
publish:
if: >-
(github.repository == 'getsentry/sentry-mcp' || github.repository == 'getsentry/toolkit') &&
((github.event_name == 'release' && !github.event.release.prerelease && !startsWith(github.event.release.tag_name, 'cli@')) ||
((github.event_name == 'release' && !github.event.release.prerelease && startsWith(github.event.release.tag_name, 'cli@')) ||
(github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main'))
Comment thread
sentry-junior[bot] marked this conversation as resolved.
Resolved
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
id-token: write
env:
VERSION: ${{ inputs.version || github.event.release.tag_name }}
INPUT_VERSION: ${{ inputs.version }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
steps:
# Use the maintained manifest on main, including for older releases.
- uses: actions/checkout@v4
with:
ref: main
persist-credentials: false

- name: Prepare metadata
# Each CLI release (`cli@<version>`) publishes @sentry/mcp-server at the
# same version. Releases before that used bare `<version>` tags.
- name: Resolve release
env:
GH_TOKEN: ${{ github.token }}
run: |
[[ "$VERSION" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]
gh release view "$VERSION" --repo getsentry/sentry-mcp --json isDraft,isPrerelease \
if [[ -n "$RELEASE_TAG" ]]; then
tag="$RELEASE_TAG"
elif gh release view "cli@$INPUT_VERSION" --repo "$GITHUB_REPOSITORY" > /dev/null 2>&1; then
tag="cli@$INPUT_VERSION"
else
tag="$INPUT_VERSION"
fi
version="${tag#cli@}"
[[ "$version" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]
gh release view "$tag" --repo "$GITHUB_REPOSITORY" --json isDraft,isPrerelease \
| jq -e '(.isDraft | not) and (.isPrerelease | not)'
echo "VERSION=$version" >> "$GITHUB_ENV"

- name: Prepare metadata
run: |
jq --arg version "$VERSION" '.version = $version | .packages[0].version = $version' \
server.json > "$RUNNER_TEMP/server.json"

Expand Down
115 changes: 0 additions & 115 deletions .github/workflows/mcp-server-package.yml

This file was deleted.

15 changes: 2 additions & 13 deletions .github/workflows/merge-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Post-merge tasks

on:
push:
branches: ["main", "release/*", "release/mcp/**"]
branches: ["main", "release/*"]
workflow_dispatch:

jobs:
Expand All @@ -26,25 +26,14 @@ jobs:
run: pnpm install

- name: Build
run: pnpm --filter '@sentry/mcp-server...' --if-present run build
run: pnpm --filter '@sentry/mcp-core...' --if-present run build

- name: Run linter
run: pnpm lint

- name: Run tests
run: pnpm test:ci

- name: Package mcp-server
working-directory: packages/mcp-server
run: pnpm pack --pack-destination dist

- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}
path: |
${{ github.workspace }}/packages/mcp-server/dist/*.tgz

- name: Publish Test Report
uses: mikepenz/action-junit-report@cf701569b05ccdd861a76b8607a66d76f6fd4857
if: ${{ !cancelled() }}
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ on:
description: Product to release
required: true
type: choice
default: mcp
default: cli
options:
- cli
- mcp
bump:
description: Version bump type
required: true
Expand Down Expand Up @@ -59,15 +58,13 @@ jobs:
env:
PRODUCT: ${{ inputs.product }}
run: |
# Each product maps to a `.craft.yml` workspace. The `cli` release
# also publishes @sentry/mcp-server at the same version.
case "$PRODUCT" in
cli)
workspace=packages/cli
package_path=packages/cli
;;
mcp)
workspace=packages/mcp-server
package_path=packages/mcp-server
;;
*)
echo "::error::Unsupported product: $PRODUCT"
exit 1
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ coverage
.env.sentry-build-plugin

# Generated files
packages/mcp-server/src/toolDefinitions.json
packages/mcp-server/src/skillDefinitions.json
packages/mcp-server-evals/eval-results.json
apps/cli-docs/.astro
apps/cli-docs/src/content/docs/commands/
Expand Down
Loading
Loading