github / github/copilot-cli

Support a single unified mcp.json for both VS Code and Copilot CLI for maintainability purpose

未关闭
#4,429 0 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

triage
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

Description

Currently, VS Code and GitHub Copilot CLI use two different MCP configuration schemas:

  • VS Code (.vscode/mcp.json or user-level mcp.json): uses a top-level servers key, and type is optional.
  • Copilot CLI (~/.copilot/mcp-config.json, .mcp.json, .github/mcp.json): uses a top-level mcpServers key, and type is required for each server entry.

This forces users who work with both VS Code and Copilot CLI to maintain two near-duplicate JSON files and manually keep them in sync whenever a server is added, removed, or updated — which is error-prone and adds unnecessary maintenance overhead.

Feature Request

Please support a single, unified mcp.json file/schema that can be used by both VS Code and Copilot CLI without conversion. For example:

  • Accept the servers key as an alias for mcpServers (or vice versa), and
  • Make the type field optional/inferable (e.g. default to stdio/local when command is present, or http when url is present) so existing VS Code configs work as-is.

This would let a single mcp.json (whether at the user/global level or per-repository) be shared across both tools, eliminating duplicate configuration and reducing drift between environments.

Related issues
  • #3835 (Incompatible mcp.json schema with VSCode)
  • #146 (Respect VS Code User Settings for Copilot CLI Configuration)

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

比较 .vscode/mcp.json、用户级 mcp.json、~/.copilot/mcp-config.json、.mcp.json 和 .github/mcp.json 中的 schema 和位置。首先跟踪每个配置的发现和验证方式;完成的标准是,同一个 mcp.json 无需手动转换即可在 VS Code 和 Copilot CLI 中都正常工作,包括所请求的键别名和类型处理。

由索引模型根据 Issue 内容生成。

评估

技术栈
vscode
领域
cli, tooling
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
冷清
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。