zhupi-mcp
Agent-side MCP server for the zhupi review loop, enabling AI agents to submit documents, read annotations, and reply via GitHub.
README
<div align="center">
English · 中文
zhupi-mcp
The agent side of zhupi, as an MCP server.<br> zhupi is where a human reads and annotates AI-authored documents. This is the other end of that loop: the tools an agent uses to submit a document, read the annotations, and reply to each one.
Spec · Milestones · Backlog · zhupi (the app)
</div>
Status: Phase 1 shipped (two read-only tools)
Installable and usable. list_folders and read_comments are implemented and wired into the MCP config; 119 unit tests plus 41 real-machine assertions are green, run against live GitHub data.
Measured context saved versus the string of gh api calls it replaces: 7.1× for one folder, 3.9× across all open folders (41 KB → 5.8 KB). That was the headline reason to build this, and the number holds.
Not yet implemented: open_folder, lint_folder, audit_folders, reply_comment — see Phase 2/3 in MILESTONES.
One piece shipped earlier and is not part of the server: the route guard that refuses raw gh pr create against the folder repo. It lives in the review-loop skill and shipped first on purpose — see "What MCP does not fix" below.
Install:
{ "mcpServers": { "zhupi": { "command": "node", "args": ["<repo>/dist/index.js"] } } }
Run npm install && npm run build first. Authentication borrows the machine's existing gh; no separate PAT.
Where things stand: MILESTONES · OPEN-QUESTIONS
Why
The agent side of this loop already works. It lives in a ~/.claude/skills/review-loop/ skill: one 8KB prose file plus four bash scripts. It got hardened on 2026-07-28 after measuring what actually leaked — 3 of 8 submissions missed a required marker, 11 documents shipped without their translation pair. The conclusion was that prose reminders do not cure missed execution, only gates do, so the rules moved into scripts.
That fixed the rules. It did not fix three other things:
| The pain | |
|---|---|
| Cross-harness | A Claude Code skill only exists inside Claude Code. Every other agent runtime — Antigravity, Codex, the desktop app — cannot submit a document at all |
| Context cost of reading back | "Read the annotations" is a string of gh api calls plus the model parsing threads and inline positions by hand, every single time. Structured JSON collapses that to one call |
| Untyped inputs | Required fields live in prose. A missing one surfaces when a shell script dies halfway, not when the call is made |
What MCP does not fix
Worth saying plainly, because it is the obvious thing to assume: an MCP server does not stop an agent from bypassing it. The model can still shell out to gh pr create and skip every gate. Moving the logic from bash to TypeScript changes the implementation, not the routing.
What blocks the route is a PreToolUse hook that refuses raw gh pr create against the review repo. That is ten lines of config, it is independent of this repo, and it ships first (SPEC §7).
This distinction is the reason the spec exists. If you are considering the same move, decide which of the two problems you actually have.
Tool surface
Six tools; the two marked ✅ are shipped. Merging is deliberately not one of them — that is the human's click, in the app.
| Tool | What it does |
|---|---|
open_folder |
Submit a document: branch, commit, push, open the PR, weld in the backlink marker, verify it landed |
lint_folder |
Check house style before submitting |
audit_folders |
Sweep everything already open for gaps |
list_folders ✅ |
List folders, most-recently-active first, with counts and previews of what needs a look |
read_comments ✅ |
Read annotations as structured JSON, with authorship and answered computed server-side |
reply_comment |
Reply to one annotation, or post an overall comment |
How it works

The repo in the middle is the whole interface. Neither side calls the other; both talk to GitHub. That is why zhupi can be taken off at any time, and why this server can be swapped for a bash script without the human noticing.
Node + TypeScript, stdio transport, installed by absolute path — no global npm state. GitHub auth is borrowed from gh auth token rather than managing a second PAT.
Known limits
Honest list, in advance:
- The concurrency fix is a file lock, not a queue. A stdio MCP server is one process per session, not a shared daemon, so it cannot serialize across sessions on its own.
flockplus a throwaway worktree does the job; the mechanism is worth knowing before you assume otherwise. - The session-backlink marker is best-effort. It is detected by walking the process tree, which works only when the caller is a descendant of the host CLI. When it cannot be detected, nothing is embedded — a silently wrong id is worse than a missing button.
- The lint rewrite is where the risk is. The existing bash checks have accumulated fixes that a rewrite can silently drop. SPEC §5 documents each rule's actual behaviour (which drifts from its documentation in three places) and requires a differential test against the old scripts before shipping.
- Personal-scale by design. One reviewer, one review repo, no multi-tenant story.
Fork it
The repo name and local checkout path are configuration, not constants:
ZHUPI_REVIEW_REPO=<owner>/<repo> default: charliezong18/review
ZHUPI_REVIEW_PATH=<path> default: ~/Developer/review
The conventions the tools enforce — bilingual pairs, cross-link headers, the five-section PR body — are one person's house style. Fork and change them; they are rules in one module, not assumptions spread through the code.
License
MIT © Charlie Zong
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。