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
- 01Calls the BigModel Web Search API
- 02Formats JSON search results
- 03Provides an MCP server over STDIO
- 04Supports domain and time filters
Use cases
- 01Search the web from an MCP client
- 02Restrict results by domain or recency
- 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.
Tools
1Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| content_size | enum | No | Controls 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 |
| count | integer | No | Number 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. |
| query | string | Yes | Content to search for; the query should be no longer than 70 characters |
| search_domain_filter | string | No | Restricts search results to the specified domain (e.g., 'www.example.com'). Supported search engines: search_std, search_pro, search_pro_Jina. |
| search_engine | enum | No | Search 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_filter | enum | No | Search 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 工具
一个通过智谱 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 直接运行,无需全局安装。客户端会根据需要自动拉取并执行包。
-
找到你客户端的
mcp.json配置文件(对于 Cursor,通常是~/.cursor/mcp.json)。 -
在该文件的
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 进行网页检索
参数:
| 参数名 | 类型 | 描述 | 默认值 |
|---|---|---|---|
query | string | 搜索关键词,≤70字符 | 必需 |
search_engine | enum | 要调用的搜索引擎编码。 | search_std |
count | number | 返回条数 1~50 | 10 |
search_domain_filter | string | 限定搜索结果的域名 (例如 'www.example.com') | (可选) |
search_recency_filter | enum | 搜索指定时间范围内的网页。 | noLimit |
content_size | enum | 控制网页摘要的字数。 | medium |
Comments
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.