Skip to content

Update: harden MCP marketplace installs#23

Merged
chzh12 merged 2 commits into
mainfrom
Fixed-a-bug-in-MCP-downloading
May 6, 2026
Merged

Update: harden MCP marketplace installs#23
chzh12 merged 2 commits into
mainfrom
Fixed-a-bug-in-MCP-downloading

Conversation

@SI-RUI-ZHANG
Copy link
Copy Markdown
Contributor

原问题
MCP、CLIs、Skills marketplace 请求都依赖 Python 后端发起 HTTPS 请求;在源码运行环境的 CA 配置不完整时,证书校验会失败并被统一包装成 Marketplace is temporarily unavailable。MCP 安装还会调用 Smithery CLI;新版 CLI 首次运行会询问匿名遥测授权,Skill Manager 的非交互 subprocess 无法可靠回答这个隐藏 prompt,可能导致安装失败或卡住。

本次修复

  • marketplace HTTPS 默认使用 certifi CA bundle,同时继续优先尊重用户显式设置的 SSL_CERT_FILE。
  • Smithery MCP 安装改为临时 SMITHERY_CONFIG_PATH,并预写拒绝遥测的 settings.json,避免隐藏交互 prompt,同时不修改用户全局 Smithery 配置。
  • 将 Smithery CLI 固定为已验证的 @smithery/cli@4.11.1,避免依赖 settings.json 这个非公开 CLI 内部契约时继续跟随 @latest 产生不可控变化。
  • 补充单元测试覆盖固定 CLI 包版本、空 stdin、NO_COLOR、临时配置、拒绝遥测设置、unsupported harness 早失败,以及非 0 退出时的错误摘要行为。

改动文件
skill_manager/application/marketplace_http.py
skill_manager/application/mcp/installers.py
tests/unit/test_marketplace_client.py
tests/unit/test_mcp_installers.py

Reviewer: @SI-RUI-ZHANG

@SI-RUI-ZHANG SI-RUI-ZHANG requested a review from chzh12 May 6, 2026 03:58
@chzh12 chzh12 merged commit 1d35ffd into main May 6, 2026
7 checks passed
@SI-RUI-ZHANG SI-RUI-ZHANG deleted the Fixed-a-bug-in-MCP-downloading branch May 6, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants