Repository navigation
Description
Problem
An embedder of vMCP cannot answer a tools/call with an MCP URL-mode elicitation. URL mode is the specification's answer when a server needs third-party authorization on the user's behalf: the client opens a server-owned page, the user authorizes, and the client retries the call.
Today:
vmcp.ElicitationRequest(pkg/vmcp/elicitation.go) is form-only by design. Its doc comment says the URL-mode fields (ElicitationID,URL,Mode) are omitted because the composer never constructs them.- There is no way for a decorator or middleware around vMCP to return
URLElicitationRequiredError(-32042) on 2025-11-25, or anInputRequiredResultcarryingelicitation/createwithmode: "url"on 2026-07-28, as the result of atools/call. - vMCP elicitation: fast-fail without a standalone stream, and cross-pod origination #5975 tracks a related failure: a client that declared elicitation but holds no standalone stream hangs until timeout on a mid-call elicitation.
Use case
An embedder that aggregates many backends, each with its own per-user OAuth credential from a different provider. When one backend's credential is dead, the only prompt available today is an HTTP 401, which sends the client through a full sign-in for every provider. With URL-mode elicitation, the embedder could point the user at a connect page for that one backend and reconnect only that provider.
Design
vMCP gains a typed URL elicitation answer: an error that in-process code (a VMCP or BackendClient decorator) returns from tools/call. vMCP renders it at the render seam, according to the negotiated protocol and the client's declared capabilities. Callers get no capability query; the render seam decides.
| Client | Declared elicitation.url |
Rendered as |
|---|---|---|
| 2026-07-28 (Modern) | yes | InputRequiredResult with elicitation/create, mode: "url" (no elicitationId, no requestState), HTTP 200, no standalone stream |
| 2026-07-28 (Modern) | no | -32021 with requiredCapabilities: {elicitation: {url: {}}}, HTTP 200 |
| 2025-11-25 (Legacy) | yes, and known | -32042 with data.elicitations carrying elicitationId |
| 2025-11-25 (Legacy) | no, or unknown (rehydrated session) | isError result with the message, no URL |
The fallback never contains the URL. A backend cannot produce the answer. The Modern input_required writer takes vmcp.InputRequiredResult, so #6059 reuses it. notifications/elicitation/complete is deferred: it exists only in 2025-11-25.
Sub-issues, in order
- vMCP: answer tools/call with a URL-mode elicitation (Modern and fallback) #7022: domain type, Modern
InputRequiredResult, and the fixed fallback on both protocols. Lands first. - mcpcompat: expose a session's declared client capabilities toolhive-core#447: mcpcompat exposes a session's declared client capabilities, with a
knownflag. Prerequisite for 3. - vMCP: render -32042 on Legacy sessions that declared URL-mode elicitation #7023: Legacy
-32042for sessions that declared URL mode. Lands after 1 and a toolhive-core release with 2.
Acceptance
- A
tools/callthat returns the URL elicitation answer producesInputRequiredResultwithmode: "url"on a 2026-07-28 client that declared it (vMCP: answer tools/call with a URL-mode elicitation (Modern and fallback) #7022), and-32042with the elicitation on a 2025-11-25 session that declared it (vMCP: render -32042 on Legacy sessions that declared URL-mode elicitation #7023). - Neither shape requires the client to hold a standalone SSE stream (vMCP: answer tools/call with a URL-mode elicitation (Modern and fallback) #7022).
- A client that did not declare URL-mode elicitation receives the fixed fallback instead of a URL elicitation (vMCP: answer tools/call with a URL-mode elicitation (Modern and fallback) #7022, vMCP: render -32042 on Legacy sessions that declared URL-mode elicitation #7023). This replaces "a caller can tell whether the client declared URL mode": vMCP decides at the render seam, so callers need no capability query.
- Integration tests drive a real go-sdk client on each protocol (vMCP: answer tools/call with a URL-mode elicitation (Modern and fallback) #7022, vMCP: render -32042 on Legacy sessions that declared URL-mode elicitation #7023). This replaces "the conformance suite covers both shapes": the MCP conformance suite has no URL elicitation scenario and drives only backends, which cannot produce the answer.
References
- MCP specification, Elicitation, URL mode: https://modelcontextprotocol.io/specification/2026-07-28/client/elicitation and https://modelcontextprotocol.io/specification/2025-11-25/client/elicitation
docs/arch/16-vmcp-mrtr.md(MRTR design, Support MRTR pass-through for Modern backends in vMCP #6059),docs/arch/10-virtual-mcp-architecture.md- vMCP elicitation: fast-fail without a standalone stream, and cross-pod origination #5975 (elicitation fast-fail without a standalone stream), Design MRTR-based elicitation and sampling passthrough for vMCP #5759 (MRTR-based passthrough design, closed not planned)
Activity