GitHub Actions MCP Server
Integrates with GitHub's API to list repositories, workflows, runs, artifacts, and deployments, enabling comprehensive repository and CI/CD management.
Provides full control over GitHub Actions CI/CD pipelines, including listing and managing workflows, fetching logs, diagnosing failures with AI, rerunning/canceling workflows, tracking deployments, and monitoring repositories in real time.
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 Actions MCP Server Why did the CI pipeline fail on main?"
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.
GitHub Actions MCP Server
An intelligent MCP (Model Context Protocol) server that gives AI agents full control over GitHub Actions CI/CD pipelines — including real-time monitoring, log analysis, AI-powered failure diagnosis, and deployment management.
Why This Exists
Most GitHub MCP servers let AI agents read files, create issues, and manage pull requests.
But they can't touch your CI/CD pipelines.
Capability | Existing GitHub MCPs | This Server |
List workflow runs | ❌ | ✅ |
Fetch execution logs | ❌ | ✅ |
Diagnose failures with AI | ❌ | ✅ |
Rerun / cancel workflows | ❌ | ✅ |
Track deployments & rollback | ❌ | ✅ |
Monitor repos in real time | ❌ | ✅ |
This server closes that gap — enabling autonomous DevOps agents that can monitor, diagnose, and act on your pipelines without human intervention.
Related MCP server: Agentic CI/CD MCP Orchestrator
Features
13 purpose-built MCP tools covering the full CI/CD lifecycle
AI-powered failure analysis — sends parsed logs to Claude, returns root cause + suggested fixes + severity
Real-time pipeline monitoring — polling-based watcher with configurable interval
Full workflow control — rerun (all or failed jobs only), cancel, watch until completion
Deployment management — list environments, track statuses, trigger rollbacks
Artifact handling — list and get pre-signed download URLs
Secure by design — tokens never logged or exposed in responses
Docker-ready — multi-stage build for production deployment
Demo
Ask Claude (or any MCP-compatible AI agent):
"Why did my CI pipeline fail on the main branch?"The agent will automatically:
Fetch the latest failed workflow run
Retrieve and parse the execution logs
Send the error context to Claude for analysis
Return a structured diagnosis:
{
"probableCause": "npm peer dependency conflict between react@18 and testing-library@13",
"suggestedFixes": [
"Add --legacy-peer-deps to your npm install command",
"Upgrade @testing-library/react to v14",
"Pin react to v17 until dependencies are resolved"
],
"severity": "high",
"diagnosticReport": "The build failed during dependency installation due to an unresolvable peer conflict introduced in the last commit. This is a common issue when mixing React 18 with older testing utilities."
}Prerequisites
Node.js 20+
GitHub Personal Access Token with scopes:
repo,workflow,read:org
→ Create at github.com/settings/tokensAnthropic API Key for Claude-powered analysis
→ Get at console.anthropic.com
Quick Start
# 1. Clone the repository
git clone https://github.com/muhammedehab35/GITOPS-MCP/tree/main
cd github-actions-mcp
# 2. Install dependencies
npm install
# 3. Configure environment
cp .env.example .env
# Fill in GITHUB_TOKEN and ANTHROPIC_API_KEY in .env
# 4. Build
npm run build
# 5. Test with MCP Inspector
npx @modelcontextprotocol/inspector node dist/index.jsConnect to Claude Desktop
Find your config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add this configuration:
{
"mcpServers": {
"github": {
"command": "node",
"args": ["/absolute/path/to/github-actions-mcp/dist/index.js"],
"env": {
"GITHUB_TOKEN": "ghp_your_token_here",
"ANTHROPIC_API_KEY": "sk-ant-your_key_here",
"POLLING_INTERVAL_MS": "30000",
"LOG_LEVEL": "info"
}
}
}
}Restart Claude Desktop. You'll see the 🔨 tools icon — the server is connected.
Available Tools
Repositories
Tool | Description |
| List all repositories accessible with your token, with language, stars, and visibility |
Workflows
Tool | Description |
| List all GitHub Actions workflows defined in a repository |
| List recent runs with filters for status, branch, and count |
| Get full details of a run including all job statuses and timing |
| Poll a run every 10s until completion or 5-minute timeout |
Logs & Analysis
Tool | Description |
| Fetch and parse per-job logs with automatic error extraction |
| AI diagnosis — root cause, fixes, severity, and diagnostic report via Claude |
Actions
Tool | Description |
| Rerun a workflow — all jobs or failed jobs only |
| Cancel a workflow that is queued or in progress |
Artifacts
Tool | Description |
| List artifacts or get a pre-signed download URL for a specific one |
Deployments
Tool | Description |
| List deployments by environment with latest status |
| Create a new deployment pointing to a previous stable ref |
Monitoring
Tool | Description |
| Start / stop continuous polling of a repo for workflow changes |
Environment Variables
Variable | Required | Default | Description |
| ✅ | — | GitHub Personal Access Token ( |
| ✅ | — | Anthropic API key for Claude-powered failure analysis |
| ❌ |
| How often |
| ❌ |
| Log verbosity: |
Docker
# Start with Docker Compose (reads from .env automatically)
docker-compose up -d
# Or build and run manually
docker build -t github-actions-mcp .
docker run --env-file .env github-actions-mcpDevelopment
npm run dev # Run with tsx (no build step needed)
npm run build # Compile TypeScript to dist/
npm start # Run compiled output
npm test # Run all tests (Vitest)
npm run typecheck # TypeScript type check without emittingRunning Tests
npm test✓ tests/modules/logs-analyzer.test.ts (5 tests)
✓ tests/modules/ai-engine.test.ts (2 tests)
✓ tests/tools/repositories.test.ts (2 tests)
✓ tests/tools/workflows.test.ts (3 tests)
Test Files 4 passed (4)
Tests 12 passed (12)Architecture
src/
├── index.ts # FastMCP server — wires all 13 tools
├── config/
│ └── env.ts # Zod-validated environment config
├── modules/
│ ├── auth/
│ │ └── github-auth.ts # GitHub PAT → Octokit instance
│ ├── connector/
│ │ └── github-rest.ts # All GitHub REST API calls (Octokit)
│ ├── logs/
│ │ └── logs-analyzer.ts # Log parsing & error pattern detection
│ ├── ai/
│ │ └── ai-engine.ts # Claude API — failure diagnosis
│ └── monitoring/
│ └── workflow-monitor.ts # Polling-based repo watcher
└── tools/
├── repositories.ts # github_list_repositories
├── workflows.ts # github_list_workflows, list_runs, get_run
├── watcher.ts # github_watch_workflow
├── logs.ts # github_get_workflow_logs, analyze_failure
├── actions.ts # github_rerun_workflow, cancel_workflow
├── artifacts.ts # github_download_artifacts
├── deployments.ts # github_get_deployments, rollback_deployment
└── monitor.ts # github_monitor_repositoryHow github_analyze_failure works
Agent calls github_analyze_failure(owner, repo, runId)
│
├─► getWorkflowRun() → confirm conclusion = "failure"
├─► getWorkflowRunJobs() → identify failed jobs
├─► getJobLogs() × N → fetch raw log text
│
├─► LogsAnalyzer.parseWorkflowLogs() → extract failed steps + errors
├─► LogsAnalyzer.extractErrorContext() → get surrounding log lines
│
└─► AIEngine.analyzeFailure() → send to Claude
│
└─► Returns: probableCause · suggestedFixes · severity · diagnosticReportRoadmap
Web dashboard for real-time pipeline visualization
Slack / webhook notifications on workflow events
GitLab CI/CD support
Azure DevOps connector
Self-healing pipelines (auto-rerun with AI-suggested fixes)
Multi-repository aggregated dashboard
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change.
Fork the repository
Create your feature branch (
git checkout -b feat/amazing-feature)Commit your changes (
git commit -m 'feat: add amazing feature')Push to the branch (
git push origin feat/amazing-feature)Open a Pull Request
License
MIT — see LICENSE for details.
Available Tools
13 toolsgithub_analyze_failureA
Automatically analyze a failed GitHub Actions workflow run using AI. Returns the probable cause, suggested fixes, severity, and a diagnostic report.
Inputs: repo (required), owner (required), runId (required).
github_cancel_workflowA
Cancel a workflow run that is currently queued or in progress.
Inputs: repo (required), owner (required), runId (required).
github_download_artifactsA
List and get download URLs for artifacts produced by a workflow run. Returns artifact names, sizes, and pre-signed download URLs.
Inputs: repo (required), owner (required), runId (required), artifactId.
github_get_deploymentsA
List deployments for a repository, optionally filtered by environment. Returns deployment ID, environment, status, ref, and creator.
Inputs: repo (required), owner (required), environment.
github_get_workflow_logsA
Retrieve and parse the execution logs for a specific workflow run. Returns structured per-job logs with error extraction.
Inputs: repo (required), owner (required), runId (required).
github_get_workflow_runA
Get detailed information about a specific workflow run, including its jobs and their statuses.
Inputs: repo (required), owner (required), runId (required).
github_list_repositoriesA
List GitHub repositories accessible with the current token. Returns name, description, language, stars, visibility, and last update time.
Inputs: type.
github_list_workflow_runsA
List recent runs of a GitHub Actions workflow, with optional filters for status and branch.
Inputs: repo (required), owner (required), branch, status, +2 more.
github_list_workflowsA
List all GitHub Actions workflows defined in a repository.
Inputs: repo (required), owner (required).
github_monitor_repositoryB
Start or stop continuous monitoring of a repository's GitHub Actions. Returns the list of currently monitored repositories.
Inputs: repo (required), owner (required), action.
github_rerun_workflowA
Rerun a GitHub Actions workflow. Use mode 'all' to rerun the entire workflow, or 'failed' to rerun only the failed jobs.
Inputs: repo (required), owner (required), runId (required), mode.
github_rollback_deploymentA
Roll back to a previous deployment by creating a new deployment pointing to a specific ref and marking the current deployment as inactive.
Inputs: ref (required), repo (required), owner (required), environment (required), +1 more.
github_watch_workflowA
Watch a workflow run until it completes (or times out after 5 minutes). Polls every 10 seconds and returns the final status and conclusion.
Inputs: repo (required), owner (required), runId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool targets a distinct resource or action within GitHub Actions: repositories, workflows, workflow runs, logs, failure analysis, reruns, cancellations, artifacts, deployments, rollback, and monitoring. Even the closely related watch and get run tools are clearly separated by their blocking versus snapshot behavior.
All tools follow the github_verb_noun pattern with snake_case, but there are minor deviations: github_watch_workflow actually watches a run, and github_analyze_failure omits the specific object. These are small inconsistencies in an otherwise predictable naming scheme.
13 tools is well-scoped for a GitHub Actions MCP server, covering the essential operational workflows without unnecessary bloat. The count fits comfortably within the ideal 3-15 range and each tool serves a clear purpose.
The tool set covers the core run lifecycle (list, get, logs, rerun, cancel, watch), plus artifacts and deployment rollback. However, it lacks the ability to manually trigger a workflow run (workflow_dispatch), which is a notable gap for a GitHub Actions server, though not a fatal one.
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Devopness MCP server for DevOps happiness! Empower AI Agents to deploy apps and infra, to any cloud.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Create, deploy, and operate MCP servers directly from your GitHub repositories.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceAn MCP server that enables developers to summon AI development team agents directly from their IDE to help with tasks like PR reviews, security evaluation, and CI/CD deployment setup.-
- FlicenseNot gradedqualityDmaintenanceAn MCP server that diagnoses GitHub Actions workflow failures and automatically creates repair pull requests using LLM-generated unified diffs. It includes a governance layer to orchestrate autonomous fixes or human-reviewed repairs based on risk assessment thresholds.-
- AlicenseAqualityAmaintenanceAn MCP server that gives AI agents full visibility and control over your Dagster instance, enabling autonomous monitoring, diagnosis, and remediation of data pipelines.1710,101 PyPI18MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to directly manage GitHub repositories, including PRs, issues, and code search, using natural language.MIT