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]

fix code quality

Ishaan Jafffb3a67ba8d14
diff --git a/litellm/proxy/_experimental/mcp_server/server.py b/litellm/proxy/_experimental/mcp_server/server.py
index 4ad3580a7e7..bd050516c74 100644
--- a/litellm/proxy/_experimental/mcp_server/server.py
+++ b/litellm/proxy/_experimental/mcp_server/server.py
@@ -3,7 +3,6 @@ LiteLLM MCP Server Routes
"""
import asyncio
-import logging
from typing import Any, Dict, List, Union
from anyio import BrokenResourceError
@@ -17,7 +16,7 @@ from litellm._logging import verbose_logger
# "mcp" requires python 3.10 or higher, but several litellm users use python 3.8
# We're making this conditional import to avoid breaking users who use python 3.8.
try:
- import mcp
+ from mcp.server import Server
MCP_AVAILABLE = True
except ImportError as e: