Skip to content

Conversation

@findleyr
Copy link
Contributor

@findleyr findleyr commented Nov 25, 2025

Two logical commits: (1) Expose structured JSON-RPC errors, and (2) use this to export URLElicitationRequired errors from SEP 1036.

Please see the individual commit messages for details.

Expose the jsonrpc.Error type to allow access to underlying JSON-RPC
error codes. Also, expose common JSON-RPC error codes in the jsonrpc
package, and MCP error codes in the mcp package.

+ tests

Fixes modelcontextprotocol#452
This change implements support for the MCP URL elicitation required error
(-32042), enabling servers to request out-of-band user authorization and
clients to automatically handle these requests with retry logic.

Server-side:
- Add CodeURLElicitationRequired constant
- Add URLElicitationRequiredError() constructor.

Client-side:
- Add urlElicitationMiddleware to intercept URLElicitationRequired
  errors and retry calls.
- Update callElicitationCompleteHandler to signal waiting operations.
- Fix capability advertisement to support both form and URL modes.

Fixes modelcontextprotocol#623
@findleyr findleyr marked this pull request as ready for review November 25, 2025 05:02
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.

1 participant