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 - MCP deepwiki mcp is unstable, move to stable mcp

Ishaan Jaff03a589d32319
diff --git a/tests/llm_responses_api_testing/test_openai_responses_api.py b/tests/llm_responses_api_testing/test_openai_responses_api.py
index b23186a13a1..d00d8ce5e09 100644
--- a/tests/llm_responses_api_testing/test_openai_responses_api.py
+++ b/tests/llm_responses_api_testing/test_openai_responses_api.py
@@ -1117,13 +1117,13 @@ def test_mcp_tools_with_responses_api():
MCP_TOOLS = [
{
"type": "mcp",
- "server_label": "deepwiki",
- "server_url": "https://mcp.deepwiki.com/mcp",
- "allowed_tools": ["ask_question"]
+ "server_label": "gitmcp",
+ "server_url": "https://gitmcp.io/openai/tiktoken",
+ "allowed_tools": ["search_tiktoken_documentation", "fetch_tiktoken_documentation"],
}
]
MODEL = "openai/gpt-4.1"
- USER_QUERY = "What transport protocols does the 2025-03-26 version of the MCP spec (modelcontextprotocol/modelcontextprotocol) support?"
+ USER_QUERY = "how does tiktoken work?"
#########################################################
# Step 1: OpenAI will use MCP LIST, and return a list of MCP calls for our approval
response = litellm.responses(
@@ -1135,26 +1135,27 @@ def test_mcp_tools_with_responses_api():
response = cast(ResponsesAPIResponse, response)
- mcp_approval_id: Optional[str]
+ mcp_approval_id: Optional[str] = None
for output in response.output:
if output.type == "mcp_approval_request":
mcp_approval_id = output.id
break
# Step 2: Send followup with approval for the MCP call
- response_with_mcp_call = litellm.responses(
- model=MODEL,
- tools=MCP_TOOLS,
- input=[
- {
- "type": "mcp_approval_response",
- "approve": True,
- "approval_request_id": mcp_approval_id
- }
- ],
- previous_response_id=response.id,
- )
- print(response_with_mcp_call)
+ if mcp_approval_id:
+ response_with_mcp_call = litellm.responses(
+ model=MODEL,
+ tools=MCP_TOOLS,
+ input=[
+ {
+ "type": "mcp_approval_response",
+ "approve": True,
+ "approval_request_id": mcp_approval_id
+ }
+ ],
+ previous_response_id=response.id,
+ )
+ print(response_with_mcp_call)
@pytest.mark.asyncio
diff --git a/tests/llm_translation/test_anthropic_completion.py b/tests/llm_translation/test_anthropic_completion.py
index 24c5b656f45..5877005bfe6 100644
--- a/tests/llm_translation/test_anthropic_completion.py
+++ b/tests/llm_translation/test_anthropic_completion.py
@@ -1276,16 +1276,16 @@ def test_anthropic_mcp_server_tool_use(spec: str):
tools = [
{
"type": "url",
- "url": "https://mcp.deepwiki.com/mcp",
- "name": "deepwiki-mcp",
+ "url": "https://gitmcp.io/openai/tiktoken",
+ "name": "gitmcp",
}
]
elif spec == "openai":
tools = [
{
"type": "mcp",
- "server_label": "deepwiki",
- "server_url": "https://mcp.deepwiki.com/mcp",
+ "server_label": "gitmcp",
+ "server_url": "https://gitmcp.io/openai/tiktoken",
"require_approval": "never",
},
]
@@ -1313,15 +1313,15 @@ def test_anthropic_mcp_server_responses_api(model: str):
tools = [
{
"type": "mcp",
- "server_label": "deepwiki",
- "server_url": "https://mcp.deepwiki.com/mcp",
+ "server_label": "gitmcp",
+ "server_url": "https://gitmcp.io/openai/tiktoken",
"require_approval": "never",
},
]
response = litellm.responses(
model=model,
- input="Who won the World Cup in 2022?",
+ input="how does tiktoken work?",
max_output_tokens=100,
tools=tools,
)