Upgrade mcp client to latest, add state to oauth provider #93
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.
The mcp typescript sdk released a new version today as a minor, but it included potentially breaking changes, so I would recommend pushing this as a major (minor i suppose, since this lib is pre-1.0) if it does end up merging, since it makes a substantial change to the oauth server metadata discovery process. This PR upgrades to this latest version, and also adds the
stateparam to the oauth provider, which is required by many oauth server implementations. I tested this on a mcp server that requires a state param, and it did work correctly though!Some general notes on what will need to change on the mcp/resource server side as a result of the breaking changes:
<mcp-endpoint>/.well-known/oauth-authorization-serverwas the default for metadata discovery<mcp-endpoint>/.well-known/oauth-protected-resource, and if it finds this, will pull the authorization server urls.<auth-server-url>/.well-known/oauth-authorization-serverand grab the authentication and registration endpoints from this result, and proceed<mcp-endpoint>/.well-known/oauth-protected-resourceisn't present, it will fall back to the previous behavior of looking for<mcp-endpoint>/.well-known/oauth-authorization-server.Hope this is somewhat helpful maybe for release notes? I think it won't be breaking for the vast majority of people in reality, since the case that does break is if
oauth-protected-resourceis implemented but points to a differentoauth-authorization-serverinstance that is not spec compliant exactly or not configured accurately.