MCP servers from --additional-mcp-config are removed during startup reconciliation in 1.0.81-11
还没有人认领这个 Issue。
- 主要语言
- Shell
- 星标
- 11.2k
- 派生
- 1.9k
- 平均合并
- 14 小时 16 分钟
- 30 天内合并 PR
- 6
描述
Describe the bug
Copilot CLI initially discovers and connects an MCP server supplied through --additional-mcp-config. Later during startup, a second MCP reconciliation computes a configuration that no longer contains the additional server, cancels it, and emits session.mcp_server_removed.
This is not only a /mcp show display problem: after reconciliation, the server's tools are unavailable.
Affected version
1.0.81-11
The behavior was not observed on another machine running 1.0.81-3. This is currently version correlation rather than a controlled same-machine bisect.
Steps to reproduce
- Create
mcp.jsonusing a public MCP endpoint:
{
"mcpServers": {
"context7-test": {
"type": "http",
"url": "https://mcp.context7.com/mcp",
"tools": ["*"]
}
}
}
- Launch Copilot with detailed logging:
copilot --log-level all --additional-mcp-config '@.\mcp.json'
- Wait for startup and inspect the server:
/mcp show context7-test
- Check the debug log for MCP reconciliation and removal events.
Actual behavior
The server appears in the initial MCP configuration and begins connecting. A subsequent reconciliation changes the MCP graph from a signature containing the additional server to one that omits it:
MCP host start (trigger=startup, ...)
...
Service initialized as client
...
mcp apply_session_settings
mcp discover_and_start_root
previous_signature=<contains context7-test>
signature=<does not contain context7-test>
mcp discover_and_start_root: incremental reconcile path
...
session.mcp_server_removed
The server connection is cancelled and its tools are not available afterward.
The logs also report that configured MCP registries permit all servers, so the removal does not appear to be an intentional registry-policy block.
Expected behavior
MCP servers supplied through --additional-mcp-config should remain in the effective MCP graph for the lifetime of the session. Plugin activation, extension loading, managed-settings application, and other startup reconciliation should preserve them.
Additional context
OS: Windows
Architecture: ARM64
Shell: PowerShell 7.6.5
Terminal: Windows Terminal
Affected version: 1.0.81-11
Comparison version without observed failure: 1.0.81-3
The public Context7 configuration is a proposed minimal reproduction and has not yet been independently confirmed to trigger the same race.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用提供的 mcp.json 和 copilot --log-level all --additional-mcp-config '@.\mcp.json' 重现问题,然后检查 mcp apply_session_settings 和 mcp discover_and_start_root 附近的启动日志。跟踪会更改签名的增量协调过程,并验证附加服务器在启动后仍保留在有效 MCP 图中,且其工具仍可用。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- powershell
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100