github / github/copilot-cli

MCP servers from --additional-mcp-config are removed during startup reconciliation in 1.0.81-11

Đang mở
#4,636 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

triage
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

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

  1. Create mcp.json using a public MCP endpoint:
{
  "mcpServers": {
    "context7-test": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp",
      "tools": ["*"]
    }
  }
}
  1. Launch Copilot with detailed logging:
copilot --log-level all --additional-mcp-config '@.\mcp.json'
  1. Wait for startup and inspect the server:
/mcp show context7-test
  1. 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Tái hiện với mcp.json được cung cấp và copilot --log-level all --additional-mcp-config '@.\mcp.json', sau đó kiểm tra các log khởi động xung quanh mcp apply_session_settingsmcp discover_and_start_root. Theo dõi quá trình đối soát gia tăng làm thay đổi chữ ký và xác minh rằng máy chủ bổ sung vẫn nằm trong đồ thị MCP hiệu lực và các công cụ của máy chủ vẫn khả dụng sau khi khởi động.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
powershell
Lĩnh vực
cli
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.