SEP-1036: URL Mode Elicitation for secure out-of-band interactions by nbarbettini · Pull Request #887 · modelcontextprotocol/modelcontextprotocol

and others added 11 commits

June 30, 2025 11:04

nbarbettini

@nbarbettini

LucaButBoring

LucaButBoring

LucaButBoring

LucaButBoring

@nbarbettini nbarbettini changed the title feat: Add out-of-band elicitation mode feat: Secure (out-of-band) elicitation

Jul 1, 2025

cjellick

@wdawson

@wdawson

ggoodman

@nbarbettini

KKonstantinov

pcarleton

This was referenced

Nov 13, 2025

cbcoutinho added a commit to cbcoutinho/python-sdk that referenced this pull request

Nov 13, 2025
…actions

This commit adds support for URL mode elicitation as specified in SEP-1036,
enabling servers to direct users to external URLs for sensitive interactions
that must not pass through the MCP client.

Key changes:

Types (src/mcp/types.py):
- Add ELICITATION_REQUIRED error code (-32000)
- Update ElicitationCapability to support form and url modes
- Add ElicitTrackRequest and ElicitTrackResult for progress tracking
- Add UrlElicitationInfo and ElicitationRequiredErrorData types
- Update ElicitRequestParams with mode field and URL mode parameters

Server (src/mcp/server/):
- Add elicit_url() helper function in elicitation.py
- Add elicit_form() and elicit_url() methods to ServerSession
- Maintain backward compatibility with existing elicit() method

Client (src/mcp/client/session.py):
- Update capability negotiation for form and URL modes
- Add track_elicitation() method for progress monitoring

Tests:
- Comprehensive test coverage for URL mode elicitation
- Verify backward compatibility with form mode
- All 311 existing tests pass

Use cases enabled:
- OAuth authorization flows with third-party services
- Secure credential collection (API keys, passwords)
- Payment and subscription flows
- Any sensitive interaction requiring out-of-band handling

Breaking changes:
- ElicitRequestParams now requires mode field ("form" or "url")
- Clients must declare which elicitation modes they support

Closes: modelcontextprotocol/modelcontextprotocol#887

connor4312 added a commit to microsoft/vscode that referenced this pull request

Nov 13, 2025

connor4312 added a commit to microsoft/vscode that referenced this pull request

Nov 13, 2025

connor4312 added a commit to microsoft/vscode that referenced this pull request

Nov 13, 2025

This was referenced

Nov 20, 2025