ZAI MCP Server

MCP搜索检索

提供方 groxaxo

搜索检索 stdio · 本地进程 API Key 社区 / 第三方 Claude DesktopClaudeCursorCline
查看接入方式

ZAI MCP Server 是一个提供网络搜索、内容抓取和基于AI摘要生成功能的服务,利用GLM-4.7-Flash模型快速处理信息。

一句话选型结论

按资料字段整理

ZAI MCP Server 属于搜索检索类 MCP 服务器,stdio · 本地进程,API Key,可直接接入 Claude Desktop、Claude、Cursor 等,有可直接复制的远程端点配置。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类搜索检索 传输方式stdio · 本地进程 鉴权API Key 部署方式支持远程部署
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 3 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

搜索检索
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量3暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

网络搜索Python本地部署内容抓取AI摘要生成DuckDuckGoGLM-4.7-Flash

安装与配置

stdio · 本地进程 API Key
客户端在本机拉起子进程,数据不出本机
pip install -r requirements.txt

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    确认你的客户端支持远程端点,并拿到服务地址。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后客户端会列出约 3 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
联网搜索取证

让模型查最新资料并给出出处。

资料聚合

把一个主题的网页、文档集中抓回来整理。

情报与竞品检索

按关键词持续检索行业动态和竞品信息。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注 3 个工具,职责相对集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 使用前要准备好API Key对应的凭据,并按最小权限配置。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在搜索检索场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
ZAI MCP Server当前 3 stdio · 本地进程 支持远程部署 有 2026-05-17
Brave Search 433812ff 2 未标注 未标注 无 2026-05-17
Sequentialthinking 1 SSE · 服务端推送 远程部署 有 2026-05-18
Baidu Netdisk 未标注 未标注 未标注 无 2026-05-17
ragflow 未标注 stdio · 本地进程 本地部署 有 2026-04-11
mindsdb (430e18) 未标注 未标注 未标注 有 2026-05-17

服务器档案

搜索检索
字段来自项目仓库与公开索引,中文说明由本站标注
提供方groxaxo上游标注的维护方 groxaxo
分类搜索检索本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式API Key远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型支持远程部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

9.7 KB
来自项目仓库与上游目录的原文,未做删改

ZAI MCP服务器

一种模型上下文协议(MCP)服务器,使用ZAI的GLM-4.7-Flash模型提供网络搜索、内容获取和人工智能支持的摘要功能。

特性

  • 网络搜索:使用DuckDuckGo搜索网络
  • 内容获取:从任何网站上清理和提取文本
  • AI总结:使用GLM-4.7-Flash总结网络内容
  • 组合工作流:在一个操作中搜索、获取和汇总
  • 快速高效:使用flash模型快速响应

工具

search_web

在网上搜索信息。

参数:

  • query (字符串,必填):搜索查询
  • num_results (数字,可选):结果数量(1-10,默认值:5)

退货:```json
{
"query": "search term",
"count": 5,
"results": [
{
"title": "Result Title",
"url": "https://example.com",
"snippet": "Brief snippet of the content..."
}
]
}


### `fetch_and_summarize`

获取网站URL并总结其内容。

**参数:**

- `url` (字符串,必填):要获取的网站URL
- `max_content_length` (数字,可选):要处理的最大内容长度(默认值:10000)

**退货:**```json
{
"url": "https://example.com/article",
"title": "Article Title",
"summary": "AI-generated summary of the content...",
"content_length": 5000
}

search_and_summarize

搜索网络,获取顶部结果,并对其进行总结。

参数:

  • query (字符串,必填):搜索查询
  • result_index (数字,可选):获取哪个搜索结果(1-10,默认值:1)

退货:```json
{
"query": "search term",
"result_index": 1,
"url": "https://example.com/article",
"title": "Article Title",
"summary": "AI-generated summary...",
"total_results": 10
}


## 安装

### 先决条件

- Python 3.8或更高版本
- ZAI API密钥(在https://z.ai/model-api)
- pip包管理器

### 从源代码安装```bash
# Clone the repository
git clone https://github.com/yourusername/zai-mcp-server.git
cd zai-mcp-server

# Install dependencies
pip install -r requirements.txt

# Make server executable
chmod +x src/server.py

