Support for RFC 8628 OAuth 2.0 Device Authorization Grant #2774
Closed
leontastic
started this conversation in
Ideas - General
Replies: 1 comment
-
|
The MCP specification establishes the baseline, but does not restrict other auth methods - it will be client dependent. Code authorization grants are inherently phishable, so there is no good reason at this time for us to recommend it in the spec. For other entities, WIF and other server-to-server interactions should be used, that are both more secure as well as provide more robust protections against easy-to-make auth mistakes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The MCP authorization spec mandates OAuth 2.1 Authorization Code + PKCE with a loopback browser redirect, which excludes any agent that has no local browser: Claude Code in containers, CI runners, SSH sessions, chat-bridged agents where the human and the agent live on different machines.
RFC 8628 (OAuth 2.0 Device Authorization Grant) is OAuth's standard answer for exactly this case. The agent prints a short user code and verification URL, the user approves from any device with a browser, the agent polls for the token. Claude Desktop and Cursor already implement device flow as a vendor extension by sniffing
device_authorization_endpointandurn:ietf:params:oauth:grant-type:device_codefrom the authorization server metadata, but every implementation is reinventing the contract because the spec doesn't recognize the grant.The MCP spec should be updated to include RFC 8628 in MCP's recommended grants alongside Authorization Code + PKCE, define the discovery and triggering conventions, and let clients implement it once and consistently. This is distinct from SEP-1933 (Workload Identity Federation), which addresses "agent acts as itself" via platform-issued JWTs. Device flow addresses "agent acts on behalf of a user who isn't co-located with the agent."
Beta Was this translation helpful? Give feedback.
All reactions