跳到正文
dsh-market 浏览插件 GitHub EN

Tazio7/dsh-web-search-glm

基于智谱 GLM MCP 的网络搜索插件:通过 Open BigModel API 搜索和抓取网页内容,API Key 自动从 ~/.dsh/.credentials.yaml 或环境变量注入,配置文件中无需存放密钥。

Star 数 ★ 0 分类 工具与能力 收录于 2026-09-03

安装

在 DeepSeek Harness 里通过 dsh-market 安装

dsh plugin --profile web add dshmarket

或使用命令行

dsh plugin --profile web add github:Tazio7/dsh-web-search-glm

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络。请先审阅源码,并尽量锁定 commit(github:owner/repo#sha)。

README

该插件的 README 只有英文版本。

ZAI GLM web search and fetch MCP plugin for DeepSeek Harness.

This plugin integrates ZAI's (智谱AI) web search and fetch capabilities into DSH through MCP (Model Context Protocol) servers.

Features

  • Web Search: Search the web using ZAI's web search prime service
  • Web Fetch: Fetch and read web content using ZAI's web reader service
  • Vision MCP: Access ZAI's vision capabilities through MCP
  • Tool Registration: Automatically registers tools with DSH harness for model use
  • Service Integration: Provides a service for programmatic access

Installation

  1. Add the plugin to your DSH profile:

    dsh plugin --profile <profile-name> add dsh-zai-web-search
    
  2. The plugin will automatically use your DSH ZAI API key from ~/.dsh/.credentials.yaml. No additional setup is required if you have configured ZAI in DSH.

Configuration

The plugin is configured through cordis.patch.yml in your profile directory. Key configuration options:

  • apiKey: Your ZAI API key (can be set via environment variable ZAI_API_KEY)
  • servers: MCP server configurations
    • web-search-prime: Web search service
    • web-reader: Web content fetching service
    • zai-vision: Vision capabilities service
  • registerTools: Whether to register tools with DSH harness (default: true)
  • enabled: Enable/disable the plugin (default: true)

Usage

As a Tool

Once installed and configured, the following tools will be available to the model:

  • web-search-prime/search: Search the web
  • web-reader/fetch: Fetch web content
  • zai-vision/*: Vision-related tools

As a Service

You can also use the service programmatically in your DSH plugins:

import { Context } from '@deepseek-ai/cordis'

export default {
  apply(ctx: Context) {
    // Access the ZAI Web Search service
    const zaiWebSearch = ctx.get('zai-web-search')
    
    if (zaiWebSearch) {
      // Search the web
      zaiWebSearch.searchWeb('your search query').then(results => {
        console.log(results)
      })
      
      // Fetch web content
      zaiWebSearch.fetchWeb('https://example.com').then(content => {
        console.log(content)
      })
    }
  }
}

Environment Variables

  • ZAI_CODING_CN_API_KEY: Your ZAI API key for authentication (optional if configured in DSH)
  • ZAI_API_KEY: Alternative environment variable for ZAI API key
  • ZAI_MODE: Set to "ZHIPU" for Chinese market (default)

MCP Servers

The plugin uses the following MCP servers:

  1. web-search-prime: Web search service from ZAI

    • URL: https://open.bigmodel.cn/api/mcp/web_search_prime/mcp
    • Transport: HTTP Streamable
  2. web-reader: Web content fetching service

    • URL: https://open.bigmodel.cn/api/mcp/web_reader/mcp
    • Transport: HTTP Streamable
  3. zai-vision: Vision capabilities

    • Command: npx -y @z_ai/mcp-server@latest
    • Transport: stdio

Development

To build the plugin:

npm run build

To run tests:

npm test

License

MIT

内容来自项目 README(GitHub)↗

评论

评论存放在 GitHub Discussions。用 GitHub 账号登录后可发表评论或点表情。