Skip to content

vMCP: answer a call for an unconnected provider with a URL elicitation carrying the connect link #7188

Open

Description

@ChrisJBurns

Part of "Delegated client access to a user's connections" (#6406). Depends on "Ownership-checked credential read for delegated tokens, keyed by user and routed provider" (#6407) and on "User-keyed upstream storage behind the embedder option" (#7263); uses the URL elicitation answer from "vMCP: answer a tools/call with an MCP URL-mode elicitation" (#6970).

Mecatl phase 2.

Problem: When a delegated token's user has no stored credential for the routed provider, or its refresh is rejected as an invalid grant, "Ownership-checked credential read for delegated tokens, keyed by user and routed provider" (#6407) returns a "needs authorization" error naming the provider, with no link. Nothing turns that error into an answer an MCP client can act on. vMCP's URL elicitation answer (#6970) is produced only by an embedder's in-process decorator, so every deployment would need its own decorator to tell the user where to connect, and a standalone vMCP can't do it at all.

Change:

  • When the outbound credential read returns "needs authorization" for a tools/call, vMCP answers that call with the URL elicitation answer (vMCP: answer a tools/call with an MCP URL-mode elicitation #6970), carrying the connect link, before sending anything to the backend. The existing render seam chooses the shape for the protocol and the client's declared capabilities. A client that didn't declare URL mode, or whose capabilities vMCP doesn't know, gets the fallback; vMCP's own answer sets no fallback text, so the link never appears in it.
  • The connect link points at an entry point on the gateway's authorization server that this issue adds: for a user who is already signed in, it runs the named provider's authorization and stores the connection under that user, then returns to a fixed page. The link names the provider and nothing about the user, and is never taken from a backend or from the request. Starting it requires the user's own sign-in, so a link cannot connect a provider to someone else's account.
  • Reconnect: the same entry point replaces an existing connection for the provider (a new account replaces the old row; a concurrent refresh never overwrites the replacement). Moved here from "Re-authorization walks the full upstream chain instead of evaluating existing credentials" (Re-authorization walks the full upstream chain instead of evaluating existing credentials #6831), which keeps only the replace rule in storage.
  • Storage failures and transient refresh failures stay infrastructure errors, never an elicitation. A row owned by another user stays a hard failure.
  • Deployments without user-keyed storage are unchanged.

Acceptance:

  • Delegated user with no connection for the routed provider: a client that declared URL elicitation gets the URL elicitation answer with the link for its protocol version, and the recording backend receives no tools/call.
  • After the user connects through the link, the same call succeeds with their credential.
  • A storage outage gets an infrastructure error, not an elicitation. Another user's row is refused.
  • Session-mode behaviour is unchanged.
  • The entry point refuses a request without the user's own sign-in, and the connection it stores is read by the user's next delegated call.
  • Reconnect: success, cancel, failure, account replacement.

Activity

  1. added
    needs-triage
    on Nov 18, 2026
  2. removed
    needs-triage
    on Nov 24, 2026
  3. jhrozek commented on Nov 26, 2026

    @jhrozek
    Contributor

    Related: "vMCP: graceful degradation when one upstream IdP fails in
    multi-upstream auth" (#5162). Since "Make secondary chain legs optionally
    non-fatal" (#7311), an embedder can let sign-in finish with a provider
    skipped, so the single-provider connect entry point here is also how a user
    connects a provider they skipped at sign-in. This issue now owns that entry
    point (see the update on #5162).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions