Skip to content

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]

Merge origin/litellm_internal_staging into litellm_mcp_aggregate_outcomes

Tin Chi Lo5de03409860b
diff --cc litellm/proxy/_experimental/mcp_server/server.py
index 720910c11c9,ccdcf9c8434..608d0d21177
--- a/litellm/proxy/_experimental/mcp_server/server.py
+++ b/litellm/proxy/_experimental/mcp_server/server.py
@@@ -2309,18 -2240,15 +2272,14 @@@ if MCP_AVAILABLE
client_ip: Client IP for IP-based server access control
Returns:
- List[MCPTool]: Combined list of tools from all accessible servers
+ AggregateToolListing: Combined tools from all accessible servers plus each server's
+ classified listing outcome
"""
if not MCP_AVAILABLE:
- return []
+ return AggregateToolListing(tools=[], outcomes={})
- # Resolve toolset permissions and merge into the key's object_permission
- # so that the existing filter_tools_by_key_team_permissions logic picks them up.
- user_api_key_auth = await _merge_toolset_permissions(user_api_key_auth)
-
- # Get tools from managed MCP servers with error handling
- managed_tools = []
try:
- managed_tools = await _get_tools_from_mcp_servers(
+ listing = await _get_tools_from_mcp_servers(
user_api_key_auth=user_api_key_auth,
mcp_auth_header=mcp_auth_header,
mcp_servers=mcp_servers,