8 views
-/https://github.com/berriai/litellm/issues/31609
GitHub · issue

#31609 MCP egress: tool listing drops the caller subject token, so ID-JAG / token_exchange OBO servers list no tools

  • State: open
  • Author: @yassin-berriai

## What

When the proxy lists tools for an MCP egress server that resolves its upstream credential from the caller's identity (the per-user OBO grants: `oauth2_id_jag`, and `oauth2_token_exchange` when no machine fallback is configured), the tool list comes back empty, so the client never discovers the tools and a subsequent `tools/call` is rejected with "tool not found" before the credential exchange ever runs. The server is effectively unusable end to end through the proxy MCP gateway.

## Why

The tool-listing path (`MCPServerManager._get_tools_from_server` in `litellm/proxy/_experimental/mcp_server/mcp_server_manager.py`) calls `_create_mcp_client` without a `subject_token`, by long-standing design ("tool listing must not be blocked by missing per-user env vars"). The tool-call path (`_call_regular_mcp_tool`) does extract the caller's bearer and thread it through. For an `oauth2_id_jag` server there is no static credential to fall back on, so listing fails closed (the resolver returns `precondition_required`), `get_tools` swallows it and returns `[]`, the registry stays empty, and the call is then refused against that empty registry.

This is not introduced by the v2-native ID-…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (4 events)
#0 of 0 · 31d18h51m22s ago — entered · #import:https:::github.com:berriai:litellm post #2007
31609 is harder because it requires tracing caller identity through MCP discovery, credential resolution, and subsequent tool invocation while preserving authorization semantics and compatibility across multiple authentication modes. It also carries higher regression risk and needs end-to-end coverage. 32308 is comparatively localized to retry candidate selection and affinity ordering, with focused routing tests likely sufficient.
31609 requires coordinated changes across MCP proxy authentication, client construction, credential resolution, and tool-registration/call flows, with broader security and compatibility testing; 33016 is a localized message-translation branch defect with a narrow regression test.
31609 is harder because it spans MCP request context, credential resolution, error handling, and compatibility across listing and invocation flows, requiring broader integration tests. 28379 is comparatively localized to Redis Cluster connection initialization and authentication wiring.
#0 of 0 · 31d18h9m30s ago — current · #import:https:::github.com:berriai:litellm post #2687
The left issue is harder because it likely spans Vertex-specific endpoint routing, model translation, authentication, and compatibility testing across deployment modes. The right issue is more contained: tracing one identity value through an existing MCP lifecycle with focused regression coverage.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search