From 5bd63c5a7249fc9f20dc8539187f11d9b1c75f19 Mon Sep 17 00:00:00 2001 From: "Jugal D. Bhatt" <55304795+jugaldb@users.noreply.github.com> Date: Sun, 13 Jul 2025 01:25:36 +0530 Subject: [PATCH] [MCP Gateway] access group fixes on UI for keys and teams (#12556) * add changes to mcp servers in team and keys * added access group in bracket * added access group capitalise --- .../permissions/MCPServerPermissions.tsx | 58 ++++++++----------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/ui/litellm-dashboard/src/components/permissions/MCPServerPermissions.tsx b/ui/litellm-dashboard/src/components/permissions/MCPServerPermissions.tsx index 0aa70cb77c5..9758dfd7427 100644 --- a/ui/litellm-dashboard/src/components/permissions/MCPServerPermissions.tsx +++ b/ui/litellm-dashboard/src/components/permissions/MCPServerPermissions.tsx @@ -67,59 +67,51 @@ export function MCPServerPermissions({ // Function to get display name for access group const getAccessGroupDisplayName = (group: string) => { - // If accessGroupNames is a list of names, just return the group string return group; }; + // Merge servers and access groups into one list + const mergedItems = [ + ...mcpServers.map(server => ({ type: 'server', value: server })), + ...mcpAccessGroups.map(group => ({ type: 'accessGroup', value: group })), + ]; + const totalCount = mergedItems.length; + return (
MCP Servers - {mcpServers.length} + {totalCount}
- {mcpServers.length > 0 ? ( + {totalCount > 0 ? (
- {mcpServers.map((server, index) => ( - + {mergedItems.map((item, index) => ( + item.type === 'server' ? ( + +
+ {getMCPServerDisplayName(item.value)} +
+
+ ) : (
- {getMCPServerDisplayName(server)} + + {getAccessGroupDisplayName(item.value)} (Access Group)
-
+ ) ))}
) : (
- No MCP servers configured -
- )} -
- - MCP Access Groups - - {mcpAccessGroups.length} - -
- {mcpAccessGroups.length > 0 ? ( -
- {mcpAccessGroups.map((group, index) => ( -
- {getAccessGroupDisplayName(group)} -
- ))} -
- ) : ( -
- - No MCP access groups configured + No MCP servers or access groups configured
)}