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: Transport Type for OpenAPI Spec on UI
Sameer Kankute816f9052ff64
diff --git a/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py b/litellm/proxy/_experimental/mcp_server/mcp_server_manager.pyindex 5c72bfbc13f..b9f335ce5da 100644--- a/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py+++ b/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py@@ -2604,6 +2604,7 @@ class MCPServerManager:server.mcp_info.get("description") if server.mcp_info else None),url=server.url,+ spec_path=server.spec_path,transport=server.transport,auth_type=server.auth_type,created_at=datetime.now(),diff --git a/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_columns.tsx b/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_columns.tsxindex 78e9c6f465a..d49949e7e04 100644--- a/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_columns.tsx+++ b/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_columns.tsx@@ -47,7 +47,13 @@ export const mcpServerColumns = ({accessorKey: "transport",header: "Transport",- cell: ({ getValue }) => <span>{((getValue() as string) || "http").toUpperCase()}</span>,+ cell: ({ row }) => {+ const transport = row.original.transport || "http";+ const specPath = row.original.spec_path;+ // If server has spec_path, display as "OPENAPI" instead of the raw transport type+ const displayTransport = specPath && transport !== "stdio" ? "OPENAPI" : transport;+ return <span>{displayTransport.toUpperCase()}</span>;+ },},{accessorKey: "auth_type",diff --git a/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.tsx b/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.tsxindex 88f8a737af2..703f4eac5cf 100644--- a/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.tsx+++ b/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.tsx@@ -144,9 +144,9 @@ const MCPServerEdit: React.FC<MCPServerEditProps> = ({}, [mcpServer.env]);- // If server has spec_path and no url, show it as "openapi" transport in the UI+ // If server has spec_path, show it as "openapi" transport in the UIconst effectiveTransport = React.useMemo(() => {- if (mcpServer.spec_path && !mcpServer.url && mcpServer.transport !== "stdio") {+ if (mcpServer.spec_path && mcpServer.transport !== "stdio") {return TRANSPORT.OPENAPI;}return mcpServer.transport;diff --git a/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_view.tsx b/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_view.tsxindex 635c787f30d..15c14f2af1a 100644--- a/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_view.tsx+++ b/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_view.tsx@@ -131,7 +131,7 @@ export const MCPServerView: React.FC<MCPServerViewProps> = ({<Card><Text>Transport</Text><div className="mt-2">- <Title>{handleTransport(mcpServer.transport ?? undefined)}</Title>+ <Title>{handleTransport(mcpServer.transport ?? undefined, mcpServer.spec_path ?? undefined).toUpperCase()}</Title></div></Card>@@ -220,7 +220,7 @@ export const MCPServerView: React.FC<MCPServerViewProps> = ({</div><div><Text className="font-medium">Transport</Text>- <div>{handleTransport(mcpServer.transport)}</div>+ <div>{handleTransport(mcpServer.transport, mcpServer.spec_path).toUpperCase()}</div></div><div><Text className="font-medium">Extra Headers</Text>diff --git a/ui/litellm-dashboard/src/components/mcp_tools/types.tsx b/ui/litellm-dashboard/src/components/mcp_tools/types.tsxindex 6856322b53f..7eb5b51669a 100644--- a/ui/litellm-dashboard/src/components/mcp_tools/types.tsx+++ b/ui/litellm-dashboard/src/components/mcp_tools/types.tsx@@ -25,11 +25,16 @@ export const TRANSPORT = {OPENAPI: "openapi",};-export const handleTransport = (transport?: string | null): string => {+export const handleTransport = (transport?: string | null, specPath?: string | null): string => {if (transport === null || transport === undefined) {return TRANSPORT.SSE;}+ // If server has spec_path, display as "openapi" instead of the raw transport type+ if (specPath && transport !== TRANSPORT.STDIO) {+ return TRANSPORT.OPENAPI;+ }+return transport;};