Why are we not using device flow with public clients in MCP? #1898
Replies: 1 comment
-
|
device flow is for input-constrained, human-present devices. mcp clients often run unattended, across many tools/agents, where human interaction and browser consent aren’t acceptable or reliable. when device flow can work why mcp implementations lean to dcr/proxy/oauth server role short answer: device flow is simple and secure for human-attended, input-limited devices, but it doesn’t meet mcp’s non-interactive, multi-tool, enterprise, and audit requirements. it’s reasonable as an optional bootstrap path, not a default. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @jlowin. It's a bit puzzling to me why MCP is not using device flow to authorize with the authorization server and get the token. It seems device flow is perfect for MCP. More so than DCR.
What are your thoughts on this?
Device flow without the need to enter device code (just consent) seems to be the most straightforward way to authenticate mcp server to me.
The client should get authorization server url from well-known/oauth-protected-resource. Then client should initiate device flow as a public client (without client secret) with that endpoint, prompt the user to open a url (or do so automatically) and then poll the authorization server for the token. The user then approves the device. Once the client gets the token it just sends that token as bearer to the mcp server with subsequent mcp requests and mcp server then uses the oauth token verifier to verify the token against public keys at the oauth server.
It seems so simple and straightforward - and secure as well. But why are we not doing this? Am I missing something important here? Why do we need DCR or complex proxying of the oauth requests? Why do we need the mcp server itself to be an oauth server?
Here is what the client would be doing to authorize as device:
Beta Was this translation helpful? Give feedback.
All reactions