From 38a20b803621bf227422d62ea10cb1d10b2f7046 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Mon, 5 Jan 2026 16:28:51 +0900 Subject: [PATCH] feat: feat: allow_all_keys to mcp server on the UI --- .../mcp_tools/MCPPermissionManagement.tsx | 27 ++++++++++++++++++- .../mcp_tools/create_mcp_server.tsx | 2 ++ .../components/mcp_tools/mcp_server_edit.tsx | 8 +++++- .../components/mcp_tools/mcp_server_view.tsx | 19 +++++++++++++ .../src/components/mcp_tools/types.tsx | 1 + 5 files changed, 55 insertions(+), 2 deletions(-) diff --git a/ui/litellm-dashboard/src/components/mcp_tools/MCPPermissionManagement.tsx b/ui/litellm-dashboard/src/components/mcp_tools/MCPPermissionManagement.tsx index 9286e4825cf..23735d985df 100644 --- a/ui/litellm-dashboard/src/components/mcp_tools/MCPPermissionManagement.tsx +++ b/ui/litellm-dashboard/src/components/mcp_tools/MCPPermissionManagement.tsx @@ -1,5 +1,5 @@ import React, { useEffect } from "react"; -import { Form, Select, Tooltip, Collapse, Input, Space, Button } from "antd"; +import { Form, Select, Tooltip, Collapse, Input, Space, Button, Switch } from "antd"; import { InfoCircleOutlined, MinusCircleOutlined, PlusOutlined } from "@ant-design/icons"; import { MCPServer } from "./types"; const { Panel } = Collapse; @@ -38,6 +38,11 @@ const MCPPermissionManagement: React.FC = ({ })); form.setFieldValue("static_headers", staticHeaders); } + if (typeof mcpServer.allow_all_keys === "boolean") { + form.setFieldValue("allow_all_keys", mcpServer.allow_all_keys); + } + } else { + form.setFieldValue("allow_all_keys", false); } }, [mcpServer, form]); @@ -57,6 +62,26 @@ const MCPPermissionManagement: React.FC = ({ className="border-0" >
+
+
+ + Allow All LiteLLM Keys + + + + +

Enable if this server should be "public" to all keys.

+
+ + + +
+ 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 e9f9636bf2c..d72b7c4f676 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 @@ -188,6 +188,7 @@ const CreateMCPServer: React.FC = ({ static_headers: staticHeadersList, stdio_config: rawStdioConfig, credentials: credentialValues, + allow_all_keys: allowAllKeysRaw, ...restValues } = values; @@ -278,6 +279,7 @@ const CreateMCPServer: React.FC = ({ mcp_access_groups: accessGroups, alias: restValues.alias, allowed_tools: allowedTools.length > 0 ? allowedTools : null, + allow_all_keys: Boolean(allowAllKeysRaw), static_headers: staticHeaders, }; 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.tsx index b4486bdfb23..82f85f75eda 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 @@ -286,7 +286,12 @@ const MCPServerEdit: React.FC = ({ if (!accessToken) return; try { // Ensure access groups is always a string array - const { static_headers: staticHeadersList, credentials: credentialValues, ...restValues } = values; + const { + static_headers: staticHeadersList, + credentials: credentialValues, + allow_all_keys: allowAllKeysRaw, + ...restValues + } = values; const accessGroups = (restValues.mcp_access_groups || []).map((g: any) => typeof g === "string" ? g : g.name || String(g), @@ -339,6 +344,7 @@ const MCPServerEdit: React.FC = ({ allowed_tools: allowedTools.length > 0 ? allowedTools : null, disallowed_tools: restValues.disallowed_tools || [], static_headers: staticHeaders, + allow_all_keys: Boolean(allowAllKeysRaw ?? mcpServer.allow_all_keys), }; const includeCredentials = restValues.auth_type && AUTH_TYPES_REQUIRING_CREDENTIALS.includes(restValues.auth_type); 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.tsx index 541c0bbb2f3..6a4e9c105ff 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 @@ -229,6 +229,25 @@ export const MCPServerView: React.FC = ({ Auth Type
{handleAuth(mcpServer.auth_type)}
+
+ Allow All LiteLLM Keys +
+ {mcpServer.allow_all_keys ? ( + + Enabled + + ) : ( + + Disabled + + )} + {mcpServer.allow_all_keys && ( + + All keys can access this MCP server + + )} +
+
Access Groups
diff --git a/ui/litellm-dashboard/src/components/mcp_tools/types.tsx b/ui/litellm-dashboard/src/components/mcp_tools/types.tsx index 0d21f04779b..cf938e21b3a 100644 --- a/ui/litellm-dashboard/src/components/mcp_tools/types.tsx +++ b/ui/litellm-dashboard/src/components/mcp_tools/types.tsx @@ -152,6 +152,7 @@ export interface MCPServer { teams?: Team[]; mcp_access_groups?: string[]; allowed_tools?: string[]; + allow_all_keys?: boolean; } export interface MCPServerProps {