BerriAI/litellm · error · MCPServerListError
timeout
timeout
Error message
Listing tools from MCP server {server_name!r} failed What it means
Raised in list_tools_from_server when anyio.fail_after(MCP_TOOL_LISTING_TIMEOUT) expires before client.list_tools returns: the upstream MCP server hung on tools/list and the call is aborted with a timeout fault.
Source
Thrown at litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:4270
boundary then applies its own policy: single-server routes relay the
truthful status, the multi-server aggregator absorbs the failure into
that server's listing outcome.
Args:
client: MCP client instance
server_name: Name of the server for logging
Returns:
List of tools from the server
"""
try:
with anyio.fail_after(MCP_TOOL_LISTING_TIMEOUT):
tools: Final = await client.list_tools(raise_on_error=True)
verbose_logger.debug("Tools from %s: %s", server_name, tools)
return tools
except TimeoutError as e:
verbose_logger.warning("Timeout while listing tools from %s", server_name)
raise MCPServerListError(ServerListFault(tag="timeout"), server_name) from e
except asyncio.CancelledError as e:
verbose_logger.warning("Task cancelled while listing tools from %s", server_name)
raise MCPServerListError(ServerListFault(tag="internal"), server_name) from e
except ConnectionError as e:
verbose_logger.warning("Connection error while listing tools from %s: %s", server_name, e)
raise MCPServerListError(ServerListFault(tag="unreachable"), server_name) from e
except Exception as e:
verbose_logger.warning("Error listing tools from %s: %s", server_name, e)
raise_classified_list_failure(e, server_name)
_SHORT_PREFIX_MAX_REHASH_ATTEMPTS = 1024
def _assign_unique_short_prefix(
self,
server: MCPServer,
registry: dict[str, MCPServer] | None = None,
) -> None:
"""Resolve and cache a collision-free short tool prefix on ``server``.View on GitHub (pinned to 77b7c6c40c)
Solutions
- Check upstream server reachability and credentials; see logs for the root cause.
Example fix
Run the admin connection test for that server.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:4270 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/89df34d5ff51303c.
Report an issue: GitHub.