Angular PR Review MCP
Angular PR Review MCP
Wiederverwendbarer MCP-Server für automatisierte Pull-Request-Review-Workflows in mehreren Angular-Repos.
Dieses Paket stellt drei MCP-Tools bereit:
get_pr_review_templategenerate_pr_diffread_pr_diffsave_pr_review
Es läuft im Kontext des Ziel-Repositorys (dem aktuellen Arbeitsverzeichnis), sodass ein veröffentlichtes Paket von jeder Angular-App wiederverwendet werden kann.
Voraussetzungen
Node.js 20+
Git installiert und im PATH verfügbar
VS Code mit Copilot-Chat-MCP-Unterstützung
Related MCP server: GitHub Code Reviewer
Lokale Entwicklung
npm install
npm run build
npm run devAuf npm veröffentlichen
Bei öffentlicher Veröffentlichung:
npm login
npm publish --access publicWenn Sie unter einem Scoped Package veröffentlichen (empfohlen für Konto-/Organisationsinhaberschaft):
Ändern Sie das Feld
namein der package.json in Ihren Scope, zum Beispiel@your-scope/angular-pr-review-mcp.Veröffentlichen:
npm login
npm publish --access publicEigenes GitHub-Repository erstellen
Erstellen und pushen Sie von diesem Ordner aus ein dediziertes Repository in Ihrem Konto:
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 mainAus einem beliebigen Angular-Repository verwenden
Fügen oder aktualisieren Sie .vscode/mcp.json in jedem Angular-Repository hinzu:
{
"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"
}
}
}
}Ersetzen Sie bei einem Scoped Package angular-pr-review-mcp durch den veröffentlichten Namen.
Umgebungsvariablen
PR_REVIEW_BASE_BRANCH: Zweigziel-Basis für den Vergleich (Standard:main)PR_REVIEW_OUTPUT_DIR: Verzeichnis der Überprüfungsartefakte (Standard:pr_reviewim Repository-Stamm)PR_REVIEW_REPO_ROOT: überschreibt das Repository-Stammverzeichnis (Standard: aktuelles Arbeitsverzeichnis)PR_REVIEW_SERVER_NAME: MCP-Servername (Standard:angular-pr-review)
Tool-Workflow
generate_pr_diffmit Commit-SHA.read_pr_diffzum Abrufen des Diff-Inhalts.save_pr_reviewzum Speichern von Markdown-Review-Kommentaren.
Empfohlener Ablauf:
get_pr_review_templatezuerst, um die lokale Review-Richtlinie zu laden und zu vermeiden, die Regeln jedes Mal neu abzuleiten.
generate_pr_diffundread_pr_diffzur Erfassung der Nachweise.save_pr_reviewfür den endgültigen Bericht.
Die generierten Dateien werden in den konfigurierten Ausgabeordner des jeweiligen Repositories geschrieben, das das Paket verwendet.
Lokales Template-Artefakt
Das Repository enthält pr_review_prompt_template.md, damit Teams die Review-Vorgaben in der Quellcodeverwaltung versionieren können.
Das Tool get_pr_review_template gibt denselben Richtlinientext zurück (mit optionalem Ersetzen des Commit-Tokens), was Reviews deterministisch hält und den Token-Verbrauch verringert.
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