From 274c5e963d049ffe0f9ddb726017dced6940d7d8 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Fri, 3 Oct 2025 18:22:11 -0700 Subject: [PATCH] feat(ui/): allow user to forward additional headers to the MCP server from the UI --- litellm/proxy/schema.prisma | 1 - .../mcp_tools/MCPPermissionManagement.tsx | 44 +------------------ .../mcp_tools/mcp_tool_configuration.tsx | 31 +++++++++++-- 3 files changed, 28 insertions(+), 48 deletions(-) diff --git a/litellm/proxy/schema.prisma b/litellm/proxy/schema.prisma index b37bd13f7b2..ff5d7d6b9f0 100644 --- a/litellm/proxy/schema.prisma +++ b/litellm/proxy/schema.prisma @@ -179,7 +179,6 @@ model LiteLLM_MCPServerTable { mcp_info Json? @default("{}") mcp_access_groups String[] allowed_tools String[] @default([]) - disallowed_tools String[] @default([]) extra_headers String[] @default([]) // Health check status status String? @default("unknown") diff --git a/ui/litellm-dashboard/src/components/mcp_tools/MCPPermissionManagement.tsx b/ui/litellm-dashboard/src/components/mcp_tools/MCPPermissionManagement.tsx index b66f0950069..6742e0bd298 100644 --- a/ui/litellm-dashboard/src/components/mcp_tools/MCPPermissionManagement.tsx +++ b/ui/litellm-dashboard/src/components/mcp_tools/MCPPermissionManagement.tsx @@ -72,7 +72,7 @@ const MCPPermissionManagement: React.FC = ({ label={ Extra Headers - + @@ -88,48 +88,6 @@ const MCPPermissionManagement: React.FC = ({ allowClear /> - - - Allowed Tools - - - - - } - name="allowed_tools" - > - - diff --git a/ui/litellm-dashboard/src/components/mcp_tools/mcp_tool_configuration.tsx b/ui/litellm-dashboard/src/components/mcp_tools/mcp_tool_configuration.tsx index fbf8b04048b..7442cd467b9 100644 --- a/ui/litellm-dashboard/src/components/mcp_tools/mcp_tool_configuration.tsx +++ b/ui/litellm-dashboard/src/components/mcp_tools/mcp_tool_configuration.tsx @@ -78,6 +78,14 @@ const MCPToolConfiguration: React.FC = ({ )} + + {/* Description */} +
+ + Select which tools users can call: Only checked tools will be available for users to invoke. + Unchecked tools will be blocked from execution. + +
{/* Loading state */} {isLoadingTools && ( @@ -124,7 +132,7 @@ const MCPToolConfiguration: React.FC = ({
- {allowedTools.length} of {tools.length} {tools.length === 1 ? "tool" : "tools"} selected + {allowedTools.length} of {tools.length} {tools.length === 1 ? "tool" : "tools"} enabled for user access
@@ -133,14 +141,14 @@ const MCPToolConfiguration: React.FC = ({ onClick={handleSelectAll} className="px-3 py-1.5 text-sm text-blue-600 hover:text-blue-700 hover:bg-blue-50 rounded-md transition-colors" > - Select All + Enable All
@@ -160,8 +168,23 @@ const MCPToolConfiguration: React.FC = ({
handleToolToggle(tool.name)} />
- {tool.name} +
+ {tool.name} + + {allowedTools.includes(tool.name) ? "Enabled" : "Disabled"} + +
{tool.description && {tool.description}} + + {allowedTools.includes(tool.name) + ? "✓ Users can call this tool" + : "✗ Users cannot call this tool" + } +