zhipu-mcp
允许通过智谱AI MCP服务器使用搜狗搜索引擎进行网络搜索,支持多种参数如时间过滤、域名过滤等。
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@zhipu-mcpsearch for recent articles about climate change"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
智谱AI MCP 服务器
基于 智谱AI Web Search API 实现的 MCP (Model Context Protocol) 服务器,为大模型提供网络搜索能力。
使用 Streamable HTTP 协议传输
功能特性
🔍 多搜索引擎支持:智谱基础版、高阶版、搜狗、夸克
🎯 意图识别:可选的搜索意图识别,优化搜索结果
⏰ 时间过滤:支持一天/一周/一个月/一年内的时间范围过滤
🌐 域名过滤:支持白名单域名限制
📊 结构化输出:返回标题、URL、摘要、来源等信息
🚀 Streamable HTTP:使用高效的 HTTP 流式传输协议
Related MCP server: Baidu Search MCP Server
安装
使用 uv(推荐)
cd zhipu_mcp
uv sync使用 pip
cd zhipu_mcp
pip install -e .配置
1. 获取 API Key
前往 智谱AI开放平台 获取 API Key。
2. 设置环境变量
export ZHIPU_API_KEY="your-api-key-here"启动服务器
# 使用默认配置启动 (127.0.0.1:8000/mcp)
uv run zhipu-websearch-mcp
# 或指定参数
uv run zhipu-websearch-mcp --host 0.0.0.0 --port 9000 --path /api/mcp命令行参数
参数 | 默认值 | 说明 |
|
| 监听地址 |
|
| 监听端口 |
|
| MCP端点路径 |
配置 MCP 客户端
Claude Desktop 配置
编辑 Claude Desktop 配置文件:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
添加以下配置(使用 Streamable HTTP URL):
{
"mcpServers": {
"zhipu": {
"url": "http://127.0.0.1:8000/mcp"
}
}
}注意:需要先启动 MCP 服务器,再启动 Claude Desktop。
Cursor 配置
在 Cursor 的 MCP 设置中添加:
{
"zhipu": {
"url": "http://127.0.0.1:8000/mcp"
}
}工具说明
web_search - 网络搜索
使用智谱AI网络搜索引擎搜索互联网内容。
参数
参数 | 类型 | 必需 | 默认值 | 说明 |
| string | ✅ | - | 搜索查询内容,建议不超过70个字符 |
| string | ❌ |
| 搜索引擎类型 |
| boolean | ❌ |
| 是否进行搜索意图识别 |
| integer | ❌ |
| 返回结果条数,范围1-50 |
| string | ❌ | - | 白名单域名过滤 |
| string | ❌ |
| 时间范围过滤 |
| string | ❌ |
| 内容详细程度 |
搜索引擎类型
值 | 说明 |
| 智谱基础版搜索引擎 |
| 智谱高阶版搜索引擎 |
| 搜狗搜索 |
| 夸克搜索 |
时间范围过滤
值 | 说明 |
| 一天内 |
| 一周内 |
| 一个月内 |
| 一年内 |
| 不限(默认) |
内容详细程度
值 | 说明 |
| 返回摘要信息,满足常规问答需求 |
| 最大化上下文,信息量大,适合需要细节的场景 |
使用示例
在 Claude 或 Cursor 中,你可以这样使用:
请搜索最近一周关于"人工智能"的新闻MCP 将自动调用 web_search 工具,返回结构化的搜索结果。
Docker 部署
使用 Docker Compose(本地测试)
# 设置环境变量
export ZHIPU_API_KEY="your-api-key-here"
# 构建并启动
docker-compose up -d
# 查看日志
docker-compose logs -f使用 Dokploy 部署
在 Dokploy 中创建新项目
选择 Git Repository 或 Docker 部署方式
配置构建设置:
如果使用 Git Repository,Dokploy 会自动检测 Dockerfile
端口设置为
8000
在 Environment Variables 中添加:
ZHIPU_API_KEY: 你的智谱 AI API 密钥
部署后,MCP 端点地址为:
http://your-domain:8000/mcp
Dokploy 环境变量配置
变量名 | 必需 | 说明 |
| ✅ | 智谱AI API密钥 |
手动 Docker 部署
# 构建镜像
docker build -t zhipu-mcp .
# 运行容器
docker run -d \
--name zhipu-mcp \
-p 8000:8000 \
-e ZHIPU_API_KEY="your-api-key-here" \
zhipu-mcp开发
运行测试
uv run python -c "from zhipu_mcp.server import mcp; print('Import successful')"调试模式
可以使用 MCP Inspector 进行调试:
npx @anthropic-ai/mcp-inspector然后在 Inspector 中连接到 http://127.0.0.1:8000/mcp。
许可证
MIT License
相关链接
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/xiispace/zhipu-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server