From ed48714145ca6f35249af7db57acbd1fa2e44b4a Mon Sep 17 00:00:00 2001 From: Tai An Date: Mon, 8 Jun 2026 09:08:14 -0700 Subject: [PATCH] fix(mcp): do not leak server credentials in 403 'tool not allowed' error --- litellm/proxy/_experimental/mcp_server/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/_experimental/mcp_server/server.py b/litellm/proxy/_experimental/mcp_server/server.py index 276a6e8a3bb..440da436184 100644 --- a/litellm/proxy/_experimental/mcp_server/server.py +++ b/litellm/proxy/_experimental/mcp_server/server.py @@ -2077,7 +2077,7 @@ if MCP_AVAILABLE: ): raise HTTPException( status_code=403, - detail=f"User not allowed to call this tool. Allowed MCP servers: {allowed_mcp_servers}", + detail=f"User not allowed to call this tool. Allowed MCP servers: {[server.name for server in allowed_mcp_servers]}", ) standard_logging_mcp_tool_call: StandardLoggingMCPToolCall = (