Skip to main content

Zread.ai MCP Server

Python Node.js MCP License

连接 Zread.ai 文档平台的 MCP 服务器,让 AI 助手能够阅读 GitHub 仓库文档、搜索代码、与仓库 AI 对话。

💡 提示 AI:这是一个 MCP (Model Context Protocol) 服务器,提供 9 个工具用于代码仓库分析。支持 Python 和 Node.js 两种实现,可通过 npx 或 uvx 一行命令运行。核心功能包括文档查询、仓库搜索、AI 问答。

功能

  • 文档查询 - 获取仓库文档页面、目录结构、搜索关键词
  • 仓库发现 - 推荐仓库、热门榜单、搜索代码库
  • AI 问答 - 向仓库 AI 助手提问(需 Token)
  • 文件获取 - 读取源代码文件内容(需 Token)

快速启动

uvx zread-mcp
npx zread-mcp

带 Token 运行

# uvx (Python)
uvx --env ZREAD_TOKEN=your-token zread-mcp

# npx (Node.js) - Windows
set ZREAD_TOKEN=your-token && npx zread-mcp

# npx (Node.js) - macOS/Linux
ZREAD_TOKEN=your-token npx zread-mcp

HTTP 模式 (Streamable HTTP)

uvx zread-mcp --transport http --port 3000
npx zread-mcp --transport http --port 3000

更多运行方式

Python 生态

# uvx 从 PyPI 运行(推荐)
uvx zread-mcp

# uvx 从 GitHub 仓库运行
uvx --from git+https://github.com/ejfkdev/zread-mcp.git zread-mcp

# uv 运行远程脚本
uv run https://raw.githubusercontent.com/ejfkdev/zread-mcp/main/zread_mcp_server.py

# pipx 从 GitHub 运行
pipx run --spec git+https://github.com/ejfkdev/zread-mcp.git zread-mcp

# pipx 安装到本地
pipx install git+https://github.com/ejfkdev/zread-mcp.git
zread-mcp --transport http

# 本地运行
python zread_mcp_server.py

Node.js 生态

# pnpm
pnpm dlx ejfkdev/zread-mcp

# bun
bunx ejfkdev/zread-mcp

# 全局安装
npm install -g ejfkdev/zread-mcp
zread-mcp-server --transport http

MCP 客户端配置

npx(Node.js)

{
  "mcpServers": {
    "zread": {
      "command": "npx",
      "args": ["-y", "zread-mcp-server"],
      "env": {
        "ZREAD_TOKEN": "your-token"
      }
    }
  }
}

uvx(Python)

{
  "mcpServers": {
    "zread": {
      "command": "uvx",
      "args": ["--env", "ZREAD_TOKEN=your-token", "zread-mcp"]
    }
  }
}

获取 Token

部分高级功能(AI 问答、文件获取)需要 ZREAD_TOKEN:

  1. 访问 https://zread.ai 并登录
  2. 按 F12 打开控制台
  3. 粘贴运行:
    prompt('复制token', JSON.parse(localStorage.getItem('CGX_AUTH_STORAGE')).state.token)
    
  4. 复制弹窗中的 Token

命令行参数

--transport {stdio,http,sse}  传输协议 (默认: stdio, http/sse 等价)
--host HOST                   HTTP 模式主机 (默认: 127.0.0.1)
--port PORT                   HTTP 模式端口 (默认: 3000)
--token TOKEN                 ZREAD_TOKEN
--no-token                    强制无 Token 模式
-h, --help                    显示帮助

工具列表

工具 需要 Token 说明
fetch_documentation_page 否 获取文档页面
search_documentation 否 搜索文档
get_documentation_outline 否 获取文档大纲
discover_repositories 否 发现推荐仓库
find_repositories 否 搜索仓库
get_trending_repositories 否 热门仓库榜单
check_repository_status 否 检查仓库状态
ask_repo_ai 是 AI 智能问答
fetch_repository_file 是 获取源代码文件

开发

# 克隆仓库
git clone https://github.com/ejfkdev/zread-mcp.git
cd zread-mcp

# Python 测试
python zread_mcp_server.py --test

# Node.js 测试
node zread-mcp-server.js --test

许可证

MIT License

Metadata

Release files for zread-mcp 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zread-mcp 1.0.1
File Size Uploaded
zread_mcp-1.0.1.tar.gz 26.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zread-mcp 1.0.1
File Interpreter ABI Platform
zread_mcp-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 44.0 kB

Release files / zread_mcp-1.0.1.tar.gz

Download URL zread_mcp-1.0.1.tar.gz
Size 26.2 kB
Tags Source
SHA-256 checksum
How to use checksums
88f0d57bf625a78177c1b435f287138d56f053e73dcdeeaea2b498f7b92682a1
BLAKE2b-256 checksum
How to use checksums
79bd97f16bba7368421b628f1ddb39c7f08625a6be0ec42f4ebb4b2b4b59a77a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / zread_mcp-1.0.1-py3-none-any.whl

Download URL zread_mcp-1.0.1-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b2de58d53dcc236cd45b6408b4daa9d69057bb23738d9c889a0dfa824ac2e92
BLAKE2b-256 checksum
How to use checksums
e268ad5379b37329ac9296bd310d1e12d096397ec6dc1623d1ec214235e688a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page