feat: url based client metadata registration (SEP 991)#1098
Closed
mattzcarey wants to merge 0 commit intomodelcontextprotocol:mainfrom
Closed
feat: url based client metadata registration (SEP 991)#1098mattzcarey wants to merge 0 commit intomodelcontextprotocol:mainfrom
mattzcarey wants to merge 0 commit intomodelcontextprotocol:mainfrom
Conversation
commit: |
Contributor
Closed
9 tasks
Contributor
Author
pcarleton
requested changes
Nov 17, 2025
Member
pcarleton
left a comment
There was a problem hiding this comment.
overall looks good.
one tweak on non-https url.
Also I'd like to get a conformance test in before we merge, opened an issue here:
modelcontextprotocol/conformance#34
src/client/auth.ts
Outdated
| } | ||
| const supportsUrlBasedClientId = metadata?.client_id_metadata_document_supported === true; | ||
| const clientMetadataUrl = provider.clientMetadataUrl; | ||
| const shouldUseUrlBasedClientId = supportsUrlBasedClientId && clientMetadataUrl && isHttpsUrl(clientMetadataUrl); |
Member
There was a problem hiding this comment.
thinking about this: if it's not an HTTPS url, throwing an error would be better I think. It would be confusing and surprising if I was meaning to provide a non-HTTPS URL and it silently fell back to DCR, or failed later on for no available methods.
| grant_types: ['authorization_code', 'refresh_token'], | ||
| response_types: ['code'], | ||
| token_endpoint_auth_method: 'client_secret_post', | ||
| scope: 'mcp:tools' |
Member
There was a problem hiding this comment.
👍 confirmed this works on the demo server too. I think we added this when scope selection was more broken early on.
e4db8dc to
5bcf53f
Compare
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
closes #1052
Motivation and Context
How Has This Been Tested?
npx tsx src/examples/client/simpleOAuthClient.ts
'https://stytch-as-demo.val.run/mcp'
'https://pcarleton--c1073a0b670949da87f3911be7feb5d5.web.val.run/mcp.json'
Breaking Changes
Types of changes
Checklist
Additional context