Repository Inspector MCP Server
Repository Inspector
这是一个小型 TypeScript 开发者工具,用于检查 Git 仓库中的变更、运行可选的验证命令,并生成 Markdown 报告。它既可以从命令行使用,也可以通过 MCP 暴露给 AI 客户端。
你的任务
调查该仓库,并按你的最佳判断进行改进。初始代码仅适用于一条狭窄的快乐路径,但在生产环境中使用可能会暴露正确性、安全性、可靠性、契约、输出、文档或测试方面的弱点。
我们不要求你完成所有工作。我们关注的是你如何调查、确定优先级、实现、验证,并解释一个有意义的范围。
Related MCP server: repository-inspector
产品决策
该工具可能被开发者和 AI 编码代理直接使用。请决定其生产接口应该是 CLI 优先、MCP 优先,还是 混合模式。实现与你的决策一致的改进。
没有预设的标签。请说明:
你假定的主要用户和执行环境。
信任边界和允许的能力。
可靠性、可发现性、延迟/上下文和输出大小的权衡。
你继续宣传的接口如何保持行为一致性。
哪些证据会改变你的决策。
时间和规则
在收到邀请后的 48 小时内,最多 90 分钟的专注时间。
可自由使用 AI 编码工具。验证它们的工作,并记录至少一条你纠正或拒绝的建议。
在你从该模板创建的自己的仓库中工作。
边工作边提交,并在最终提交中完成
SUBMISSION.md。不要求完成。准确的范围和验证比大的 diff 更重要。
设置
npm install
npm run typecheck
npm testCLI
npm run inspector -- review --repo ./path/to/repo --format markdown
npm run inspector -- review --repo ./path/to/repo --validate "npm test"报告写入 review-report.md。
MCP
使用以下命令启动 stdio 服务器:
npm run mcp-server它暴露了一个 review_repository 工具,接受 repo_path(必填)、base_ref(可选)和 validation_commands(可选的 shell 命令数组)。
MCP 参数可能被被审查仓库中的内容(提示注入)所操纵,因此通过 MCP 运行验证命令 默认禁用。要启用它,服务器操作员必须设置 以下两个 环境变量——只设置一个仍会保持验证禁用:
INSPECTOR_ALLOW_VALIDATION=1INSPECTOR_VALIDATION_ALLOWLIST="npm test,npm run typecheck"—— 一个逗号分隔的允许运行的确切命令列表;其他任何命令都会被跳过。
当验证被禁用或命令不在允许列表中时,该工具仍会返回完整的只读报告;被跳过的命令会以 status: skipped 和原因报告,而不是被静默丢弃。
项目结构
src/core.ts shared review orchestration
src/cli.ts command-line adapter
src/mcp-server.ts MCP adapter
src/git.ts Git inspection
src/validation.ts validation execution
src/report.ts Markdown report generation
test/ public starter tests完成后,通过本仓库上的 Security → Report a vulnerability 提交——请参阅 SECURITY.md 了解具体需要包含的内容。不要通过电子邮件回复;该提交渠道不受监控。
This server cannot be deployed
Maintenance
Related MCP Connectors
AI-native git hosting — repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
Remote MCP for AI Studio Android release gate MCP, structured receipts, audit logs, and reviewer-rea
Remote MCP for Gemini upgrade evals, prompt regressions, output diffs, and eval receipts.
The OpenZeppelin Solidity Contracts MCP server integrates OpenZeppelin's security and style rules into AI-driven development workflows, enabling AI assistants to generate safe, correct, and production-ready smart contracts. It automatically validates generated code against OpenZeppelin standards (including imports, modifiers, naming conventions, and security checks) and supports various contract types including ERC-20, ERC-721, ERC-1155, Stablecoins, RWA, Governor, and Account contracts through prompt-driven workflows.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to inspect Git repositories for changes across committed, staged, unstaged, and untracked scopes, and run allowlisted validation commands with structured results.-
- FlicenseNot gradedqualityBmaintenanceMCP server that inspects Git repository changes, runs optional validation commands, and generates Markdown reports. Exposes a review_repository tool for AI clients to analyze repositories.-
- FlicenseBqualityCmaintenanceEnables secure, policy-controlled operations on local git repositories through MCP, including bounded reads, context-checked patches, allowlisted tasks, and guarded git operations.10-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to search commits, retrieve diffs, and inspect file change history in a Git repository using MCP.548 npmMIT