Skip to main content
Glama

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_template

  • generate_pr_diff

  • read_pr_diff

  • save_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: @droplinkperformance/bitbucket-mcp-server

Lokale Entwicklung

npm install
npm run build
npm run dev

Auf npm veröffentlichen

Bei öffentlicher Veröffentlichung:

npm login
npm publish --access public

Wenn Sie unter einem Scoped Package veröffentlichen (empfohlen für Konto-/Organisationsinhaberschaft):

  1. Ändern Sie das Feld name in der package.json in Ihren Scope, zum Beispiel @your-scope/angular-pr-review-mcp.

  2. Veröffentlichen:

npm login
npm publish --access public

Eigenes 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 main

Aus 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_review im 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

  1. generate_pr_diff mit Commit-SHA.

  2. read_pr_diff zum Abrufen des Diff-Inhalts.

  3. save_pr_review zum Speichern von Markdown-Review-Kommentaren.

Empfohlener Ablauf:

  1. get_pr_review_template zuerst, um die lokale Review-Richtlinie zu laden und zu vermeiden, die Regeln jedes Mal neu abzuleiten.

  • generate_pr_diff und read_pr_diff zur Erfassung der Nachweise.

  • save_pr_review fü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 tools
generate_pr_diffB

Generate a PR review diff for a validated Git commit hash and return the resulting diff file path.

Inputs: commitHash (required).

get_pr_review_templateB

Return the local Angular PR review template used to keep review rules consistent and token-efficient.

Inputs: commitHash.

read_pr_diffA

Read the most recently generated PR diff file, or a specific diff by commit hash/file path.

Inputs: filePath, commitHash.

save_pr_reviewB

Save a completed review as a markdown report inside the configured output folder.

Inputs: content (required), commitHash (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 4 tools

    Disambiguation5/5

    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.

    Naming Consistency4/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables deterministic behavioral regression review of pull-request diffs by checking changed code against approved incident-derived contracts. It exposes read-only tools to assess diffs and pull requests, list and fetch contracts, and report outcomes over stdio without mutating repositories.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to review GitHub pull requests and GitLab merge requests by fetching PR/MR details and diffs, with optional file-type filtering, and posting inline, general, or batched review comments. Supports self-hosted GitLab and custom project-specific review rules through stdio, SSE, or WebSocket transports.
      MIT