快速开始```bash

Set your API key

export ZAI_API_KEY="your-zai-api-key"

Run the server

python src/server.py


## 配置

### 环境变量

|变量|描述|必填|默认|
|-----------|-------------|-----------|---------|
| `ZAI_API_KEY` |您的ZAI API密钥|是|-|

### API配置

服务器使用以下ZAI API配置:

- **基础URL**: `https://api.z.ai/api/paas/v4`
- **模型**: `glm-4.7-flash`
- **最大令牌数**: 1000
- **温度**: 0.7

## 用法

### 独立测试```bash
# Test initialization
echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {}}' | python src/server.py

# List available tools
echo '{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}' | python src/server.py

# Search the web
echo '{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "search_web", "arguments": {"query": "AI news", "num_results": 3}}}' | python src/server.py

与Claude Desktop集成

添加到Claude Desktop配置文件:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
视窗: %APPDATA%\Claude\claude_desktop_config.json
Linux: `~/.config/Claude/claude_desktop_config.json````json
{
"mcpServers": {
"zai": {
"command": "python3",
"args": ["/absolute/path/to/zai-mcp-server/src/server.py"],
"env": {
"ZAI_API_KEY": "your-zai-api-key"
}
}
}
}


### 与Cursor集成

添加到光标设置文件(`~/.cursor/mcp_config.json`):```json
{
"mcpServers": {
"zai": {
"command": "python3",
"args": ["/absolute/path/to/zai-mcp-server/src/server.py"],
"env": {
"ZAI_API_KEY": "your-zai-api-key"
}
}
}
}

与Cline集成(VS代码)

在VS Code中添加到MCP设置中:```json
{
"mcpServers": [
{
"name": "zai",
"command": "python3",
"args": ["/absolute/path/to/zai-mcp-server/src/server.py"],
"env": {
"ZAI_API_KEY": "${env:ZAI_API_KEY}"
}
}
]
}


### 与Continue集成

添加 `~/.continue/config.json`:```json
{
"mcpServers": {
"zai": {
"command": "python3",
"args": ["/absolute/path/to/zai-mcp-server/src/server.py"],
"env": {
"ZAI_API_KEY": "your-zai-api-key"
}
}
}
}

与Roo Code集成

添加到Roo Code的MCP配置中:```json
{
"mcpServers": {
"zai": {
"command": "python3",
"args": ["/absolute/path/to/zai-mcp-server/src/server.py"],
"env": {
"ZAI_API_KEY": "your-zai-api-key"
}
}
}
}


## OpenCode原生集成

### 设置

OpenCode原生支持MCP服务器。要配置:

1. **创建/更新MCP配置文件**:```bash
# Default location: ~/.config/opencode/mcp_servers.json
mkdir -p ~/.config/opencode
nano ~/.config/opencode/mcp_servers.json
  1. 添加ZAI MCP服务器配置:```json
    {
    "mcpServers": {
    "zai": {
    "name": "ZAI Web Search & Summarization",
    "description": "Search web and summarize content using GLM-4.7-Flash",
    "command": "python3",
    "args": ["/home/op/zai-mcp-server/src/server.py"],
    "env": {
    "ZAI_API_KEY": "your-zai-api-key"
    },
    "enabled": true
    }
    }
    }

1. **重新启动OpenCode** 加载新的MCP服务器

### OpenCode中的用法

配置后,您可以在OpenCode对话中使用MCP服务器:```
User: Search for recent developments in AI and summarize the top result

Assistant: I'll use the ZAI MCP server to search and summarize for you.

[Calls search_and_summarize tool]

The ZAI MCP server found an article about recent AI developments. Here's a summary:
- Main point 1
- Main point 2
- Main point 3

Full article available at: https://example.com/ai-developments

示例

示例1:网络搜索```python

Request

{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search_web",
"arguments": {
"query": "machine learning trends 2024",
"num_results": 5
}
}
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": JSON.stringify({
"query": "machine learning trends 2024",
"count": 5,
"results": [...]
})
}
]
}
}


### 示例2:提取和汇总```python
# Request
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "fetch_and_summarize",
"arguments": {
"url": "https://www.example.com/article"
}
}
}

# Response
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [
{
"type": "text",
"text": JSON.stringify({
"url": "https://www.example.com/article",
"title": "Article Title",
"summary": "Key points:\n• Point 1\n• Point 2\n• Point 3",
"content_length": 5000
})
}
]
}
}

