[Feature Request] Register the MCP server via VS Code's native API and add zh-CN localization
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript, vscode
Hướng nghiên cứu
Start by reading package.json, src/debugMCPServer.ts, src/utils/agentCatalog.ts, and src/utils/agentConfigurationManager.ts, then check the VS Code MCP extension guide and existing localization setup. Implementing native registration, preserving non-VS-Code agent configuration, adding fallback behavior, and localizing manifest and runtime strings span several areas. Done means the acceptance criteria pass for both zh-CN and English, including port and host changes.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Feature Request: register the MCP server through VS Code's native API, and add zh-CN localization
中文摘要:希望扩展不要再去直接改写各 Agent 的 MCP 配置文件,而是使用 VS Code 原生的 MCP 服务器注册 API(
vscode.lm.registerMcpServerDefinitionProvider/contributes.mcpServerDefinitionProviders)来自注册自己;同时希望扩展的界面文案、命令标题、设置项描述等提供中文(zh-CN)本地化支持。
Background
Today DebugMCP does not use VS Code's native MCP server registration mechanism. Instead it:
- Runs its own Streamable HTTP MCP server on
http://localhost:<port>/mcp(src/debugMCPServer.ts). - Registers itself with agents by reading and rewriting the agents' config files on disk (
src/utils/agentCatalog.ts,src/utils/agentConfigurationManager.ts), e.g.%APPDATA%\Code\User\mcp.jsonfor GitHub Copilot,~/.copilot/mcp-config.jsonfor Copilot CLI,~/.codex/config.tomlfor Codex, and the variousmcp_settings.jsonfiles for Cline / Roo Code / Cursor / Claude Code / Antigravity.
The file-writing approach works, but it has real downsides:
- It mutates files the extension does not own. Users who keep their MCP configuration under version control or sync it across machines get unexpected diffs.
- Entries are never cleaned up. Uninstalling the extension leaves a stale
debugmcpentry behind in every config file the user selected, and there is no uninstall-time cleanup. - It races with the host editor. VS Code (and the agent itself) may rewrite the same file, so the entry can be lost or clobbered; the user may have to restart or reload the window for Copilot to pick it up.
- It cannot be expressed in the UI. The server does not appear as an extension-provided MCP server in the MCP views, and there is no way to let the user disable/re-enable it from the standard MCP surfaces.
- Port changes are not tracked. Changing
debugmcp.serverPortleaves the previously written URL behind in the config files until the next migration runs. - It does not work in restricted environments. Writing to other tools' config directories can fail (read-only home, sandboxed remote, enterprise policy) and there is no VS Code-native fallback.
Request 1 — Register the MCP server through VS Code's native API
VS Code already provides a first-class way for an extension to expose an MCP server, documented in the official MCP extension guide:
- Contribute
contributes.mcpServerDefinitionProvidersinpackage.json. - Implement the provider with
vscode.lm.registerMcpServerDefinitionProvider(providerId, { onDidChangeMcpServerDefinitions, provideMcpServerDefinitions, resolveMcpServerDefinition }). - Return a
vscode.McpHttpServerDefinitionpointing athttp://localhost:<port>/mcp.
Proposal:
- Add a
debugmcpdefinition provider that registers the server as a VS Code-managed MCP server, so Copilot (and any other VS Code-native agent) discovers it without any config file being touched. - Use
resolveMcpServerDefinitionto lazily start the local server (and to surface port/host changes), so the extension no longer has to eagerly bind a port just to be registered. - Emit
onDidChangeMcpServerDefinitionswhendebugmcp.serverPort/debugmcp.bindHostchange, so the definition stays in sync instead of leaving a stale URL in a config file. - Keep the existing file-based registration for the non-VS-Code agents (Cline, Cursor, Codex, Copilot CLI, Claude Code, …), since those have no equivalent host API. Ideally this becomes an explicit, opt-in choice in the agent selection popup rather than an automatic side effect.
- If the native API is unavailable on the user's VS Code version, fall back to the current file-based path instead of failing.
Related: #118 (MCP not connected to GitHub Copilot agent runtime) — a native registration would also make the server visible to VS Code's own MCP status/error reporting.
Request 2 — Chinese (zh-CN) localization
The extension UI is currently English-only. Please add localization for the end-user-facing surface:
- Manifest strings (
package.json+package.nls.json+package.nls.zh-cn.json):displayName,description, command titles (e.g. "Show Agent Selection Popup"), configuration property titles/descriptions (debugmcp.serverPort,debugmcp.timeoutInSeconds,debugmcp.bindHost,debugmcp.captureDebugOutput), and the category. - Runtime strings (via a
l10nbundle andvscode.l10n.t()): the agent selection dialog ("DebugMCP Setup - Choose AI Agent to Configure", "Configure …", "Add DebugMCP server to this agent"), all notification and error messages (e.g. "DebugMCP server running on …", "DebugMCP successfully configured for …", the invalid-JSON error), and the output-channel messages. - Ideally also localize the
debug-liveskill content, or at least ship a zh-CN variant of it.
Acceptance criteria
- Installing the extension and activating it registers the MCP server in VS Code through the native MCP server definition API, with no file outside the extension being modified for the VS Code / Copilot case.
- The registered definition reflects the current
debugmcp.serverPort/debugmcp.bindHost, and updates when those settings change. - The server shows up in VS Code's MCP server list / status UI as provided by the extension.
- Uninstalling the extension leaves no stale
debugmcpentries behind for VS Code / Copilot. - The agent selection UI, commands, settings descriptions and notifications render in Chinese when the VS Code display language is
zh-cn, and remain English otherwise. - Non-VS-Code agents (Cline, Cursor, Codex, Copilot CLI, Claude Code) keep working through the existing configuration-file mechanism.
Notes
- The extension currently targets
vscode: ^1.104.0, which already includesvscode.lm.registerMcpServerDefinitionProvider.
- Ngôn ngữ chính
- TypeScript
- Star
- 580
- Fork
- 63
- Merge trung bình
- 1 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/DebugMCP
-
Skill: support MSVC debuggerĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/DebugMCP
Issue tương tự
-
Report: &TV InternationalĐang mởcheck:passed streams:remove
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug priority-p1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
beginner blocked
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
hiero-ledger/hiero-sdk-js#4670 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Exploratory] Expense - 2 selected drop-down is shown twice when selecting hold from more option.Đang mởMonthly Not a priority
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Expensify/App#106080 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày