trust/skip TLS verification for MCP HTTP servers
还没有人认领这个 Issue。
- 主要语言
- 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
- device that presents a self-signed certificate whose Subject/SAN is not a valid match for the IP address (e.g., CN/SAN = * )
- Export and trust the CA: export NODE_EXTRA_CA_CERTS=~/ctrlx.pem
- 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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
阅读相关 issue #4364,然后跟踪 /mcp 连接到 HTTP 服务器时所使用的基于 Rust 的 MCP 网络层。使用 SAN 无效的证书复现该故障,并确定应在哪里应用每个服务器的非安全选项或有文档说明的环境变量;当 CLI 能够通过受支持的配置连接到该服务器时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rust
- 领域
- networking, security
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 活跃
- 描述清晰度
- 需要澄清
- 新手友好度
- 38/100