critique-mcp
critique-mcp
一个 MCP 服务器,它让智能体真正拥有审查 pull request 的能力——不只是概括 diff,而是把 diff 拆开、对变更的代码运行 lint、在测试没有被更新时标记出来,并把一份真实的 review 提交回 GitHub。
Python · Model Context Protocol · GitHub REST API
工具
工具 | 功能说明 |
| PR 中变更的文件,附带 diff 统计和补丁文本 |
| 标记那些修改了源文件却未触及任何测试文件的 PR |
| 在 PR 的 head commit 上对每个变更的 Python 文件运行 |
| 在 PR 上提交真正的 review(评论 / 批准 / 请求变更) |
每个工具都是一个精简、可独立测试的函数——run_linter 不知道 check_test_coverage 是怎么工作的,二者除了经由 GitHubClient 之外也都不与 GitHub 通信。由智能体决定如何组合它们;这个服务器只是给它一双手。
check_test_coverage 是一种 PR 级别的启发式检查,而不是逐文件的覆盖率插桩:它标记的是“这个 PR 改动源文件,但整个 PR 里连一个测试文件都没碰”,这和 Danger.js 等工具使用的粗粒度信号一致。一个改动了五个源文件、但顺带只动了一个无关测试的 PR 不会被标记被拦截——更精确的版本需要真实的覆盖率数据,而不是文件名。
Related MCP server: github-pr-review-mcp
为什么会有这个项目
我曾在别人的 PR 中手工找到并修复过这些工具正好能捕获的那类 bug——比如 chroma-core/chroma 中一个空洞通过的测试断言,weaviate-python-client 中一个只检查了列表里某一个元素的校验器,以及 qdrant-client 里的浮点精度问题。这个项目把这种 review 流程变成了智能体可以直接调用的工具,而不是每次都要靠人手工做同样的检查。
环境要求
需要 Python 3.11+、PATH 里的 ruff,以及一个带 repo 权限的 GitHub personal access token(只读就够用了,除非你想让 post_review 正常工作)。
cp .env.example .env # then add your token to .env
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt使用
把它添加到 Claude Desktop / Claude Code 的 MCP 配置中:
{
"mcpServers": {
"critique": {
"command": "python",
"args": ["-m", "critique_mcp.server"],
"env": { "GITHUB_TOKEN": "ghp_..." }
}
}
}然后让智能体这样使用它:“用 critique 审查 owner/repo 上的 PR #42,检查 lint 问题和缺失的测试,然后提交一个总结性 review。”
测试
pytest测试中所有 GitHub API 调用都是 mock 的——除非你自己运行这个 server,否则这里的任何部分都不会发起真正的网络请求。
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.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to perform comprehensive GitHub pull request code reviews, including analysis of code patterns, complexity, and security issues, while managing review comments and ensuring compliance with team coding standards.2MIT
- AlicenseNot gradedqualityCmaintenanceProvides GitHub PR review capabilities to LLMs, enabling automated PR analysis, review submission, and inline commenting via MCP.101MIT
- FlicenseNot gradedqualityCmaintenanceEnables reviewing GitHub pull requests via ChatGPT, including listing PRs, viewing diffs, posting comments, approving, and requesting changes.
- FlicenseAqualityCmaintenanceEnables LLM clients to list, read, review, and comment on GitHub pull requests, turning an AI assistant into a fully capable code reviewer.61
Related MCP Connectors
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Pull change requests from your Amendor board into your coding agent to build and open PRs.
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/Nimra3261/critique-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server