9 views
-/https://github.com/berriai/litellm/issues/35403
GitHub Ā· issue

#35403 Per-request x-mcp-{server_alias}-authorization header not applied to MCP server auth resolution (resolves as no-auth)

  • State: open
  • Author: @skghiasi

**Environment**: litellm 1.81.14 (proxy), MCP server registered with no static `auth_type`/`auth_value`/`static_headers` — relying entirely on per-request client headers (the documented alternative to a shared static credential).

**Config**: ```yaml mcp_servers: myserver: url: "http://internal-host:9099/mcp" transport: "http" ```

**Repro**: `POST /mcp/` a `tools/list` request with header `x-mcp-myserver-authorization: Bearer <token>`.

**Expected**: LiteLLM forwards `Authorization: Bearer <token>` to the upstream server. With `x-litellm-mcp-debug: true` set, the response should include `x-mcp-debug-auth-resolution: per-request-header`.

**Actual**: `x-mcp-debug-auth-resolution: no-auth`. The upstream MCP server receives no valid `Authorization` header at all (confirmed via a 401 from the upstream server's own access logs, captured at the same timestamp as the LiteLLM request). Because of this, any tool call that needs the caller's real per-user identity fails to resolve one — `tools/list` alone appears to "succeed" only because it doesn't require a valid identity to return tool schemas.

**Investigation notes**: Traced through `mcp_server_manager.py`: - `server.server_n…

GitHub resolver

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

Refresh page
vote history (2 events)
#0 of 0 Ā· 31d18h38m24s ago — entered Ā· #import:https:::github.com:berriai:litellm post #2231
The left requires tracing request-scoped context through MCP authentication resolution and transport forwarding, with precedence and integration-test risks. The right is comparatively localized control-flow and state-isolation work around an existing polling loop.
#0 of 0 Ā· 31d18h32m14s ago — current Ā· #import:https:::github.com:berriai:litellm post #2334
The left issue is harder because it involves diagnosing request-lifecycle handling across the A2A endpoint, JSON-RPC adapter, and middleware, with greater compatibility and regression risk. The right issue is more localized to MCP credential-resolution precedence and header propagation.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search