Skip to content

fix(issues): Rename claude-desktop MCP client family to claude - #127717

Draft
sentry-junior[bot] wants to merge 1 commit into
masterfrom
mattd/mcp-claude-client-family
Draft

sentry-junior[bot] wants to merge 1 commit into
masterfrom
mattd/mcp-claude-client-family

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

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.

via matt.duncan.

--

View Junior Session [Sentry]

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 <matt.duncan@sentry.io>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 15, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants