mcpField
智
智谱 Web Search MCP 工具(STDIO)

智谱 Web Search MCP 工具(STDIO)

Local
github.com/cr-zhichenSearch9Updated 71w ago

About 智谱 Web Search MCP 工具(STDIO)

A command-line MCP server that searches the web through the BigModel Web Search API and formats JSON results as readable text. It communicates with MCP clients over STDIO.

Key features

  1. 01Calls the BigModel Web Search API
  2. 02Formats JSON search results
  3. 03Provides an MCP server over STDIO
  4. 04Supports domain and time filters

Use cases

  1. 01Search the web from an MCP client
  2. 02Restrict results by domain or recency
  3. 03Adjust result count and summary size

MCP support

Exposes a `web-search` tool to MCP clients, with parameters for the query, search engine, result count, domain, and recency. It communicates over STDIO.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"cc-zhipu-web-search": {
"command": "npx",
"args": [
"-y",
"cc-zhipu-web-search"
],
"env": {
"BIGMODEL_API_KEY": "<BIGMODEL_API_KEY>"
}
}
}
}
Run commandnpx -y cc-zhipu-web-search
Environment variables to set
BIGMODEL_API_KEYSecret

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmcc-zhipu-web-search

Tools

1

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
content_sizeenumNoControls the length of webpage summaries. medium (default): balanced mode, about 400–600 Chinese characters; high: maximize context, about 2500 Chinese characters. Use the default unless the user specifically requests detailed content.medium | high
countintegerNoNumber of results to return, range 1–50, default 10. Supported search engines: search_pro_sogou, search_std, search_pro. For search_pro_sogou, optional values are 10, 20, 30, 40, 50.
querystringYesContent to search for; the query should be no longer than 70 characters
search_domain_filterstringNoRestricts search results to the specified domain (e.g., 'www.example.com'). Supported search engines: search_std, search_pro, search_pro_Jina.
search_engineenumNoSearch engine code to call. Currently supported: search_std (Zhipu Basic), search_pro (Zhipu Advanced), search_pro_sogou (Sogou), search_pro_quark (Quark Search), search_pro_jina (jina.ai Search), search_pro_bing (Bing Search)search_std | search_pro | search_pro_sogou | search_pro_quark | search_pro_jina | search_pro_bing
search_recency_filterenumNoSearch webpages within the specified time range. Defaults to 'noLimit'. Available values: 'oneDay', 'oneWeek', 'oneMonth', 'oneYear', 'noLimit'. Supported search engines: search_std, search_pro, search_pro_Sogou, search_pro_quark.oneDay | oneWeek | oneMonth | oneYear | noLimit

Details

From the project README

智谱 Web Search MCP 工具

npm version

一个通过智谱 AI 开放平台(BigModel)的 Web Search API 提供网页搜索能力的命令行工具,并符合 Model-Code-Protocol (MCP) 规范。

这允许任何支持 MCP 的客户端(例如 AI 智能体)调用此工具来获得网页搜索的能力。

✨ 功能

  • 调用智谱搜索 API:将参数转换并调用智谱 Web Search API。
  • 结果格式化:将返回的 JSON 结果格式化为对人类或模型易读的文本格式。
  • MCP 服务:作为一个 MCP 服务器运行,可以通过标准输入/输出(STDIO)与客户端通信。

📦 安装与使用

⚙️ 配置

在使用前,你需要一个智谱 AI 的 API Key。你可以在 智谱 AI 开放平台 上获取。

与 MCP 客户端集成

对于支持 MCP 的客户端可使用 npx 直接运行,无需全局安装。客户端会根据需要自动拉取并执行包。

  1. 找到你客户端的 mcp.json 配置文件(对于 Cursor,通常是 ~/.cursor/mcp.json)。

  2. 在该文件的 mcpServers 对象中,添加以下条目:

    {
      "mcpServers": {
        "zhipu-web-search": {
          "command": "npx",
          "args": [
            "cc-zhipu-web-search"
          ],
          "env": {
            "BIGMODEL_API_KEY": "YOUR_BIGMODEL_API_KEY"
          }
        }
      }
    }
    

    如果你已经有其他服务器,只需在 mcpServers 中添加 "zhipu-web-search": { ... } 即可。

🛠️ 作为 MCP 工具使用

本工具提供了一个名为 web-search 的工具,可供 MCP 客户端调用。

工具描述: 使用智谱 Web Search API 进行网页检索

参数:

参数名类型描述默认值
querystring搜索关键词,≤70字符必需
search_engineenum要调用的搜索引擎编码。search_std
countnumber返回条数 1~5010
search_domain_filterstring限定搜索结果的域名 (例如 'www.example.com')(可选)
search_recency_filterenum搜索指定时间范围内的网页。noLimit
content_sizeenum控制网页摘要的字数。medium

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.