示例3:搜索和总结(组合)```python

Request

{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "search_and_summarize",
"arguments": {
"query": "quantum computing breakthrough",
"result_index": 1
}
}
}

Response

{
"jsonrpc": "2.0",
"id": 3,
"result": {
"content": [
{
"type": "text",
"text": JSON.stringify({
"query": "quantum computing breakthrough",
"result_index": 1,
"url": "https://example.com/quantum-news",
"title": "Major Quantum Computing Breakthrough",
"summary": "Researchers have achieved a significant milestone...",
"total_results": 10
})
}
]
}
}


## 测试

运行测试套件以验证服务器是否正常工作:```bash
python examples/test_server.py

预期产量:```

ZAI MCP Server Test Suite

Testing initialization...
✓ Initialize: mcp-zai-server v1.0.0

Testing tools list...
✓ Available tools (3):
- search_web: Search the web for information using DuckDuckGo
- fetch_and_summarize: Fetch a website URL and summarize its content using GLM-4.7-Flash
- search_and_summarize: Search the web, fetch top result, and summarize using GLM-4.7-Flash

Testing resources list...
✓ Available resources (1):
- zai://status: Current status of ZAI MCP server

Testing resource read...
✓ Server status:
Status: online
Model: glm-4.7-flash
API Endpoint: https://api.z.ai/api/paas/v4
Tools: search_web, fetch_and_summarize, search_and_summarize

============================================================
✓ All tests passed!
============================================================


## 发展

### 项目结构```
zai-mcp-server/
├── src/
│   └── server.py          # Main MCP server implementation
├── docs/
│   ├── ARCHITECTURE.md     # Architecture documentation
│   └── API_REFERENCE.md    # Detailed API reference
├── examples/
│   └── test_server.py      # Test suite and examples
├── requirements.txt           # Python dependencies
├── README.md                # This file
└── .env.example             # Environment variables template

依赖项

  • aiohttp -异步HTTP客户端
  • beautifulsoup4 -HTML解析
  • openai -适用于ZAI API的OpenAI兼容客户端

故障排除

常见问题

服务器无法启动

  • 确保已安装Python 3.8+: python --version
  • 检查是否安装了依赖项: pip install -r requirements.txt
  • 验证是否设置了API密钥: echo $ZAI_API_KEY

搜索未返回任何结果

  • DuckDuckGo API可能有费率限制
  • 尝试使用其他查询
  • 检查互联网连接

摘要失败

  • 验证API密钥在https://z.ai/model-api
  • 检查API信用/余额
  • 确保URL可访问

MCP客户端无法连接

  • 验证配置中的服务器路径是否正确
  • 确保Python3在系统PATH中
  • 检查文件权限: chmod +x src/server.py

调试模式

通过设置环境变量启用调试日志记录:bash export ZAI_DEBUG=1 python src/server.py

许可证

MIT许可证-有关详细信息,请参阅许可证文件

贡献

欢迎投稿!请随时提交拉取请求。

支持

  • 问题:在GitHub Issues上报告错误和功能请求
  • ZAI API文件: https://docs.z.ai
  • MCP规范: https://modelcontextprotocol.io

致谢

  • ZAI提供GLM-4.7-Flash API
  • DuckDuckGo搜索API
  • 规范的模型上下文协议团队

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
ZAI MCP Server 怎么安装?

在客户端按下面的安装命令接入:pip install -r requirements.txt。装完在客户端配置里引用同一个包或端点。

ZAI MCP Server 怎么在 Claude Desktop、Claude、Cursor 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

ZAI MCP Server 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

ZAI MCP Server 需要 API Key 吗?

资料标注需要API Key认证,使用前准备好对应凭据,并按最小权限配置。

ZAI MCP Server 支持哪些客户端?

资料标注支持 Claude Desktop、Claude、Cursor、Cline、VS Code;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

ZAI MCP Server 能提供哪些能力?

资料显示约 3 个工具;能力标签包括 搜索、Python、Claude。具体工具清单以官方文档为准。

ZAI MCP Server 需要什么运行环境?

属于本地进程,需要在本机装好运行环境。

ZAI MCP Server 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。