diff options
Diffstat (limited to 'packages/cli/src/ui/commands/mcpCommand.ts')
| -rw-r--r-- | packages/cli/src/ui/commands/mcpCommand.ts | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/packages/cli/src/ui/commands/mcpCommand.ts b/packages/cli/src/ui/commands/mcpCommand.ts index 5ff77c4b..891227b0 100644 --- a/packages/cli/src/ui/commands/mcpCommand.ts +++ b/packages/cli/src/ui/commands/mcpCommand.ts @@ -49,8 +49,9 @@ const getMcpStatus = async ( const mcpServers = config.getMcpServers() || {}; const serverNames = Object.keys(mcpServers); + const blockedMcpServers = config.getBlockedMcpServers() || []; - if (serverNames.length === 0) { + if (serverNames.length === 0 && blockedMcpServers.length === 0) { const docsUrl = 'https://goo.gle/gemini-cli-docs-mcp'; if (process.env.SANDBOX && process.env.SANDBOX !== 'sandbox-exec') { return { @@ -118,9 +119,13 @@ const getMcpStatus = async ( // Get server description if available const server = mcpServers[serverName]; + let serverDisplayName = serverName; + if (server.extensionName) { + serverDisplayName += ` (from ${server.extensionName})`; + } // Format server header with bold formatting and status - message += `${statusIndicator} \u001b[1m${serverName}\u001b[0m - ${statusText}`; + message += `${statusIndicator} \u001b[1m${serverDisplayName}\u001b[0m - ${statusText}`; // Add tool count with conditional messaging if (status === MCPServerStatus.CONNECTED) { @@ -192,6 +197,14 @@ const getMcpStatus = async ( message += '\n'; } + for (const server of blockedMcpServers) { + let serverDisplayName = server.name; + if (server.extensionName) { + serverDisplayName += ` (from ${server.extensionName})`; + } + message += `🔴 \u001b[1m${serverDisplayName}\u001b[0m - Blocked\n\n`; + } + // Add helpful tips when no arguments are provided if (showTips) { message += '\n'; |
