ci-guardian
Provides GitHub integration for reviewing pull requests and triaging CI failures, interacting with repositories, PRs, and workflow runs through the GitHub API.
Integrates with GitHub Actions to automatically trigger headless Claude runs for PR review and CI failure triage whenever a PR is updated or a CI run completes.
Click on "Install 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., "@ci-guardianReview PR #12 and triage the CI failure."
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.
ci-guardian
A Python MCP server plus a GitHub Actions integration that lets headless Claude
review PRs and triage CI failures on a real GitHub repository, with every
GitHub write action routed exclusively through the MCP server (never raw
git/gh), and that boundary enforced structurally via Claude Code hooks
rather than left as a prompt-level suggestion.
Status
Phase 0 — Scaffold and ground rules
Phase 1 — The ops MCP server (github plugin)
Phase 2 — Hooks and permissions (structural, not advisory)
Phase 3 — Headless Claude: PR review and CI-failure triage
[~] Phase 4 — GitHub Actions: the loop closes itself (deployed, live trigger pending a real
CLAUDE_CODE_OAUTH_TOKEN— see below)Phase 5 — Large mechanical change, proposed as a draft PR (capstone)
Related MCP server: claude-beacon
Layout
src/ci_guardian_mcp/ # the MCP server package
tests/ # unit tests (mocked GitHub client, no live API calls)
scripts/ # headless entry points + live smoke test (Phase 1+)
.github/workflows/ # the Actions workflow that triggers headless Claude (Phase 4)
.claude/settings.json # PreToolUse/PostToolUse hooks (Phase 2)Local dev
python -m venv .venv
./.venv/Scripts/python.exe -m pip install -e ".[dev]"
./.venv/Scripts/python.exe -m pytest -q
./.venv/Scripts/python.exe -m ruff check .
./.venv/Scripts/python.exe -m mypy --strict src/Headless Claude (Phase 3+)
scripts/review_pr.sh <repo> <pr_number> and
scripts/triage_ci_failure.sh <repo> <run_id> each run a single
claude -p "..." --mcp-config .mcp.json --permission-mode bypassPermissions --output-format json invocation, no human in the loop. Two choices worth
calling out:
--mcp-config .mcp.jsonpoints Claude at this project's MCP server explicitly (.mcp.jsonin the project root) rather than relying on auto-discovery, so headless runs don't depend on whatever's configured globally.--permission-mode bypassPermissionsskips the interactive tool-approval prompt, which would otherwise hang forever with no human to answer it. This is safe specifically because Phase 2's hooks are a separate enforcement layer that still runs regardless of permission mode — bypassing the "ask a human" gate doesn't bypass the PreToolUse hooks that block force-pushes,gh pr merge, blind patches, etc. That's the whole point of building hooks as a structural boundary rather than a permission-prompt convention: it's what makes an unattended run safe to leave running.
Both scripts need the claude CLI on PATH, a resolvable GitHub token
(same resolution as the MCP server itself: GITHUB_TOKEN/GH_TOKEN, or
gh auth login already run), and Claude Code's own auth. In GitHub
Actions (Phase 4) that's a CLAUDE_CODE_OAUTH_TOKEN repo secret — a
long-lived token from claude setup-token (needs an interactive Claude
subscription login, so it's generated on a real machine, not a runner)
rather than a raw ANTHROPIC_API_KEY.
Live status: .github/workflows/ci-guardian.yml is deployed to
ci-guardian-sandbox
and its plumbing is proven live — checkout, pip install, and the Claude
Code CLI install all succeeded on a real run
(#4). The
CLAUDE_CODE_OAUTH_TOKEN secret is currently a placeholder
(PLACEHOLDER_SET_YOUR_REAL_CLAUDE_CODE_OAUTH_TOKEN), so the claude -p
step will fail auth until it's replaced with a real token from
claude setup-token (interactive, needs a Claude subscription — run it on
a real machine, then gh secret set CLAUDE_CODE_OAUTH_TOKEN --repo dishagupta2901/ci-guardian-sandbox with the printed value). Once that's
set, pushing any commit to an open PR (or opening a new one) re-triggers
review-pr for real, and pushing a branch with a failing test triggers
triage-ci-failure once its CI run completes.
Tool transport: PyGithub, not the gh CLI
The MCP server talks to GitHub through PyGithub (dependencies in
pyproject.toml), not by shelling out to gh. Reasoning:
Testability without a subprocess boundary. Phase 1 requires unit tests against a mocked GitHub client with zero real API calls in
pytest -q. Mocking a Python object (Github(...)) withunittest.mock/pytest-mockis direct; mocking a CLI means faking subprocess exit codes and parsing its stdout/stderr, which is slower to write and easier to get subtly wrong.Typed responses map cleanly onto the required Pydantic models. Every tool in Phase 1 must return a typed Pydantic model and raise a typed
ToolErroron failure. PyGithub gives structured objects (PullRequest,WorkflowRun,GithubExceptionwith a real status code) to build those from;gh's JSON output would need re-parsing and its error signal is a shell exit code plus stderr text, which is a worse fit for the{not_found, invalid_input, upstream_timeout, upstream_unavailable, rate_limited, conflict}taxonomy this project requires.No dependency on an external binary being installed/authenticated on every host. The MCP server is meant to run inside a GitHub Actions job in Phase 4; a pure-Python HTTP client (PyGithub) only needs a token in the environment.
ghwould need to be installed andgh auth login'd (orGH_TOKENwired through) in every environment the server runs in, duplicating auth plumbing the MCP server already needs for its own client.Trade-off acknowledged: the
ghCLI is what Phase 2's hooks are written against — hooks block the agent from callinggit push --force,gh pr merge,gh pr edit --add-label auto-mergeetc. directly via Bash. That's a separate concern from what the MCP server uses internally: the hooks close off the raw-shell bypass path regardless of which library sits behind the MCP tools.
PyGithub is added to pyproject.toml dependencies now; no tool
implementation lands until Phase 1.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityFmaintenanceEnables Claude or any MCP client to drive the GitHub Copilot cloud agent via its REST API, allowing it to research, edit, and open pull requests on repositories without manual intervention.11MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that pushes GitHub Actions CI/CD results and PR events into Claude Code sessions, enabling automatic investigation and remediation.131MIT
- FlicenseNot gradedqualityBmaintenanceEnables claude.ai to connect to GitHub MCP using OAuth, providing full toolset for repository, issue, PR, Actions, and gist operations.
- FlicenseNot gradedqualityBmaintenanceEnables AI assistants to interact with GitHub issues, pull requests, and Actions workflows through MCP tools.
Related MCP Connectors
AI code review for GitHub PRs with an MCP autofix loop for Claude Code and Cursor
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dishagupta2901/ci-guardian'
If you have feedback or need assistance with the MCP directory API, please join our Discord server