Skip to content

vMCP: answer a tools/call with an MCP URL-mode elicitation #6970

Closed
2 of 2 issues completed
Closed

Description

@tgrunnagle

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 an InputRequiredResult carrying elicitation/create with mode: "url" on 2026-07-28, as the result of a tools/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

  1. 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.
  2. mcpcompat: expose a session's declared client capabilities toolhive-core#447: mcpcompat exposes a session's declared client capabilities, with a known flag. Prerequisite for 3.
  3. vMCP: render -32042 on Legacy sessions that declared URL-mode elicitation #7023: Legacy -32042 for sessions that declared URL mode. Lands after 1 and a toolhive-core release with 2.

Acceptance

References

Sub-issues

Sub-issues

2 of 2 Issues completed
Loading 2 sub-issues

Metadata

Metadata

Assignees

Labels

enhancementvmcp

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions