github / github/copilot-cli

trust/skip TLS verification for MCP HTTP servers

未關閉
#4,801 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

triage
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

Describe the feature or problem you'd like to solve

trust/skip TLS verification for MCP HTTP servers with invalid SAN certs (rustls hard-fails, no insecure option)

Proposed solution

Copilot CLI cannot connect to a remote HTTP MCP server whose TLS certificate has an invalid Subject Alternative Name (e.g., a literal  *  instead of a proper wildcard/IP SAN), even after the cert's issuing CA is explicitly trusted. There is no config option or environment variable to bypass hostname/certificate verification for a specific MCP server, which blocks use cases like connecting to on-prem/IoT devices with embedded mcp server and self-managed certificates addressed by IP Address.

Steps to reproduce

  1. device that presents a self-signed certificate whose Subject/SAN is not a valid match for the IP address (e.g., CN/SAN =  * )
  2. Export and trust the CA:  export NODE_EXTRA_CA_CERTS=~/ctrlx.pem 
  3. Run  copilot , then  /mcp  — the server still fails to connect.

Requested behavior

The CLI offers a supported way to relax verification for a specific MCP server (e.g., a per-server  tls.insecureSkipVerify or honoring a documented env var), similar to how  curl -k  or Node's  NODE_TLS_REJECT_UNAUTHORIZED=0  work for other tools.

Example prompts or workflows

NA

Additional context

• Related: #4364 documents a similar underlying issue (rustls/rustls-platform-verifier being stricter than curl/Node/Chrome for enterprise MCP registry TLS), suggesting this is a broader gap in the Rust-based MCP networking layer, not specific to one code path.
• For comparison, Claude Code and Gemini CLI's MCP clients run on Node.js, so  NODE_TLS_REJECT_UNAUTHORIZED=0  works as an (insecure) escape hatch there; Copilot CLI has no equivalent because of the runtime split.
• Use case: connecting to on-prem/IoT devices reachable only via IP address with vendor-managed self-signed certificates that can't easily be reissued with a proper SAN.

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

閱讀相關 issue #4364,然後追蹤 /mcp 連線至 HTTP 伺服器時所使用的以 Rust 為基礎的 MCP 網路層。使用 SAN 無效的憑證重現該失敗,並確定應在哪裡套用每個伺服器的非安全選項或有文件說明的環境變數;當 CLI 能夠透過受支援的設定連線至該伺服器時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
rust
領域
networking, security
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
活躍
描述清晰度
需要釐清
新手友好度
38/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。