7 views
-/https://github.com/berriai/litellm/issues/27635
GitHub · issue

#27635 [Bug]: asyncio.CancelledError when listing tools for MCP server registered via REST API with transport: http + auth_type: oauth2

  • State: open
  • Author: @reddybhavaniprasad
  • Labels: bug, proxy, llm translation

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

When an MCP server using Streamable HTTP transport (transport: http) and OAuth2 client credentials (auth_type: oauth2) is registered via the REST API (POST /v1/mcp/server), tool discovery always fails silently. The server is created successfully (HTTP 201), background health check runs and sets last_health_check, but status stays permanently unknown and no tools are ever returned from that server. The LiteLLM pod logs show asyncio.CancelledError — the async task running the Streamable HTTP client is externally cancelled before the OAuth2 token exchange and tool listing can complete.

The same server configuration works correctly when registered via the ConfigMap mcp_servers: block — all tools are discovered at startup with no errors.

### Steps to Reproduce

1. Deploy LiteLLM Enterprise with a data plane (control plane / data plane split). 2. Register an MCP server via REST API with transport: http and auth_type: oauth2:

``` POST /v1/mcp/server { "server_name": "DatabricksSQL", "transport": "http", "url": "https://<workspace>.azuredatabr…

GitHub resolver

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

Refresh page
vote history (2 events)
#0 of 0 · 31d18h48m43s ago — entered · #import:https:::github.com:berriai:litellm post #2066
The left task spans asynchronous lifecycle management, authentication, background discovery, multiple registration paths, and distributed deployment behavior, creating substantially higher debugging and regression risk. The right task is a localized dashboard interaction fix with a narrow implementation surface.
#0 of 0 · 31d18h30m40s ago — current · #import:https:::github.com:berriai:litellm post #2366
The right issue is harder because it spans asynchronous lifecycle management, OAuth authentication, background health checks, REST-versus-startup configuration paths, and distributed deployment behavior, requiring broader investigation and higher regression risk. The left issue is comparatively localized to request validation and provider-specific parameter forwarding.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search