{"record":{"id":"ea9bb9d720099f46","repo":"BerriAI/litellm","slug":"internal","errorCode":"internal","errorMessage":"Listing tools from MCP server {server_name!r} failed","messagePattern":"Listing tools from MCP server (.+?) failed","errorType":"exception","errorClass":"MCPServerListError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/_experimental/mcp_server/mcp_server_manager.py","lineNumber":3537,"sourceCode":"                    server_name=upstream_auth_error.server_name,\n                ) from upstream_auth_error\n            raise\n        except HTTPException as e:\n            # A v2 resolver auth challenge (token_exchange's RFC 9728 401, authorization_code's\n            # browser-OAuth 401, or a 403) is raised at client-build time, inside this try. Route it\n            # through the same MCPUpstreamAuthError channel as pass-through so single-server routes\n            # surface the challenge (the client re-authenticates) while the aggregator keeps absorbing.\n            # Non-auth HTTP errors stay absorbed so one misconfigured server can't blank the listing.\n            if e.status_code in (401, 403):\n                headers: Final = e.headers or {}\n                challenge_header: Final = headers.get(\"WWW-Authenticate\") or headers.get(\"www-authenticate\")\n                raise MCPUpstreamAuthError(\n                    status_code=e.status_code,\n                    www_authenticate=None if server.is_dcr_bridge else challenge_header,\n                    server_name=server.name,\n                ) from e\n            verbose_logger.warning(\"Failed to get tools from server %s: %s\", server.name, e)\n            raise MCPServerListError(ServerListFault(tag=\"internal\", status_code=e.status_code), server.name) from e\n        except MCPServerListError:\n            raise\n        except Exception as e:\n            verbose_logger.warning(\"Failed to get tools from server %s: %s\", server.name, e)\n            raise_classified_list_failure(e, server.name, suppress_challenge=server.is_dcr_bridge)\n\n    async def get_prompts_from_server(\n        self,\n        server: MCPServer,\n        mcp_auth_header: str | dict[str, str] | None = None,\n        extra_headers: dict[str, str] | None = None,\n        add_prefix: bool = True,\n        raw_headers: dict[str, str] | None = None,\n    ) -> list[Prompt]:\n        \"\"\"\n        Helper method to get prompts from a single MCP server with prefixed names.\n\n        Args:","sourceCodeStart":3519,"sourceCodeEnd":3555,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py#L3519-L3555","documentation":"Carrier error in the MCP server manager: a non-auth exception while listing an upstream MCP server's tools is wrapped as MCPServerListError so single-server routes relay the status and the aggregator absorbs the failure into a per-server outcome.","triggerScenarios":"Thrown at litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:3537 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check upstream server reachability and credentials; see logs for the root cause."],"exampleFix":"Run the admin connection test for that server.","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}