Skip to content

Conversation

@felixweinberger
Copy link
Collaborator

Adds conformance tests for SEP-1036 which introduces URL mode elicitation for out-of-band user interactions.

Summary

  • Server test: validates URL mode elicitation request structure (mode, message, url, elicitationId)
  • Server test: validates URLElicitationRequiredError (code -32042) with elicitations array
  • Server test: validates completion notification (notifications/elicitation/complete)
  • Fixed everything-server to use elicitInput() instead of raw request() for proper capability checking

Motivation and Context

SEP-1036 introduces URL mode elicitation, allowing servers to direct users to external URLs for out-of-band authentication, payment confirmation, or other interactions. These conformance tests ensure SDK implementations correctly handle the URL elicitation flow including the completion notification.

How Has This Been Tested?

  • All conformance checks pass against TypeScript SDK implementation (requires SDK with SEP-1036 support)
  • Tests verify: mode validation, URL validity, elicitationId presence, error code, completion notification flow

Breaking Changes

None.

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

Note

This PR requires SDK version with SEP-1036 support (not yet released in 1.22.0). Currently tested with linked local SDK.

Implements conformance tests for SEP-1036 which adds URL mode elicitation
to MCP. The tests validate:

- URL mode request format (mode, url, elicitationId, message fields)
- URL mode response structure (action without content)
- URLElicitationRequiredError structure and error code (-32042)

Also updates existing elicitation tools to include explicit mode: 'form'
as required by the SEP-1036 schema changes.
- Use elicitInput() instead of raw request() for proper capability checking
- Add completion notification test (notifications/elicitation/complete)
- Add test_elicitation_sep1036_complete tool to everything-server
- Add ElicitationUrlModeScenario to pending list since SDK doesn't
  yet export URL mode elicitation support
- Define ElicitationCompleteNotificationSchema locally until SDK
  releases it
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 20, 2025

Open in StackBlitz

npx https://pkg.pr.new/modelcontextprotocol/conformance/@modelcontextprotocol/conformance@44

commit: 40a7fb9

Define URL_ELICITATION_REQUIRED_CODE and UrlModeElicitParams locally
since they don't exist in the released SDK yet.
@felixweinberger felixweinberger marked this pull request as ready for review November 20, 2025 17:34
@felixweinberger felixweinberger marked this pull request as draft November 20, 2025 20:03
pcarleton
pcarleton previously approved these changes Nov 25, 2025
Copy link
Member

@pcarleton pcarleton left a comment

Choose a reason for hiding this comment

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

overall LGTM, think it just needs to update based on sdk changes

if we want to get more advanced with this in the future, we can have handlers for the URL's provided and check they have a GET request on them before proceeding. that would handle the "error -> elicit -> retry" flow

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.

4 participants