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 pydantic import error
Ishaan Jaff5017332690d3
diff --git a/litellm/proxy/_experimental/mcp_server/server.py b/litellm/proxy/_experimental/mcp_server/server.pyindex 29041eab97c..b9820fb41e3 100644--- a/litellm/proxy/_experimental/mcp_server/server.py+++ b/litellm/proxy/_experimental/mcp_server/server.py@@ -3,6 +3,7 @@ LiteLLM MCP Server Routes"""import asyncio+from typing import Any, Dictimport mcp.types as typesfrom anyio import BrokenResourceError@@ -16,7 +17,6 @@ from litellm._logging import verbose_loggerfrom litellm.proxy._experimental.mcp_server.tool_registry import (global_mcp_tool_registry,)-from litellm.types.mcp_server.tool_registry import *from .sse_transport import SseServerTransport@@ -55,7 +55,7 @@ async def list_tools() -> list[types.Tool]:@server.call_tool()async def handle_call_tool(- name: str, arguments: dict | None+ name: str, arguments: Dict[str, Any] | None) -> list[types.TextContent | types.ImageContent | types.EmbeddedResource]:"""Call a specific tool with the provided argumentsdiff --git a/litellm/types/mcp_server/tool_registry.py b/litellm/types/mcp_server/tool_registry.pyindex 9ff06ec3514..f2c1cf1a30b 100644--- a/litellm/types/mcp_server/tool_registry.py+++ b/litellm/types/mcp_server/tool_registry.py@@ -9,6 +9,9 @@ class MCPTool(BaseModel):input_schema: Dict[str, Any]handler: Callable+ class Config:+ arbitrary_types_allowed = True+class ToolSchema(BaseModel):name: str