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 && (