You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement SEP-2350: Clarify client-side scope accumulation in step-up authorization #2200
main already has some WWW-Authenticate parsing and resolved-scope handling (via the OAuth provider adapter refactor) — see packages/client/src/client/auth.ts:581-595, 869+ and the packages/client/CHANGELOG.md entries.
Transport checks authInfo.scopes before running the tool; if insufficient, returns HTTP 403 + WWW-Authenticate: Bearer error="insufficient_scope", ... to trigger client step-up
Initially used server-side accumulation (union of activeScopes ∪ required). After review by @localden cross-checking with the merged SEP-2350, this was changed in 2026-05-26 to:
Opt-in additive mode via scopeChallenge.includeGrantedScopes: true for servers that need to be defensive against non-accumulating clients (e.g. GitHub MCP server style until VS Code does client-side accumulation)
R-2350-1 (wire): Client SHOULD include challenged scopes alongside previously-granted scopes when re-authorizing (the client-side accumulation the SEP is named after)
R-2350-4 (sdk): Client helper computing union of previously-requested + newly-challenged scopes for re-auth — not yet in main; this is the client-side complement of feat(server): add request-time OAuth scope challenges #1624 and the missing piece for R-2350-1
R-2350-5 (guidance): Pre-existing — server SHOULD strive for consistency in scope-set construction; UX impact
@mattzcarey LMK if you want me to do anything to help land this? I'd love this to server as canonical example for other SDKs for how to handle scope challenges server side (that's the main goal of the #auth-wg-tool-scopes currently). I'd be happy to chat about things too if it's helpful to getting this over the line.
Activity
mattzcarey commentedon May 29, 2026
Status — SEP-2350 (Client-side scope accumulation in step-up authorization)
Track: C — independent, starts now. Server-side reference impl already in active review.
Spec: seps/2350-clarify-scope-accumulation.md · merged
What's done
mainalready has someWWW-Authenticateparsing and resolved-scope handling (via the OAuth provider adapter refactor) — seepackages/client/src/client/auth.ts:581-595, 869+and thepackages/client/CHANGELOG.mdentries.feat(server): OAuth scope challenge support (step-up auth):authInfo.scopesbefore running the tool; if insufficient, returnsHTTP 403+WWW-Authenticate: Bearer error="insufficient_scope", ...to trigger client step-upactiveScopes ∪ required). After review by @localden cross-checking with the merged SEP-2350, this was changed in 2026-05-26 to:WWW-Authenticatecarries per-operationrequiredscopes only (RFC 6750 §3.1, matches SEP-2350)scopeChallenge.includeGrantedScopes: truefor servers that need to be defensive against non-accumulating clients (e.g. GitHub MCP server style until VS Code does client-side accumulation)resources/read,prompts/get,completion/completeOutstanding (acceptance criteria, summary)
scopeparam ofWWW-Authenticate(RFC 6750 §3.1) — done in feat(server): add request-time OAuth scope challenges #1624 post-reviewmain; this is the client-side complement of feat(server): add request-time OAuth scope challenges #1624 and the missing piece for R-2350-1Action items
mergeScopes(prior, challenged) → union) wired into theauth()re-auth flow. Referenced as related issue fix: accumulate OAuth scopes on 401/403 instead of overwriting #1657 in the feat(server): add request-time OAuth scope challenges #1624 discussion.Coordination
SamMorrowDrums commentedon Jun 1, 2026
@mattzcarey LMK if you want me to do anything to help land this? I'd love this to server as canonical example for other SDKs for how to handle scope challenges server side (that's the main goal of the #auth-wg-tool-scopes currently). I'd be happy to chat about things too if it's helpful to getting this over the line.
norika1207-lab commentedon Jun 2, 2026
fix(client): accumulate scopes (union) on step-up authorization chall…
fix(client): accumulate scopes (union) on step-up authorization chall…
fix(client): accumulate scopes (union) on step-up authorization chall…
fix(client): accumulate scopes (union) on step-up authorization chall…