feat: Support for URL mode elicitation#1114
Open
iturgeon wants to merge 2 commits intomodelcontextprotocol:mainfrom
Open
feat: Support for URL mode elicitation#1114iturgeon wants to merge 2 commits intomodelcontextprotocol:mainfrom
iturgeon wants to merge 2 commits intomodelcontextprotocol:mainfrom
Conversation
Adds support for URL mode elicitation. Updates advertised compatibility, adds some UI functionality, and tests for the changes. - Updates the MCP client's advertised compatibility to include the newer object structure that indicates url mode elicitation support. - Adds detection of URL mode elicitation 'errors' and raises them to the user. - Adds support for accept, deny, and cancel responses. - Adds URL mode Elicitation UI to present the URL to the user with buttons to open in a new tab in addition to accept, deny, and cancel responses.
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.
Summary
Adds support for URL mode elicitation. Updates advertised compatibility, adds some UI functionality, and tests for the changes.
NOTE: looks like there's another attempt at this: #1108
Maintainers, LMK if effort is best spent working with the other PR or what.
Type of Change
Changes Made
Spec Conformance Review
Based on the MCP Elicitation Specification (2025-11-25).
Conformant
Not Implemented
The spec's flow diagram shows this as optional ("Retry tools/call (optional)"), and the resolve callback on error-originated elicitations is a no-op. The normal elicitation/create flow (server-initiated) works correctly end-to-end.
Related Issues
Testing
Tested manually with a custom MCP server that supports URL mode Elicitation. Also ran jest and playwright tests.
Test Results and/or Instructions
Testing with an MCP server that supports URL mode Elicitation is a challenge, not many support it, let alone advertise support for it. I was testing with a private MCP server that does.
Checklist
npm run prettier-fix)Breaking Changes
MCP Servers not built to handle the new compatibility structure changing from
elicitation: {}toelicitation: { form: {}, url: {} }could have unforeseen issues, but perhaps that's unlikely to cause an issue.Additional Context
I think it would be nice to add an option to change how this client advertises it's capabilities for testing purposes, to switch between different stages of the spec and manually turn them on and off. That's not included here.