The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix: clear oauth2_flow when client_credentials set without token_url
joereynad58b0a9e06be
diff --git a/litellm/proxy/_experimental/mcp_server/rest_endpoints.py b/litellm/proxy/_experimental/mcp_server/rest_endpoints.pyindex 5faa0104ac1..ef01f027d6f 100644--- a/litellm/proxy/_experimental/mcp_server/rest_endpoints.py+++ b/litellm/proxy/_experimental/mcp_server/rest_endpoints.py@@ -910,6 +910,10 @@ if MCP_AVAILABLE:else None))+ # client_credentials requires token_url to fetch a token; without it the+ # incoming auth header would be dropped with nothing to replace it.+ if _oauth2_flow == "client_credentials" and not request.token_url:+ _oauth2_flow = Noneserver_model = MCPServer(server_id=request.server_id or "",