Angular PR Review MCP
Angular PR Review MCP
可复用的 MCP 服务器,用于跨多个 Angular 仓库的自动化拉取请求审查工作流。
此包公开了三个 MCP 工具:
get_pr_review_templategenerate_pr_diffread_pr_diffsave_pr_review
它在目标仓库上下文(当前工作目录)中运行,因此一个已发布的包可被任何 Angular 应用复用。
要求
Node.js 20+
已安装 Git 并可在 PATH 中使用
支持 Copilot Chat MCP 的 VS Code
Related MCP server: GitHub Code Reviewer
本地开发
npm install
npm run build
npm run dev发布到 npm
如果公开发布:
npm login
npm publish --access public如果以作用域包发布(推荐用于账户/组织所有权):
将 package.json 中的
name字段改为你的作用域,例如@your-scope/angular-pr-review-mcp。发布:
npm login
npm publish --access public创建独立的 GitHub 仓库
从此文件夹创建并推送到你账户中的专用仓库:
git init
git branch -M main
git remote add origin https://github.com/<your-username>/angular-pr-review-mcp.git
git add .
git commit -m "Initial reusable Angular PR review MCP package"
git push -u origin main在任何 Angular 仓库中使用
在每个 Angular 仓库中添加或更新 .vscode/mcp.json:
{
"servers": {
"angular-pr-review": {
"type": "stdio",
"command": "npx",
"args": ["-y", "angular-pr-review-mcp"],
"cwd": "${workspaceFolder}",
"env": {
"PR_REVIEW_BASE_BRANCH": "main",
"PR_REVIEW_OUTPUT_DIR": "pr_review"
}
}
}
}对于作用域包,请将 angular-pr-review-mcp 替换为你发布的名称。
环境变量
PR_REVIEW_BASE_BRANCH:用于比较的目标基础分支(默认main)PR_REVIEW_OUTPUT_DIR:审查产物目录(默认仓库根目录下的pr_review)PR_REVIEW_REPO_ROOT:覆盖仓库根目录(默认当前工作目录)PR_REVIEW_SERVER_NAME:MCP 服务器名称(默认angular-pr-review)
工具工作流
使用提交 SHA 调用
generate_pr_diff。调用
read_pr_diff获取 diff 内容。调用
save_pr_review保存 Markdown 审查评论。
推荐流程:
首先调用
get_pr_review_template,加载本地审查规范,避免每次运行都重新推导规则。调用
generate_pr_diff和read_pr_diff收集证据。调用
save_pr_review生成最终报告。
生成的文件会写入每个使用方仓库中配置的输出文件夹。
本地模板产物
该仓库包含 pr_review_prompt_template.md,以便团队可以在版本控制中对审查指南进行版本管理。
get_pr_review_template 工具返回相同的策略文本(支持可选的提交令牌替换),这有助于保持审查结果确定性并减少令牌消耗。
Available Tools
4 toolsgenerate_pr_diffB
Generate a PR review diff for a validated Git commit hash and return the resulting diff file path.
| Name | Required | Description | Default |
|---|---|---|---|
| commitHash | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It does reveal a key side effect: the tool creates a diff file and returns its path. However, it is vague about what 'validated' means and does not explain if any resources are modified or side effects occur beyond file creation. It adds some transparency but leaves room for interpretation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, tight sentence of 18 words. It fronts the main verb 'Generate', includes all essential elements (action, object, input, output), and wastes no words. It is a model of concise writing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with one parameter and no output schema, the description covers the basic action and return value. However, it does not clarify how this tool fits into the broader workflow with siblings like 'read_pr_diff' and 'save_pr_review', nor does it mention failure behaviors or the nature of the output path. It is adequate but not comprehensive for an agent to invoke it with full confidence in all scenarios.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema describes the 'commitHash' parameter with a regex pattern and length limits, but the description adds the semantic that it should be a valid Git commit hash. This is useful but minimal, especially since schema coverage is 0% and the parameter name already hints at its content. The description does not elaborate on format or edge cases, so it only partially compensates for the lack of schema documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Generate a PR review diff'), the input ('for a validated Git commit hash'), and the output ('return the resulting diff file path'). It is specific enough to understand the tool's purpose, though it does not explicitly differentiate from the sibling 'read_pr_diff' or mention alternatives, missing the top score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no guidance on when to use this tool versus the siblings (e.g., 'use this to create a diff before reading it'). There is no indication of prerequisites beyond the hash being 'validated', and no mention of alternatives or conditions. The usage context must be inferred entirely from the name and description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_pr_review_templateB
Return the local Angular PR review template used to keep review rules consistent and token-efficient.
| Name | Required | Description | Default |
|---|---|---|---|
| commitHash | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description alone must convey the operation's nature. It fails to explicitly state this is a non-destructive read, though 'return' is a safe verb. The description is accurate but doesn't go far in revealing behavior beyond the function name.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, clear sentence that efficiently communicates the tool's purpose without wasted words. The intended characteristic ('token-efficient') is implicit and effective.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read tool with one optional parameter and no output schema, this description is largely sufficient. The main gaps are the lack of detail about the commitHash parameter and absence of explicit non-destructive language, but these are minor for a tool of this complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description gives no explanation of the commitHash parameter. While an optional commitHash might reasonably be inferred to be a Git commit hash, the format, purpose (likely to fetch the template at that commit), and impact are left entirely to the agent. More guidance would be valuable.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly identifies the tool's function: returning the local Angular PR review template. Although it doesn't mention how it differs from sibling tools, the verb 'return' and the specific resource (Angular PR review template) make the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies this is for users needing the review template, and the phrase 'used to keep review rules consistent' gives some context, but there's no explicit guidance on when to use this tool instead of the siblings. The description labels the template as a 'local' resource, which hints at a distinguishing factor, but it doesn't spell out when an agent should choose this tool over the others.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_pr_diffA
Read the most recently generated PR diff file, or a specific diff by commit hash/file path.
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | No | ||
| commitHash | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of expressing behavioral traits. It explicitly frames the operation as 'Read' and 'read a PR diff,' which strongly indicates a non-mutating operation. It also explains the target's selection behavior (most recent by default or specific diff via commit/file path). It doesn't cover edge cases like missing diff files or parameter conflicts, but the core behavioral intent is clear and supported.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that front-loads the primary behavior ('Read the most recently generated PR diff file') and then appends the optional two selection modes. There is no redundant wording or restatement of the tool name, and every word contributes to the tool's meaning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
This is a simple two-parameter, read-only tool with no required parameters, no output schema, and no annotations. The description covers the main invocation paths that an agent needs: read latest by omitting parameters, or read a specific diff by supplying a commit hash or file path. It omits details like error handling when no diff exists or combined parameter behavior, but those are minor for this straightforward tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must add meaning to the parameters on its own. It does: 'commit hash/file path' directly maps to the commitHash and filePath properties, and clarifies that these modes override the default most-recent behavior. It doesn't explain the exact path semantics or how the two parameters interact if both are provided, but it gives enough information to correctly choose an optional parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Read') and a clear resource ('PR diff file'), and immediately distinguishes between the default behavior (most recently generated) and the alternate modes (specific commit hash or file path). This clearly separates it from siblings like generate_pr_diff, get_pr_review_template, and save_pr_review.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states the main use cases: read the latest generated diff or read a specific diff by commit hash or filePath. It implies this tool should be used after a diff has been generated, which gives useful context. It does not explicitly name alternatives, but the sibling tools are self-evidently different, so only minor additional guidance would be needed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
save_pr_reviewB
Save a completed review as a markdown report inside the configured output folder.
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| commitHash | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations present, the description is the sole source of behavioral information. It discloses that the tool writes a markdown file to a folder, which is a useful side‑effect detail, but it omits any mention of overwrite behavior, file naming, error handling, or whether the action is reversible. For a write operation, this is a moderate disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, grammatically clean sentence that conveys the essential information without any fluff. It is appropriately front-loaded with the action and includes only the necessary details about format and destination.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with just two simple scalar parameters and no nested objects, the description covers the high-level behavior adequately but falls short on parameter-level detail and its role in the broader workflow with sibling tools. The mention of a 'configured output folder' assumes background knowledge that is not elaborated, yet the overall simplicity of the tool keeps the description from being grossly incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Since the schema has 0% description coverage, the description bears the responsibility of clarifying parameters, but it fails to explain either 'content' or 'commitHash'. While 'content' is somewhat self-evident as the review text, 'commitHash' is left to the reader's inference, and the description offers no additional context about the relationship between the two.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('save'), the resource ('a completed review'), the output format ('markdown report'), and the destination ('configured output folder'), making the tool's purpose immediately understandable. It is distinct from siblings like get_pr_review_template or generate_pr_diff, although it doesn't explicitly name them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage after a review is complete ('a completed review') and mentions a 'configured output folder,' giving some contextual clue. However, it provides no explicit when-to-use guidance, prerequisites, or alternatives, leaving the agent to infer the appropriate context from limited evidence.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.0.0- First observed
generate_pr_diff - First observed
get_pr_review_template - First observed
read_pr_diff - First observed
save_pr_review
TDQS
Scored across 4 tools
Each tool serves a distinct purpose: fetching the review template, generating a diff, reading a diff, and saving a review. There is no overlap or ambiguity in their functionalities.
All tools follow a consistent verb_noun pattern (get, generate, read, save) with clear object references. The only minor deviation is that 'get_pr_review_template' and 'generate_pr_diff' could be seen as slightly more specific verbs, but they are still consistent with the overall style.
With 4 tools, the server is well-scoped for a focused PR review workflow. Each tool covers an essential step: template retrieval, diff generation, diff reading, and saving results, without unnecessary extras.
The tool surface covers the core workflow of generating and reviewing a PR diff. However, a minor gap might be the lack of a tool to fetch PR metadata or commit details beyond the diff, but the current set is sufficient for the stated purpose.
Maintenance
Related MCP Connectors
Detect breaking changes, generate changelogs, diff, and validate OpenAPI specs.
- ShipstarOAuthai.shipstar
Generate changelogs, release emails, help-center articles, banners, and social posts from commits.
Manage repositories, users, releases, and automate GitHub workflows
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
Related MCP Servers
- AlicenseAqualityCmaintenanceGenerates commit messages, PR titles and descriptions, and release notes from git changes, with automatic domain detection for appropriate PR templates.107 npm1MIT
- FlicenseAqualityDmaintenanceEnables fetching Pull Request diffs from GitHub and posting inline review comments directly on PRs, either as pending drafts or published immediately.2-

Selvageofficial
AlicenseNot gradedqualityCmaintenanceEnables AI-powered code review of Git diffs through natural language, supporting multiple AI models and Git workflows.29 PyPI36Apache 2.0- AlicenseNot gradedqualityAmaintenanceEnables AI-powered pull request review and analysis for Bitbucket Cloud, plus tools to list, create, diff, comment on, and analyze PRs. Supports stdio or HTTP transports with OAuth/bearer auth and pluggable LLM providers.102 npmMIT