diff-sentinel
Provides GitHub-focused tooling such as a composite GitHub Action to gate pull requests, triage GitHub issues, and generate publication-ready GitHub PR comments based on diff audits.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
๐ก๏ธ diff-sentinel
Autonomous Open-Source Maintainer Sentinel & Model Context Protocol (MCP) Server
Lightweight AST & Unified Git Diff Analyzer, Security Secret Scanner, Breaking Change Detector, GitHub Action, and AI Maintainer Companion.
โก Overview
Maintaining high-velocity open-source repositories is exhausting:
PR reviews accumulate faster than maintainers can review them.
Leaked credentials, API tokens, and dangerous runtime patterns slip through manual reviews.
Subtle breaking API changes (e.g. modified function signatures, removed public exports) break downstream packages.
PRs modify complex production logic without updating test coverage.
diff-sentinel is built from the ground up for open-source maintainers and AI coding agents (such as Claude Code, OpenAI Codex, and Cursor). It provides deep, sub-millisecond AST-level patch inspection, automated risk scoring (0โ100), security vulnerability detection, issue triage, and an official Model Context Protocol (MCP) server interface.
Related MCP server: Smart Git MCP Server & CLI
๐ Key Features
๐ Sub-Millisecond Unified Diff Parsing: Accurately parses hunk headers, added/deleted lines, renames, and calculates blast radius across codebases.
๐ AST-Level Breaking Change Detection: Identifies removed public exports, altered parameter signatures, and type narrowing across TypeScript, JavaScript, Python, and Go.
๐ Deep Secret & Vulnerability Scanner: Intercepts OpenAI keys, Anthropic keys, AWS IAM tokens, GitHub PATs, private cryptographic keys, and unsafe APIs (
eval, shell injection, SQL concatenation).๐ฏ Multi-Factor PR Risk Engine: Generates a composite risk score (0 to 100), letter grade (A through F), and determines
isSafeToMergebased on churn, sensitive path impact, and test coverage gaps.๐ค Model Context Protocol (MCP) Server: Native stdio JSON-RPC 2.0 server allowing AI assistants (Claude Desktop, Claude Code, OpenAI agents) to audit diffs, scan secrets, and triage issues directly.
๐ Automated Issue Triager: Classifies incoming GitHub issues into categories (
bug,feature,security,documentation), checks for minimal reproduction steps, and suggests triage labels.๐ฆ Semantic Changelog Generator: Parses Conventional Commits and automatically suggests SemVer version bumps (
major,minor,patch) formatted in Keep-a-Changelog Markdown.โ๏ธ GitHub Action Ready: Drop-in composite action (
action.yml) to guard PRs directly in CI/CD pipelines.
๐ Architecture
flowchart TD
A[Git Diff / PR Patch] --> B[Diff Parser Engine]
B --> C[AST Signature Analyzer]
B --> D[Security & Secret Scanner]
B --> E[Blast Radius & Churn Counter]
C --> F[Multi-Factor Risk Engine]
D --> F
E --> F
F --> G[Maintainer Report & Grade]
subgraph Interfaces
H[CLI Tool: diff-sentinel]
I[GitHub Action Runner]
J[Model Context Protocol Server]
end
G --> H
G --> I
G --> J
J <--> K[Claude Code / Claude Desktop]
J <--> L[OpenAI Codex / Custom Agents]๐ Quick Start
1. Run via CLI
# Analyze git diff from latest commit
git diff HEAD~1 | diff-sentinel diff
# Run strict audit (fails CI if high risk or secrets are found)
git diff HEAD~1 | diff-sentinel diff --strict
# Output machine-readable JSON for automated pipelines
diff-sentinel diff pr.patch --json2. Triage an Issue
diff-sentinel triage "Crash on startup when parsing malformed diff" issue_body.md3. Generate Semantic Release Changelog
git log -n 20 --oneline | diff-sentinel changelog 1.2.04. Audit Repository Hygiene
diff-sentinel audit .๐ค Model Context Protocol (MCP) Integration
diff-sentinel ships with a native Model Context Protocol server. This allows AI assistants like Claude Code, Claude Desktop, and Cursor to execute repository audits and diff reviews autonomously.
Configure Claude Desktop (claude_desktop_config.json)
On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"diff-sentinel": {
"command": "node",
"args": [
"--experimental-strip-types",
"/absolute/path/to/diff-sentinel/src/cli.ts",
"mcp"
]
}
}
}Available MCP Tools
Tool | Description |
| Full AST-aware diff audit: security findings, breaking changes, churn, risk score. |
| Rapid scan for leaked credentials (OpenAI, Anthropic, GCP, AWS, GitHub) & unsafe APIs. |
| Evaluates cognitive & cyclomatic complexity and pinpoints nested hotspots. |
| Detects package downgrades, loosened pins, and typosquatting risks. |
| Generates a publication-ready GitHub Markdown comment with tables and checklists. |
| Classifies GitHub issues, estimates complexity, checks for reproduction steps. |
| Formats conventional commits and calculates recommended SemVer bumps. |
| Evaluates open-source community standards (licenses, CI, security policy). |
๐ GitHub Action Setup
Add diff-sentinel directly into your GitHub repository to gate every pull request:
Create .github/workflows/sentinel-review.yml:
name: Pull Request Sentinel Audit
on:
pull_request:
branches: [main, master]
jobs:
audit:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run diff-sentinel
uses: your-username/diff-sentinel@v1
with:
base-ref: ${{ github.base_ref }}
strict: true๐งช Testing
diff-sentinel contains a 100% native test suite running via Node's built-in test runner without any external runtime dependencies:
npm test๐ค Contributing
We love contributions! Please read our Contributing Guide and review our Code of Conduct.
๐ License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Risk-scan a diff, flag AI-generated-code tells, find secrets. 5 of 7 tools need no account.
Deep security scans of repos you own from your editor: dependency CVEs, SAST, git-history secrets.
AI-native git hosting โ repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Related MCP Servers
- AlicenseDqualityDmaintenanceEnables AI agents to perform security audits on pull request diffs by detecting secrets, dangerous code patterns, and new dependencies, outputting structured JSON for generating PR review comments.1MIT
- AlicenseAqualityAmaintenanceEnables AI assistants to perform Git workflows with semantic commit messages, pre-PR secret audits, conflict resolution, and release changelog generation.5MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI coding assistants to inspect local and remote repositories through sandboxed tools that surface project overviews, structure, dependency audits, Git churn hotspots, and a heuristic health score. It also supports safe GitHub issue searching and creation with built-in duplicate preflight checks, while blocking sensitive files, binary content, and path traversal attacks.33 npmMIT
- AlicenseNot gradedqualityBmaintenanceExposes code-review and issue-triage tools to AI assistants over stdio, letting them evaluate unified pull-request diffs for maintainer remarks, slice diffs into categorized AST hunks, and classify GitHub issues by priority while synthesizing minimal reproduction stubs.1Apache 2.0