Skip to content

Add URL elicitation support (SEP-1036)#993

Merged
Kehrlann merged 3 commits into
mainfrom
dgarnier/url-mode-elicitation-handler
Jun 3, 2026
Merged

Add URL elicitation support (SEP-1036)#993
Kehrlann merged 3 commits into
mainfrom
dgarnier/url-mode-elicitation-handler

Conversation

@Kehrlann
Copy link
Copy Markdown
Contributor

@Kehrlann Kehrlann commented Jun 2, 2026

Add URL-type elicitation schema support allowing servers to request URL input from users during tool execution. This enables out-of-band interactions like payment processing or API key entry.

Breaking changes:

  • ElicitRequest changed from a record to an interface.
  • The original ElicitRequest record was renamed to ElicitFormRequest.
  • McpClient builder elicitation() methods now accept ElicitFormRequest instead of ElicitRequest.

New APIs:

  • ElicitUrlRequest record for URL-mode elicitation.
  • urlElicitation() builder methods in McpClient.
  • elicitationCompleteConsumer() and elicitationCompleteConsumers() builder methods in McpClient.
  • sendElicitationComplete() methods in McpAsyncServer and McpSyncServer.
  • McpError.URL_ELICITATION_REQUIRED and McpSchema.ErrorCodes.URL_ELICITATION_REQUIRED.
  • ElicitationCompleteNotification record and METHOD_NOTIFICATION_ELICITATION_COMPLETE constant.

Supersedes #939
Closes #692

@Kehrlann Kehrlann force-pushed the dgarnier/url-mode-elicitation-handler branch from 5261f3f to 43e3e00 Compare June 2, 2026 13:10
@Kehrlann Kehrlann self-assigned this Jun 2, 2026
@Kehrlann Kehrlann requested a review from chemicL June 2, 2026 15:14
@Kehrlann Kehrlann added P1 Significant bug affecting many users, highly requested feature enhancement New feature or request labels Jun 2, 2026
@Kehrlann
Copy link
Copy Markdown
Contributor Author

Kehrlann commented Jun 2, 2026

@sainathreddyb I reworked your PR, would you have a look?

Add URL-type elicitation schema support allowing servers to request URL
input from users during tool execution. This enables out-of-band
interactions like payment processing or API key entry.

Breaking changes:

- `ElicitRequest` changed from a `record` to an `interface`.
- The original `ElicitRequest` record was renamed to `ElicitFormRequest`.
- `McpClient` builder `elicitation()` methods now accept `ElicitFormRequest` instead of `ElicitRequest`.

New APIs:

- `ElicitUrlRequest` record for URL-mode elicitation.
- `urlElicitation()` builder methods in `McpClient`.
- `elicitationCompleteConsumer()` and `elicitationCompleteConsumers()` builder methods in `McpClient`.
- `sendElicitationComplete()` methods in `McpAsyncServer` and `McpSyncServer`.
- `McpError.URL_ELICITATION_REQUIRED` and `McpSchema.ErrorCodes.URL_ELICITATION_REQUIRED`.
- `ElicitationCompleteNotification` record and `METHOD_NOTIFICATION_ELICITATION_COMPLETE` constant.

Co-authored-by: Daniel Garnier-Moiroux <git@garnier.wf>
@Kehrlann Kehrlann force-pushed the dgarnier/url-mode-elicitation-handler branch from 43e3e00 to 9cbe43b Compare June 2, 2026 15:42
@Kehrlann Kehrlann requested a review from tzolov June 2, 2026 15:42
Copy link
Copy Markdown
Member

@chemicL chemicL left a comment

Choose a reason for hiding this comment

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

Overall this looks great! Just a few minor requests. Also, please add the breaking changes information into the migration md file.

Comment thread docs/server.md Outdated
Comment thread mcp-core/src/main/java/io/modelcontextprotocol/client/McpAsyncClient.java Outdated
Comment thread mcp-core/src/main/java/io/modelcontextprotocol/spec/McpError.java
Comment thread mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java Outdated
@chemicL chemicL added this to the 2.0.0-RC1 milestone Jun 3, 2026
Comment thread docs/server.md
Comment on lines +752 to +753
exchange.getClientCapabilities().elicitation() != null
&& exchange.getClientCapabilities().elicitation().url() != null
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The UX is not great but we can add something to simplify the check in the future.

Comment thread mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java
Comment thread mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java
@Kehrlann Kehrlann force-pushed the dgarnier/url-mode-elicitation-handler branch from 0662fac to d01c83a Compare June 3, 2026 12:24
@Kehrlann Kehrlann merged commit dbb9bda into main Jun 3, 2026
24 checks passed
@Kehrlann Kehrlann deleted the dgarnier/url-mode-elicitation-handler branch June 3, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request P1 Significant bug affecting many users, highly requested feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SEP-1036: URL Mode Elicitation for secure out-of-band interactions

2 participants