From 8f2166d204ec8b04a08de96ec2a4d151a35e62b6 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Thu, 19 Feb 2026 09:49:29 -0800 Subject: [PATCH] wire spec_path through build_mcp_server_from_table --- .../mcp_server/mcp_server_manager.py | 5 ++++- .../mcp_tools/create_mcp_server.tsx | 21 ++++++++++++++++++- .../components/mcp_tools/mcp_server_edit.tsx | 19 +++++++++++++++++ .../src/components/mcp_tools/types.tsx | 1 + 4 files changed, 44 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py b/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py index 49c4a0ce681..bbc9ec2db8a 100644 --- a/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py +++ b/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py @@ -71,7 +71,9 @@ try: from mcp.shared.tool_name_validation import ( validate_tool_name, # pyright: ignore[reportAssignmentType] ) - from mcp.shared.tool_name_validation import SEP_986_URL + from mcp.shared.tool_name_validation import ( + SEP_986_URL, + ) except ImportError: from pydantic import BaseModel @@ -608,6 +610,7 @@ class MCPServerManager: alias=getattr(mcp_server, "alias", None), server_name=getattr(mcp_server, "server_name", None), url=mcp_server.url, + spec_path=getattr(mcp_server, "spec_path", None), transport=cast(MCPTransportType, mcp_server.transport), auth_type=auth_type, authentication_token=auth_value, diff --git a/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.tsx b/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.tsx index 61cad4c437b..2f80bb24e99 100644 --- a/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.tsx +++ b/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.tsx @@ -564,7 +564,6 @@ const CreateMCPServer: React.FC = ({ label={MCP Server URL} name="url" rules={[ - { required: true, message: "Please enter a server URL" }, { validator: (_, value) => validateMCPServerUrl(value) }, ]} > @@ -575,6 +574,26 @@ const CreateMCPServer: React.FC = ({ )} + {/* OpenAPI Spec URL - only show for HTTP and SSE */} + {transportType !== "stdio" && ( + + OpenAPI Spec URL (optional) + + + + + } + name="spec_path" + > + + + )} + {/* Authentication - only show for HTTP and SSE */} {transportType !== "stdio" && ( = ({ )} + {!isStdioTransport && ( + + OpenAPI Spec URL (optional) + + + + + } + name="spec_path" + > + + + )} + {!isStdioTransport && (