-
Notifications
You must be signed in to change notification settings - Fork 76
Description
Problem
After upgrading @modelcontextprotocol/sdk from 1.22.0 to 1.25.3 (PR #752), Claude Code authentication appeared to fail with a 400 error.
Observed:
400 on POST https://mcp.sentry.dev/mcp/sentry/mcp-server?experimental=1(2026-01-30 15:59:21 PST)
Likely Cause
The 400 response comes from mcp-handler.ts:149-152:
if (validSkills.size === 0) {
return new Response(
"Authorization failed: No valid skills were granted. Please re-authorize and select at least one permission.",
{ status: 400 },
);
}This suggests the grantedSkills field was either:
- Empty or not passed correctly after the SDK upgrade
- Skill parsing failed due to format changes
- OAuth token didn't include skills due to SDK changes
MCP SDK Changes (1.22.0 → 1.25.3)
Potentially relevant changes:
- v1.25.0: "SPEC COMPLIANCE: Remove loose/passthrough types not allowed/defined by MCP spec"
- v1.24.0: Added
invalid_targetOAuth error (RFC 8707), client credentials OAuth flow - v1.23.0: "Support upscoping on insufficient_scope 403", "Adjust scope management to line up with SEP-835"
Investigation Steps
- Check if scope/skill format changed in MCP SDK 1.25.x
- Review OAuth token contents before/after upgrade
- Test authentication flow with SDK 1.25.3 and capture actual error
- Check if
grantedSkillsparsing needs to be updated
Context
- PR fix(deps): Address Dependabot security vulnerabilities #752 was reverted in PR Revert "fix(deps): Address Dependabot security vulnerabilities (#752)" #753 due to this and other issues
- No server-side errors were logged from the user's IP, suggesting the issue may be in OAuth flow or client-side
- Related to dependency upgrades for Dependabot security alerts
Files
packages/mcp-cloudflare/src/server/lib/mcp-handler.tspackages/mcp-cloudflare/src/server/oauth/
Metadata
Metadata
Assignees
Labels
No labels