Skip to content

Auth: MCP Servers are Resource Servers only. Add Protected Resource Metadata to discover Authorization Server #338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 23, 2025

Conversation

dsp-ant
Copy link
Member

@dsp-ant dsp-ant commented Apr 14, 2025

No description provided.

@dsp-ant dsp-ant force-pushed the davidsp/auth-rs-as-prm branch from 63095fb to b8b98cb Compare April 22, 2025 15:17
In the initial specification of authorization in MCP, the MCP server
acted as both the authorization server (AS) and reseource server (RS).
This makes enterprise deployments difficult where the AS is often a
separate entity such as Auth0/Entra ID or others.

The specification reworks the separation between AS/RS, making
the MCP server an RS server only. This adds the complication
that the MCP server must inform the client about the AS. We are
using the Protected Resource Metadata OAuth specification for this.

This is a first step into the right direction.

Co-authored-by: Den Delimarsky 🌺 <[email protected]>
Co-authored-by: Aaron Parecki <[email protected]>
Co-authored-by: Paul Carleton <[email protected]>
Copy link

@0Itsuki0 0Itsuki0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link for the OAuth 2.0 Protected Resource Metadata in section 2.3.1 points to the draft. (https://datatracker.ietf.org/doc/html/draft-ietf-oauth-resource-metadata-13)

Shouldn't it be https://datatracker.ietf.org/doc/html/rfc9728 instead?

@aaronpk
Copy link
Contributor

aaronpk commented Apr 26, 2025

I already fixed that in #402

@0Itsuki0
Copy link

I already fixed that in #402

Oops! Sorry about that!

@janakamarasena
Copy link

I think it would be good to add more context around the refresh token. I can see it is shown in the flow and the specification mentions that refresh token handling best practices should be used. I feel it might be better to mention in which cases a refresh token should be used, otherwise the client could unnecessarily have indefinite access. It would be better to provide a reference to refresh token handling best practices (maybe https://datatracker.ietf.org/doc/html/rfc9700#name-refresh-token-protection). Also noticed that the specification directly mentions the authorization code grant and the client credentials grant but doesn't have a mention of the refresh token grant although the refresh token is referenced.

@pcibraro
Copy link

pcibraro commented May 1, 2025

The specification does not mention how the WWW-Authenticate header should look like. A sample would be useful. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

8 participants