-
Notifications
You must be signed in to change notification settings - Fork 507
Add registry authorization specification #756
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
Conversation
Add standardized OAuth 2.1-based authentication spec for sub-registries, aligned with the MCP Authorization Specification. This allows clients to reuse their existing MCP auth code when accessing private registries.
|
@claude please review |
|
Claude finished @domdomegg's task —— View job Review: Registry Authorization SpecificationOverall this is a well-designed specification that aligns closely with OAuth 2.1 standards and provides a clear path for private registry implementations. The approach of reusing the MCP Authorization Specification pattern is smart and maintains consistency across the ecosystem. ✅ Strengths
🔍 Technical Issues FoundLine 153: TypoReading servers remaings public and does not require authentication.Should be: Lines 26-33: WWW-Authenticate Header FormatThe multiline header format may not be standard. Consider: WWW-Authenticate: Bearer realm="MCP Registry", scope="registry:read", resource_metadata="https://registry.example.com/.well-known/oauth-protected-resource"Lines 137-141: Step-up Response FormatSame formatting concern for the step-up response. Single line may be more compliant. 💡 Suggestions for Improvement1. Error Handling DetailConsider adding guidance on handling network failures, token refresh, and authorization server unavailability. 2. Token Lifecycle ManagementThe spec could benefit from guidance on:
3. Registry Discovery EnhancementConsider specifying how clients discover if a registry supports this auth spec vs. other auth methods, especially for migration scenarios. 4. Example ExpansionThe permission-based server visibility example (lines 120-131) could show the complete flow including the filtered response. 5. Security ConsiderationsConsider adding explicit mention of:
📋 Minor Items
Todo List
SummaryThis is a solid specification that successfully addresses issue #751's requirements. The technical approach is sound, properly leveraging OAuth 2.1 standards while maintaining consistency with existing MCP patterns. The main issues are minor (one typo, header formatting) and could be addressed in follow-up commits. The design properly enables private registry entries with permission-based visibility, exactly as requested. The reuse of existing MCP auth patterns is particularly smart for client adoption. |
|
Looks good to me 🚀 I think we are all in favour of keeping it as close to the existing MCP spec as possible but let's wait a few more days so others can chime in if needed 👍 |
|
Just wanting to also get the opinions of a few security professionals in Anthropic as well, will merge pending their review. |
|
|
||
| ### Authorization Server Discovery | ||
|
|
||
| Clients MUST discover the authorization server using standard OAuth 2.0 / OpenID Connect well-known endpoints, following the same priority order specified in the MCP Authorization Specification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OAuth 2.0+ or 2.1 as it's 2.1 everywhere else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed! And simplified this in general to avoid discrepancies like these.
|
|
||
| The official modelcontextprotocol.io registry uses a custom JWT-based authentication system for publishing servers. Reading servers remains public and does not require authentication. | ||
|
|
||
| We may in future look at moving the official registry to this standardized OAuth 2.1-based system for consistency. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a benefit (or con) for not keeping the official registry in sync with this spec?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main benefit is that people only need to implement one auth spec consistently across servers and registries. Most MCP clients will already have all the code for handling the MCP auth spec, so if we reuse that they get registry auth for free.
There's no particular con from keeping them synced, except for potentially that the MCP auth spec is a little more complex than say a username/password or fixed API key (although roughly equivalent things can be achieved with the client credentials grant OAuth flow).
| "name": "io.github.acme/internal-tools", | ||
| "title": "ACME Internal Tools", | ||
| "visibility": "private", | ||
| "allowed_scopes": ["registry:read:acme-internal"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the function of this field? Does this need to map to a scope in the token?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have removed this - not actually necessary.
Significantly simplified the registry authorization documentation to avoid duplication and potential drift from the MCP Authorization Specification. Feedback was to keep things as simple as possible to avoid confusion and ensure discussions about OAuth/authorization mechanics happen on the MCP spec itself, not the registry repo. Changes: - Reduced from 159 lines to ~25 lines - Removed all detailed MUST/SHOULD requirements, examples, and flows - Document now simply points to MCP spec and adds only registry-specific details - Kept only scope recommendations (mcp-registry:read, mcp-registry:write) - Added note about user-level authorization vs operation-level scopes - Clarified official registry uses different auth for legacy reasons 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Okay, after security review basically everyone seems happy with this, except with the recommendation to slim this spec down to just pointing at the main MCP spec. This avoids duplication and reduces the change of inconsistencies between the specs. Have enabled auto-merge so this goes in once someone GitHub stamps :) |
Add a standardized OAuth 2.1-based authentication specification for MCP sub-registries, aligned with the MCP Authorization Specification. This enables: - Private registry entries with access control - Permission-based server visibility - Client code reuse (clients can use their existing MCP auth implementation) The spec is intended for downstream sub-registries. The official registry remains public for reading. Fixes modelcontextprotocol#751 --------- Co-authored-by: Claude <noreply@anthropic.com>
Add a standardized OAuth 2.1-based authentication specification for MCP sub-registries, aligned with the MCP Authorization Specification.
This enables:
The spec is intended for downstream sub-registries. The official registry remains public for reading.
Fixes #751