Skip to content

[auth] Add resource compatibility to debugger (RFC 8707) #526

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 12 commits into from
Jun 23, 2025

Conversation

pcarleton
Copy link
Member

@pcarleton pcarleton commented Jun 18, 2025

  • pass resource in auth debugger, reusing server url
  • throw error on resource url mismatch to match regular auth flow

Motivation and Context

We've added RFC 8707 Resource Indicators as part of the MCP spec. There is an inflight change to add this to the Typescript SDK.

This change adds the similar behavior to the inspector in order to facilitate debugging.

This depends on: modelcontextprotocol/typescript-sdk#638

How Has This Been Tested?

Tested against the typescript SDK example server, and also tested against a few live servers (sentry, jira) to make sure it doesn't break.

Breaking Changes

Previously, we didn't care about the resource parameter returned in the Protected Resource Metadata. Now, in the debugger (and in the regular flow), we'll throw an exception if the resource does not match the provided server url.

Another potential breakage is if an AS rejects the resource parameter as invalid, we won't progress through the authorization flow, but we think this is unlikely.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

ochafik
ochafik previously approved these changes Jun 18, 2025
Copy link
Contributor

@ochafik ochafik left a comment

Choose a reason for hiding this comment

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

lg, just tinits :-)

@pcarleton
Copy link
Member Author

ptal? @ochafik

once we bump the typescript version for modelcontextprotocol/typescript-sdk#664 we can merge in https://github.com/modelcontextprotocol/inspector/pull/537/files to use the SDK function rather than having slightly bespoke logic here.

ihrpr
ihrpr previously approved these changes Jun 23, 2025
Copy link
Contributor

@ihrpr ihrpr left a comment

Choose a reason for hiding this comment

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

Typescript SDK is on 1.13.1 now

* use sdk function

* bump typescript sdk
@pcarleton pcarleton enabled auto-merge (squash) June 23, 2025 14:48
@pcarleton pcarleton merged commit 5db6426 into main Jun 23, 2025
6 checks passed
@pcarleton pcarleton deleted the pcarleton/auth-debugger-resource branch June 23, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants