Add Authorization Flow for MCP client server host extension#27
Add Authorization Flow for MCP client server host extension#27sberyozkin wants to merge 1 commit intomodelcontextprotocol:mainfrom
Conversation
|
@sberyozkin - if I understand this proposal correctly, your proposing a model in which the OAuth interactions are handled by the HTTP Server, and the Access Tokens are given to the MCP client, rather than having the MCP client obtain the access tokens from the OAuth server directly? If that is the case, I think what your proposing here is not anything new in the context of OAuth or how authorizations is done, but rather an architectural change to MCP that separates out the OAuth Client from the MCP Client. To me this feels a bit like an implementation detail, at least from an interop perspective. Can you expand a little on why it is necessary to formalise this separation between the OAuth client (the HTTP server in your case) and the MCP Client, rather than just treating it as an implementation detail? |
|
@PieterKas Thanks for having a look at this proposal,
Indeed, you are right
We've seen some concerns that an HTTP server software that uses MCP client to access protected MCP servers with access tokens is not compliant with the main MCP Authorization specification, it can be problematic when a standard compliance is a must, and when convincing that it is an implementation detail is not easy. I hope it can give OAuth2 aware HTTP server applications that use MCP clients internally an option to claim a compliance with this extension, and make it clearer to their users that MCP client plays a different role in the main and this extension authorization specifications. The other thing is that with traditional HTTP applications that require OAuth2 logins, using a I also have a RAR addition in mind where |
Fixes #26
Motivation and Context
It introduces an authorization flow extension for MCP client hosts such as traditional HTTP server applications
How Has This Been Tested?
This scenario has been described in the Quarkus blog post at https://quarkus.io/blog/secure-mcp-client/, and demoed in the Quarkus LangChain4j repository at https://github.com/quarkiverse/quarkus-langchain4j/tree/main/samples/secure-mcp-client-server.
This scenario is not Quarkus specific. Any HTTP server application that requires OAuth or OIDC login and needs to use AI Service with MCP to complete a user request may benefit from adapting this extension.
Breaking Changes
None
Types of changes
Checklist
Additional context
I'll appreciate any advice and recommendations from @localden, @D-McAdams, @PieterKas, @aaronpk and the community at large on how to finalize this extension proposal