dsh-plugin-zai-mcp:将 z.ai MCP 服务器接入 DeepSeek Harness

前言

DeepSeek Harness (DSH) 的核心能力在于插件化扩展。当开发者需要在 DSH 流程中使用 z.ai 的 GLM Coding Plan 相关能力时,通常需要手动对接 MCP 服务器。dsh-plugin-zai-mcp 插件通过 DSH 内置的 @deepseek-ai/dsh-mcp-client 桥接层,将 z.ai 的四款 MCP 服务器(视觉、网页阅读、网页搜索、zread)封装为原生 DSH 工具。

插件定位

该插件由用户 nekomona 维护,属于“模型推理”类别。它不包含构建步骤,通过声明式配置即可接入 DSH 的插件生态。

核心能力

插件将 z.ai 的 MCP 服务器转化为 DSH 工具,共计 13 个工具。工具调用会消耗 GLM Coding Plan 配额。

  1. zai-vision
    - 传输方式:stdio
    - 工具:

    • analyze_image
    • analyze_video
    • ui_to_artifact
    • extract_text_from_screenshot
    • diagnose_error_screenshot
    • understand_technical_diagram
    • analyze_data_visualization
    • ui_diff_check
  2. zai-web-reader
    - 传输方式:streamable-http
    - 工具:

    • webReader
  3. zai-web-search
    - 传输方式:streamable-http
    - 工具:

    • web_search_prime
  4. zai-zread
    - 传输方式:streamable-http
    - 工具:

    • search_doc
    • get_repo_structure
    • read_file

安装

插件支持从 Git 源安装,DSH 会自动处理 dsh.profile.bundles 配置。

dsh plugin --profile web add "github:nekomona/dsh-plugin-zai-mcp"

配置与 Key 管理

插件默认零配置。如果 DSH 已配置 GLM coding-plan key,插件会自动重用该凭据。

API Key 的解析顺序如下:
1. config.apiKey
2. 环境变量 Z_AI_API_KEY 或 ZAI_CODING_CN_API_KEY
3. DSH 的托管凭据存储

Key 仅用于读取,绝不写入磁盘或日志。若需自定义,可配置 apiKeyEnvNames 或直接设置 config.apiKey。

注意事项

  • 云端依赖:所有工具调用均通过 z.ai / Zhipu 的服务(open.bigmodel.cn)完成,发送给工具的 URL、图片、视频等数据都会经过这些云端服务。
  • 配额限制:工具调用消耗 GLM Coding Plan 配额。
  • zread 限制:zread 仅支持 zread.ai 索引的公开仓库,无法读取私有或未索引的代码库。
  • 视觉限制:zai-vision 处理本地媒体文件时,大小限制为 8MB。
  • 许可证:当前未明确列出许可证(uncertain)。

总结

该插件为 DSH 用户提供了无需手动配置 MCP 客户端即可使用 z.ai 服务的途径。更多技术细节和源码可参考其 GitHub 仓库。

  • 插件目录:https://www.skillhub.cn/plugins/nekomona/dsh-plugin-zai-mcp
  • GitHub:https://github.com/nekomona/dsh-plugin-zai-mcp
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

小夜