Repository navigation
fix(issues): Rename claude-desktop MCP client family to claude - #127717
Merged
Merged
Conversation
The MCP labels every Claude-User request as claude-desktop, but that user agent covers all of Claude's hosted apps (claude.ai, Desktop, routines), so activity from e.g. Claude routines was attributed to Claude Desktop. Accept the new claude family, map legacy claude-desktop headers to it at write time, and rename mcp:claude-desktop on read so existing action log rows (which are never migrated) serialize as mcp:claude. Co-Authored-By: Matt Duncan <[email protected]>
mrduncan
marked this pull request as ready for review
October 20, 2026 00:06
cvxluo
approved these changes
Oct 20, 2026
shashjar
approved these changes
Oct 20, 2026
joseph-sentry
pushed a commit
that referenced
this pull request
Oct 20, 2026
The MCP server labels every request with a `Claude-User` user agent as `claude-desktop`. That user agent is Anthropic's generic one for user-directed requests from Claude's hosted apps, so it can't tell Desktop apart from claude.ai or Claude routines. As a result, issue activity from Claude routines showed up as "Claude Desktop". This PR replaces `claude-desktop` with a single `claude` family. `claude-code` stays separate because it has its own `claude-code/x.y` user agent. - `KNOWN_MCP_CLIENT_FAMILIES` now accepts `claude`. - `get_mcp_client_family` maps a legacy `claude-desktop` header to `claude`. New action log rows are written as `mcp:claude` even before the MCP change deploys, so the deploy order doesn't matter. `client_host` attribution gets the same mapping. - The `GroupActionLogEntry` serializer renames existing `mcp:claude-desktop` rows to `mcp:claude` when it reads them. Action log rows are append-only and never migrated (see `issues/action_log/AGENTS.md`), so they are renamed on read and not backfilled. The matching MCP-side change is in getsentry/toolkit (`client-family.ts`). **Tests** - `tests/sentry/issues/test_action_log.py`: a legacy `claude-desktop` header resolves to `mcp:claude`. - `tests/sentry/api/serializers/test_groupactionlogentry.py`: a stored `mcp:claude-desktop` row serializes as `mcp:claude`, and `mcp:claude-code` is unchanged. I ran `ruff check` and `ruff format --check` on the changed files locally. I couldn't run pytest in the sandbox because it has no database, so CI will be the first real run. <!-- junior-request-attribution:start --> via **matt.duncan**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AC0B349R63M1%3A1792105382.165869 --> -- [View Junior Session](https://junior-prod.sentry.dev/conversations/slack%3AC0B349R63M1%3A1792105382.165869) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0B349R63M1%3A1792105382.165869/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Matt Duncan <[email protected]>
2 tasks done
mrduncan
added a commit
to getsentry/toolkit
that referenced
this pull request
Oct 21, 2026
…ktop (#1516) `resolveClientFamily` mapped the `Claude-User` user agent to `claude-desktop`. `Claude-User` is Anthropic's generic user agent for user-directed requests from its hosted Claude apps, so it doesn't identify Desktop specifically. In practice, activity from Claude routines was showing up in Sentry issue activity as "Claude Desktop". - `Claude-User` and DCR client names containing "Claude" now map to `claude`. Claude Code is still matched first and stays `claude-code`. - Updated `client-family.test.ts` and the `app.client.family` value list in `docs/operations/oauth-signout-playbook.md`. **Heads up:** this renames the `app.client.family` metric/span value, so any dashboards or queries filtering on `claude-desktop` should switch to `claude`. **Deploy order:** deploy getsentry/sentry#127717 first. Sentry only records client families in `KNOWN_MCP_CLIENT_FAMILIES`, and `claude` isn't in that set until #127717 ships. If this PR deploys first, Sentry logs `group.action_log.unrecognized_mcp_client_family` for Claude-User traffic and stores the source as plain `mcp`. The serializer can't recover those rows later. **Checks** - `vitest run src/server/lib/client-family.test.ts`: 30/30 passed. - `oxlint` on the changed files: clean. <!-- junior-request-attribution:start --> via **matt.duncan**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AC0B349R63M1%3A1792105382.165869 --> -- [View Junior Session](https://junior-prod.sentry.dev/conversations/slack%3AC0B349R63M1%3A1792105382.165869) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0B349R63M1%3A1792105382.165869/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Matt Duncan <[email protected]>
betegon
pushed a commit
to getsentry/sentry-changelog
that referenced
this pull request
Nov 5, 2026
Adds a Sentry MCP changelog entry for changes deployed to mcp.sentry.dev after the #230 endpoint (`8d3affe`, 2026-10-19 14:38 UTC) through the latest production deploy (`5b7ea24`, 2026-10-22 12:56 UTC). The entry covers: - `intentional` / `unintentional` tags on `find_dropped_events` buckets (#1560) - attribute descriptions and pagination when `search_traces`, `search_logs`, and `search_metrics` write a query (#1505, #1518) - a lighter project check for project-scoped connections, with 60-second caching of timeouts (#1551) - fixes: time series with text values (#1424), `create_project` with unlinked repositories (#1297), and Claude-User clients showing as Claude instead of Claude Desktop in issue activity (#1516) - no new `@sentry/mcp-server` npm release in this period (latest is still 0.42.0) **Commit filtering:** 33 non-merge commits are in `8d3affe..5b7ea24` (no merge commits). 17 are MCP-relevant: 13 touch `packages/mcp-core`, `mcp-cloudflare`, or `mcp-server`, and 4 bump dependencies those packages use (`hono`, `vite`, `@modelcontextprotocol/server`, `@modelcontextprotocol/sdk`). The other 16 are CLI-only, CLI docs, or CI-only. **Left out:** dependency bumps (#1567, #1562, #1566, #1565); the wrangler upgrade for deploy tokens (#1570); `upstreamScopes` on OAuth grants, which nothing reads yet (#1561); the shared formatter removal, which changes nothing outside experimental mode (#1420); the CLI metric-alert fix, whose MCP side only moves constants to `toolkit-core` (#1591); and lint and formatting changes (#1556, #1547). **Backend dependencies:** #1560 relies on getsentry/sentry#127850 and #128138 (merged 2026-10-19 and 2026-10-20). #1516 relies on getsentry/sentry#127717 (merged 2026-10-20). I checked that these PRs merged, not when Sentry deployed them. **Credits:** #1424 and #1297 were opened by Seer autofix and #1516 by Junior. #1424 credits Miguel Betegón from the commit's co-author trailer. #1297 has no human author or co-author, so it keeps only its link. #1516's only human co-author trailer has an email and no GitHub handle, so it also keeps only its link. **Commit trailer:** the requested `Co-authored-by: Miguel Betegón` trailer is missing from the commit. Junior's runtime commit hook removes co-author trailers written by the model and adds only trailers from the human who started the run. This run was started by the scheduler, so it added none. **Deployment evidence:** - baseline `8d3affe` (exclusive): [run 39270735631](https://github.com/getsentry/toolkit/actions/runs/39270735631), 2026-10-19 14:38 UTC - endpoint `5b7ea24` (inclusive): [run 39782031875](https://github.com/getsentry/toolkit/actions/runs/39782031875), 2026-10-22 12:56 UTC. Candidate smoke tests, promotion to production, ownership check, and production smoke tests all passed, and the recovery step was skipped. - Since then, every Deploy to Cloudflare run has failed before promotion. In [run 39809996665](https://github.com/getsentry/toolkit/actions/runs/39809996665), `f5004b2` was staged at 0% while the `5b7ea24` version kept 100% of traffic. Later runs fail at "Capture active production version". `recover-cloudflare-deployment.yml` has no runs. Changes merged after `5b7ea24` are not on mcp.sentry.dev yet and are not covered here. GitHub Actions can't rule out a deployment made outside it. **Validation:** `pnpm changelog:validate` passes (18 files). The body compiles with `compileMDX` and the app's `mdxOptions` and renders to static HTML (5 sections, 14 links, 13 inline code spans). All 7 linked toolkit PRs are merged and are in `8d3affe..5b7ea24`. Not checked: rendering in the Vercel preview. The proposed publication date is 2026-10-27. The entry goes live only if this PR is merged and synced. A draft is not a publication. ``` product=mcp source_repo=getsentry/toolkit baseline_exclusive=8d3affe39e7e5f1acd3961a38472663aac7326f4 endpoint_inclusive=5b7ea24e10bb315cdedf629af1afc9c8abe80347 coverage_utc=2026-10-19T14:38Z..2026-10-22T12:56Z scan_utc=2026-10-26T13:00Z mcp_commits=17 deploy_run=https://github.com/getsentry/toolkit/actions/runs/39782031875 compare=getsentry/toolkit@8d3affe...5b7ea24 ``` <!-- junior-request-attribution:start --> via Junior system actor `scheduler`. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent-dispatch%3Adispatch_27b99aae0d38fd8c40b6f66918827b4b --> -- [View Junior Session](https://junior-prod.sentry.dev/conversations/agent-dispatch%3Adispatch_27b99aae0d38fd8c40b6f66918827b4b) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent-dispatch%3Adispatch_27b99aae0d38fd8c40b6f66918827b4b/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The MCP server labels every request with a
Claude-Useruser agent asclaude-desktop. That user agent is Anthropic's generic one for user-directed requests from Claude's hosted apps, so it can't tell Desktop apart from claude.ai or Claude routines. As a result, issue activity from Claude routines showed up as "Claude Desktop".This PR replaces
claude-desktopwith a singleclaudefamily.claude-codestays separate because it has its ownclaude-code/x.yuser agent.KNOWN_MCP_CLIENT_FAMILIESnow acceptsclaude.get_mcp_client_familymaps a legacyclaude-desktopheader toclaude. New action log rows are written asmcp:claudeeven before the MCP change deploys, so the deploy order doesn't matter.client_hostattribution gets the same mapping.GroupActionLogEntryserializer renames existingmcp:claude-desktoprows tomcp:claudewhen it reads them. Action log rows are append-only and never migrated (seeissues/action_log/AGENTS.md), so they are renamed on read and not backfilled.The matching MCP-side change is in getsentry/toolkit (
client-family.ts).Tests
tests/sentry/issues/test_action_log.py: a legacyclaude-desktopheader resolves tomcp:claude.tests/sentry/api/serializers/test_groupactionlogentry.py: a storedmcp:claude-desktoprow serializes asmcp:claude, andmcp:claude-codeis unchanged.I ran
ruff checkandruff format --checkon the changed files locally. I couldn't run pytest in the sandbox because it has no database, so CI will be the first real run.via matt.duncan.
--
View Junior Session [Sentry]