From 95fd6fca7ce10ee226ca68e4d6dad291c1a9b22f Mon Sep 17 00:00:00 2001 From: lewis617 Date: Tue, 19 May 2026 18:12:37 +0800 Subject: [PATCH] feat: hide MCP server URL/command to prevent token exposure Remove URL and command display from MCP server tab UI to prevent leaking sensitive tokens in query parameters (e.g. ?tavilyApiKey=...) --- docs/spec.md | 2 +- webview/src/components/ConfigurationDialog.tsx | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/docs/spec.md b/docs/spec.md index be0bc3b..f5dc111 100644 --- a/docs/spec.md +++ b/docs/spec.md @@ -392,7 +392,7 @@ _Skill 系统_ **主要特性:** -- **服务器列表**:展示所有通过 `.mcp.json` 配置的 MCP 服务器,包括名称、连接状态(○ 未连接 / ● 已连接 / ⟳ 连接中 / ✗ 错误)、工具数量和连接命令/URL。 +- **服务器列表**:展示所有通过 `.mcp.json` 配置的 MCP 服务器,包括名称、连接状态(○ 未连接 / ● 已连接 / ⟳ 连接中 / ✗ 错误)和工具数量。 - **连接/断开控制**:支持一键连接或断开 MCP 服务器,连接状态实时刷新。 - **错误信息展示**:连接失败的服务器会显示具体错误原因。 - **空状态引导**:未配置任何服务器时,提示用户创建 `.mcp.json` 文件。 diff --git a/webview/src/components/ConfigurationDialog.tsx b/webview/src/components/ConfigurationDialog.tsx index f6b8691..6cae5bb 100644 --- a/webview/src/components/ConfigurationDialog.tsx +++ b/webview/src/components/ConfigurationDialog.tsx @@ -426,12 +426,6 @@ const ConfigurationDialog: React.FC {server.toolCount} tools )} - {server.config.command && ( -
{server.config.command}{server.config.args ? ` ${server.config.args.join(' ')}` : ''}
- )} - {server.config.url && ( -
{server.config.url}
- )} {server.error && (
{server.error}
)}