
通过MCP进行有证据支持的GitHub PR审查:恢复过去的决策、标记回归和引用的综述草稿。
概览
为该轨道构建了一个GitHub PR评审MCP服务器。采用NitroStack和TypeScript构建,包含八个重点工具、引用的团队规则、角色范围访问以及评审证据小部件。 一个小的清理会删除一个超时。差异看起来更简单。两年前,那个超时解决了一个停机。原因藏在一个没人记得搜索的评论评论里。 PR Archaeologist 追踪事件线索,找到围绕该事件形成的团队约定,并在新 PR 撤销修复时发出警告。每个警告都链接到其证据。代理的凭证决定了它能看到哪些仓库路径以及是否可以发布。 前后对比是一个示例性工具,而非模型间的测量比较。工具工具链接采用GitHub的常规URL形状,但指向虚构的acme/launchpad仓库。实时模式返回真实的GitHub URL。 评论中使用 { “path”: “src/client.ts”, “line”: 3, “body”: “keep the timeout.” }。
概述(AI 翻译)
评审者看到的差异没有记忆。PR 考古学家重新提出决策。
一个用于MCP到月球buildathon·开发者工具轨道的GitHub PR评测MCP服务器。采用NitroStack和TypeScript构建,包含十二个专注于工具、引用的团队规则、角色范围访问以及评审证据小部件。
问题所在
一个小的清理会删除一个超时。差异看起来更简单。两年前,那个超时解决了一个停机。原因藏在一个没人记得搜索的评论评论里。
PR Archaeologist 追踪事件线索,找到围绕该事件形成的团队约定,并在新 PR 撤销修复时发出警告。每个警告都链接到其证据。代理的凭证决定了它能看到哪些仓库路径以及是否可以发布。
| 之前:单独差别 | 之后:带记忆复习 |
|---|---|
fetch(url) 替换了较长的通话 |
线路来源解释了工人疲劳事件 |
| 差异中缺少一个旧约定 | 一项发现引用了2024年评审评论及其网址 |
| 有意修复看起来像模板 | 与PR #42修复完全相反的修复会触发冲突警告 |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
PR Archaeologist
Reviewers see a diff with no memory. PR Archaeologist brings back the decisions.
A GitHub PR review MCP server for the MCP to the Moon buildathon · Developer Tools track. Built with NitroStack and TypeScript, with twelve focused tools, cited team rules, role-scoped access, and a review evidence widget.
The problem
A small cleanup deletes a timeout. The diff looks simpler. Two years earlier, that timeout fixed an outage. The reason lives in a review comment nobody remembers to search for.
PR Archaeologist traces the line back to the incident, finds the team convention that grew around it, and warns when a new PR reverses the fix. Every warning links to its evidence. The agent’s credentials determine which repository paths it can see and whether it can post.
| Before: diff alone | After: review with memory |
|---|---|
fetch(url) replaces a longer call |
Line provenance explains the worker-exhaustion incident |
| An old convention is absent from the diff | A finding quotes the 2024 review comment and its URL |
| A deliberate fix looks like boilerplate | An exact reverse of PR #42’s fix triggers a conflict warning |
| Reviewer choice relies on recall | Path history suggests Nikhil, Ava and Mina with evidence |
| Repository access is all or nothing | A readonly request for .env returns not found; posting is a dry run |
The before/after is an illustrative fixture scenario, not a measured comparison between models. Fixture links have GitHub’s normal URL shape but point to the fictional acme/launchpad repository. Live mode returns real GitHub URLs.
How it fits together
flowchart LR
Client[Claude / Cursor / NitroStudio] --> MCP[NitroStack MCP server]
MCP --> Audit[Audited call boundary]
Audit --> Guard[JWT or API key + role config]
Guard --> Scope[Repository and path allowlist]
Scope --> Tools[Twelve review tools]
Tools --> Data{GitHub adapter}
Data --> REST[GitHub REST API]
Data --> Mock[MOCK=1 snapshot]
Tools --> Rules[Cached cited rulebook]
Tools --> Card[Review evidence card]
Audit --> Log[audit://log · identity scoped]
Tools
| Tool | One job |
|---|---|
pr_context(repo, pr) |
Visible file patches, author, closing issues, related merged PRs on the same files, and review docs |
read_pr_file(repo, pr, path, start_line=1, end_line?) |
Read up to 200 lines at the pinned PR head, including unchanged files needed for context |
pr_discussion(repo, pr) |
Visible inline comments and replies, submitted reviews and general PR comments, with source links |
pr_changes_since(repo, pr, since) |
Visible patches since an earlier full commit SHA; detect diverged history and report incomplete comparisons |
recheck_findings(repo, pr, previous_findings) |
Match saved rule findings across line shifts and visible renames; report still_detected, not_detected or unverified |
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"pr-archaeologist": {
"command": "node",
"args": ["C:/Users/sayal/pr-archaeologist/scripts/mcp.mjs"],
"env": {
"MOCK": "1",
"MCP_API_KEY": "demo-readonly",
"NITRO_MCP_PROTOCOL_VERSION": "legacy"
}
}
}
}