github-incident-mcp
Provides tools for interacting with the GitHub API, including listing recently merged pull requests, retrieving commit diffs, and executing PR reverts programmatically for incident remediation.
Serves as an alert trigger source for ingesting incident alert payloads into the triage pipeline.
Serves as an alert trigger source for ingesting metric-based incident alerts into the triage pipeline.
Enables dispatching rich Slack notification cards to incident channels (e.g. #oncall-incidents) and escalation alerts to senior on-call channels.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@github-incident-mcpshow recent PRs that might be causing the API errors"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Agentic Incident Response Pipeline
An autonomous, multi-agent incident response pipeline built with LangGraph, LangChain, and official FastMCP (Model Context Protocol) servers for real-time incident triage, root-cause diagnostics, automated remediation, human sign-off state persistence, and Slack notification dispatching.
πArchitecture Overview
sequenceDiagram
autonumber
actor Alert as Alert Trigger (PagerDuty / GitHub / Prometheus)
participant Triage as Triage Agent
participant OSV as OSV MCP Server
participant Diag as Diagnostic Agent
participant GH as GitHub MCP Server
participant Remed as Remediation Agent
actor Gate as Human Sign-off Gate
participant Exec as Execution Agent
participant Slack as Slack Channel
Alert->>Triage: Ingest Alert Payload
Triage->>OSV: Tool Call: osv_scan_alert_payload()
OSV-->>Triage: Vulnerability Advisories & Severity
Triage->>Diag: TriageResult (Sev1-Sev4)
Diag->>GH: Tool Call: github_list_recent_prs()
GH-->>Diag: Merged PRs & Diff Summaries
Diag->>Diag: Temporal Correlation (Error spike vs. PR merge)
Diag->>Remed: DiagnosticResult & Root Cause
Remed->>Gate: Draft Proposal (Pauses at Sign-off Gate)
alt Approve
Gate->>Exec: Approve Command
Exec->>GH: Tool Call: github_execute_revert_pr()
Exec->>Slack: Dispatch Incident Resolution Card
else Edit Command / Reject / Escalate
Gate->>Slack: Execute Overridden Command or Escalate
endRelated MCP server: GitHub MCP Server
Key Features
Triage Agent & Security Cross-Check:
Classifies incident severity (
Sev1toSev4) and affected component.Integrates with OSV MCP Server (
https://api.osv.dev/v1/query) to cross-check dependency vulnerabilities (CVEs).
Diagnostic Agent & Temporal Root Cause Correlation:
Interfaces with GitHub FastMCP Server to query recently merged PRs and commit diffs.
Correlates error log spikes and metric anomalies with PR merge timestamps.
Remediation Agent & Feedback Loop:
Proposes targeted remediation actions (Git PR reverts or deployment rollbacks).
Re-plans proposals based on human engineer feedback if rejected at the gate.
Human Sign-off Gate (LangGraph State Graph Persistence):
Genuinely pauses graph execution using
interrupt()andMemorySaver.Supports 4 interactive actions:
APPROVE,EDIT_COMMAND,REJECT,ESCALATE.
Execution Agent & Slack Notifications:
Executes approved PR reverts programmatically via GitHub REST API.
Dispatches rich Slack cards to
#oncall-incidentsor escalation alerts to#senior-oncall-team.
Repository Structure
βββ src/
β βββ agents/ # Triage, Diagnostic, Remediation, Execution Agents
β βββ mcp/ # GitHub & OSV FastMCP Servers (stdio transport)
β βββ models/ # Pydantic schemas (Alert, Triage, Diagnostic, Remediation, Execution)
β βββ pipeline/ # LangGraph IncidentPipeline state graph
β βββ services/ # GitHub, OSV, Log/Metrics, Notification Services
β βββ utils/ # Logging and utility helpers
β βββ config.py # Centralized configuration settings
βββ tests/
β βββ test_mcp_servers.py
β βββ test_pipeline_graph.py
β βββ run_test_scenario.py # E2E Multi-Agent Scenario Suite
βββ .env.example
βββ .gitignore
βββ requirements.txt
βββ README.mdInstallation & Setup
Clone Repository & Install Dependencies:
git clone https://github.com/<YOUR_USERNAME>/agentic-debugging-project.git cd agentic-debugging-project pip install -r requirements.txtConfigure Environment Variables: Copy
.env.exampleto.envand set your credentials:cp .env.example .envEdit
.env:GEMINI_API_KEY=your_gemini_api_key_here GITHUB_TOKEN=your_github_personal_access_token_here LLM_PROVIDER=gemini LLM_MODEL=gemini-2.5-flash
Testing & Verification
Run Unit Tests:
python -m pytest tests/Run E2E Incident Scenarios:
python -m tests.run_test_scenarioRun Stdio FastMCP Servers:
GitHub FastMCP Server:
python src/mcp/github_mcp_server.pyOSV FastMCP Server:
python src/mcp/osv_mcp_server.py
Claude Desktop MCP Integration
Add the following to your %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"github-incident-mcp": {
"command": "python",
"args": [
"C:\\path\\to\\agentic_debugging_project_github\\src\\mcp\\github_mcp_server.py"
],
"env": {
"GITHUB_TOKEN": "your_github_personal_access_token_here",
"PYTHONUNBUFFERED": "1"
}
},
"osv-vulnerability-mcp": {
"command": "python",
"args": [
"C:\\path\\to\\agentic_debugging_project_github\\src\\mcp\\osv_mcp_server.py"
],
"env": {
"OSV_API_URL": "https://api.osv.dev/v1/query",
"PYTHONUNBUFFERED": "1"
}
}
}
}This server cannot be deployed
Maintenance
Related MCP Connectors
Access the GitHub API, enabling file operations, repository management, search functionality, andβ¦
Manage repositories, users, releases, and automate GitHub workflows
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Related MCP Servers
- FlicenseAqualityCmaintenanceEnables interaction with GitHub repositories, issues, pull requests, code search, branches, and GitHub Actions workflows.87 npm-
- AlicenseNot gradedqualityDmaintenanceEnables interaction with GitHub API for repository management, commits, pushes, and pulls through natural language.245 npm1ISC
- AlicenseAqualityDmaintenanceEnables querying GitHub repositories for pull requests, commits, and comparisons to understand code changes.53 npmApache 2.0
- FlicenseAqualityDmaintenanceEnables analysis of GitHub Pull Requests, including details, diff, file lists, and review tracking.3-