Upgrade to MCP 1.17+ with RFC 9728 compliance #2122
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR upgrades FastMCP to require MCP 1.17+ and implements RFC 9728-compliant OAuth protected resource metadata URL handling.
Closes #2123, closes #2077
What Changed
The MCP Python SDK introduced a breaking change in version 1.17 to properly implement RFC 9728. OAuth protected resource metadata endpoints are now registered at path-aware locations rather than always at the root.
Before (MCP 1.16)
After (MCP 1.17+)
This ensures proper OAuth discovery for path-based resource servers and aligns with RFC 9728 §3.1 requirements.
Key Changes
mcp>=1.17.0(was>=1.12.4)build_resource_metadata_url()from the MCP SDK to construct metadata URLs--upgradeto always validate against the latest compatible package versionsImpact
This is a breaking change for servers using authentication with path-based mounting. If your MCP server is mounted at a path (e.g.,
/mcp,/api/v1/mcp), OAuth clients will need to discover metadata at the new path-aware location. I believe the core mechanism for what broke is that the WWW headers were pointing to the wrong location.Servers mounted at the root path are unaffected.