Build a CI-health monitoring agent with the Claude Agent SDK and GitHub MCP
In this Anthropic cookbook notebook, an agent gets the official GitHub MCP server and is told to look over recent CI runs. It reports failing jobs, flaky patterns and recommended actions ranked by priority.
The problem
On-call engineers spend time digging through workflow runs to figure out what broke and how serious it is. An agent limited to read-oriented GitHub tools can do that first investigation for them.
Steps
- Create a fine-grained GitHub personal access token and save it as GITHUB_TOKEN in .env.
- Install and start Docker Desktop. The GitHub MCP server runs in a container.
- Add the server to the mcp_servers config of ClaudeSDKClient, using a docker command with ghcr.io/github/github-mcp-server.
- Set allowed_tools to mcp__github and disallow Bash, WebSearch and WebFetch.
- Send the CI-health prompt and stream the reply with an async loop.
From the official docs
"Analyze the CI health for facebook/react repository. Examine the most recent runs of the 'CI' workflow and provide: ..."
Results as reported by Anthropic
- A status summary of recent CI runs and what triggered them.
- The failing jobs or tests with a severity assessment, plus notes on long or flaky runs.
- Recommended actions labeled critical, high, medium or low.
- The GitHub MCP server gives the agent over 100 tools across issues, pull requests, CI/CD and security alerts.
These figures are as reported by Anthropic in Claude Cookbook ↗ (Sep 12, 2025). Anthropic sells the product used here. AgentGid did not measure or independently verify them.
This suits a small team with Python and Docker experience that wants a first-pass CI triage for on-call engineers, since setup needs a fine-grained GitHub token and a running Docker container. The SDK is free, but usage is billed through the Claude API or a subscription, so check costs before pointing it at busy repos. LangGraph (Free (OSS)) is an alternative if you'd rather not tie the build to Claude.
The agent used here
Similar use cases
Investigate Prometheus alerts with HolmesGPT and AlertManager
HolmesGPT, the open-source SRE agent in the CNCF Sandbox, connects to your AlertManager, pulls the active alerts and investigates each one against your cluster, then reports a lik…
HolmesGPT fetches all active alerts from AlertManager by default and investigates each of them. (as reported by HolmesGPT)
How Eon unified multi-cloud incident tooling behind one MCP Gateway on AgentCore
Eon, a cloud data protection vendor, replaced per-tool credentials and local MCP servers with a single authenticated MCP gateway on Amazon Bedrock AgentCore. Developers and an aut…
As reported by AWS (guest post co-written with Eon): developer onboarding dropped from 2 days to 2 minutes.
How Cornerstone OnDemand cut database diagnosis time with Strands Agents on Amazon Bedrock
Cornerstone OnDemand's three-person Enterprise DataOps team built Orion AI, a multi-agent system on Amazon Bedrock and Strands Agents, in six months. It speeds up database inciden…
As reported by AWS, database diagnosis time dropped from 45 minutes to 10 minutes, a 78% reduction.
Guides
Sonnet Builds, Opus Reviews, Haiku Reads: Does the Claude Code Advisor Save Money?
A viral post says running Sonnet, Haiku and Opus together in Claude Code gives better code for fewer tokens. We checked it against Anthropic's docs and prices: when the advisor pays off, when it costs more, and why a written plan matters more than the model mix.
Best AI Agent Frameworks in 2026: LangGraph, CrewAI, OpenAI Agents SDK and More
The AI agent frameworks developers actually use, ranked on live downloads and GitHub data, with a plain guide to which one fits Python, TypeScript, multi-agent or Microsoft-stack work.
How to Build an AI Agent: No-Code Builders, Frameworks and SDKs
A practical guide to building your first AI agent: choosing between no-code builders, open-source frameworks and model vendors' SDKs, the core agent loop, tools, guardrails and testing, with live usage data for each option.