You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vMCP: keep a delegated session and route calls when the user has not connected a backend's provider #7189
Problem: vMCP discovers a backend's capabilities with the caller's own outbound credential. For a delegated token whose user hasn't connected that backend's provider, discovery fails and the backend's tools disappear from the session. If no backend returns capabilities, aggregation fails with "no backends returned capabilities". On a 2025-11-25 session, vMCP ends the session during initialize: the client gets a session ID, and its next request gets 404. A 2026-07-28 client gets an internal error. With other backends present, a call for the missing tool gets an unknown-tool error. Either way the call never reaches the credential read, so the user is never told to connect.
Change: A "needs authorization" result during discovery for a delegated token neither removes the backend from routing nor ends the session. A tools/call for that backend's tool reaches the credential read and gets the connect answer. This issue settles how vMCP learns the tool names of a backend the user hasn't connected (for example, a capability view not tied to one user's credential, or tools the operator declares); whatever the choice, it must not expose another user's backend state. Other discovery failures behave as today.
Acceptance:
Delegated user, no connection, one backend: initialize succeeds, the session stays valid, and tools/call for that backend's tool gets the connect answer, not 404, an internal error, or an unknown-tool error.
Same, with a second, reachable backend: its tools work, and the unconnected backend's tool gets the connect answer.
After the user connects, the backend's tools work in the same session without re-initializing.
Related: "vMCP: graceful degradation when one upstream IdP fails in
multi-upstream auth" (#5162). With "Make secondary chain legs optionally
non-fatal" (#7311), an interactive sign-in can also complete without a
provider, and then hits the same discovery problem this issue fixes for
delegated sessions. The fix here now covers interactive sessions as well
(see the update on #5162).
Recording an open question for this issue that came up while reviewing the delegated credential error work (the branch that adds DelegatedAuthRequiredError / ErrDelegatedCredentialUnavailable to vMCP). We looked at it from the storage side and from the Mecatl side, and the two views don't agree yet on where the tool names come from.
Where both views agree:
Phase 1 keeps today's behaviour as a documented limit: a backend whose delegated credential read fails during discovery is dropped from the view, so its tools come back as not found. The named delegated errors only show up when listing worked and the later call's read failed. The error-handling docs on that branch say so.
In this issue, a "needs authorization" during discovery should not drop the backend from routing or end the session, and the partial view should not be cached per identity. The call should reach the credential read.
Where they differ: how vMCP learns the tool names of a backend the user hasn't connected.
Storage view: use a capability view that isn't tied to the user's credential, or tools the operator declares. A "last known" per-user view doesn't help a user who never connected the provider, and a view cached from another user breaks the "must not expose another user's backend state" rule. Any per-user view also has to stay inside the capability cache key (route, session binding, platform user).
Mecatl view: listing runs under the user's authority. The broker issues a V for the tools/list after the same session, workload and actor checks (the "Tool discovery" paragraph in mcp-authorization.md). Listing under a service credential would go against the rule there that missing connection or authorization evidence fails closed "without fallback to a service credential, another user, or a more privileged agent". So this view prefers keeping the backend advertised over discovering it with a different identity.
The two may be closer than they look. Discovering with a service credential conflicts with the Mecatl rule. Operator-declared tool names don't use any credential, so that rule doesn't obviously apply to them, and they give the storage view an identity-free source. What this issue needs to decide:
Is operator-declared (static) tool metadata an acceptable source for an unconnected backend, or does the design want listing to reflect only what the user's own credential can see?
If the user's credential is the only source, an unconnected backend has no tool names to advertise, so the acceptance criteria above (call gets the connect answer rather than unknown-tool) can't be met for a user who never connected. Should the criteria change, or should the client be told about the backend some other way?
Activity
jhrozek commentedon Nov 26, 2026
Related: "vMCP: graceful degradation when one upstream IdP fails in
multi-upstream auth" (#5162). With "Make secondary chain legs optionally
non-fatal" (#7311), an interactive sign-in can also complete without a
provider, and then hits the same discovery problem this issue fixes for
delegated sessions. The fix here now covers interactive sessions as well
(see the update on #5162).
jhrozek commentedon Nov 27, 2026
Recording an open question for this issue that came up while reviewing the delegated credential error work (the branch that adds
DelegatedAuthRequiredError/ErrDelegatedCredentialUnavailableto vMCP). We looked at it from the storage side and from the Mecatl side, and the two views don't agree yet on where the tool names come from.Where both views agree:
Where they differ: how vMCP learns the tool names of a backend the user hasn't connected.
Vfor thetools/listafter the same session, workload and actor checks (the "Tool discovery" paragraph in mcp-authorization.md). Listing under a service credential would go against the rule there that missing connection or authorization evidence fails closed "without fallback to a service credential, another user, or a more privileged agent". So this view prefers keeping the backend advertised over discovering it with a different identity.The two may be closer than they look. Discovering with a service credential conflicts with the Mecatl rule. Operator-declared tool names don't use any credential, so that rule doesn't obviously apply to them, and they give the storage view an identity-free source. What this issue needs to decide: