Back to Blog
GuideApr 30, 20269 min read

AI for DevOps: GitHub, Cloudflare and Sentry in One Agent

MP

MCP Playground

MCP Playground

๐Ÿ“– TL;DR

  • Three official MCP servers: GitHub (api.githubcopilot.com/mcp/), Cloudflare (mcp.cloudflare.com/mcp), Sentry (mcp.sentry.dev/mcp)
  • One agent that correlates a Sentry error โ†’ finds the GitHub commit that caused it โ†’ confirms the Cloudflare deployment
  • Token requirements: GitHub PAT (repo scope) ยท Cloudflare API token ยท Sentry auth token
  • Start from the Sentry Error Triage template and add GitHub + Cloudflare as extra servers

The DevOps incident loop is always the same: a Sentry alert fires, you open GitHub to find the offending commit, you check Cloudflare to see what deployed and when, then you create a ticket. Four tabs, fifteen minutes, before you have even started the fix.

This guide shows you how to collapse that loop into a single AI agent using the official MCP servers from GitHub, Cloudflare and Sentry.

What You Can Do With This Stack

Error-to-commit tracing

"What new Sentry errors appeared after the last deploy, and which GitHub commit is most likely responsible?"

Deployment verification

"What changed in the last Cloudflare Worker deployment and are there new Sentry errors since it went live?"

PR review assist

"Summarise open PRs in repo X, flag any that touch files related to existing Sentry issues."

Cloudflare health check

"List Cloudflare Worker routes that might be misconfigured and check for error rate spikes in the last hour."

Incident summary

"Summarise the incident: what broke in Sentry, what the last GitHub commits were, what changed on Cloudflare."

Release diff

"Compare commits between the last two GitHub release tags and check if any Sentry issues opened in that window."

The Three Official MCP Servers

Tool MCP Server URL Transport Token
GitHub https://api.githubcopilot.com/mcp/ HTTP Personal access token (repo scope)
Cloudflare https://mcp.cloudflare.com/mcp HTTP Cloudflare API token
Sentry https://mcp.sentry.dev/mcp HTTP Auth token (Settings โ†’ Auth Tokens)

Step 1 โ€” Get Your Three Tokens

GitHub fine-grained personal access token

  1. Go to GitHub โ†’ Settings โ†’ Developer settings โ†’ Personal access tokens โ†’ Fine-grained tokens โ†’ Generate new token
  2. Set repository access to the repos you want the agent to read
  3. Under Permissions add: Contents (read), Pull requests (read), Issues (read) โ€” add write to these if you want the agent to create issues or comment on PRs
  4. Copy the token โ€” it begins with github_pat_

Classic personal access tokens (prefix ghp_) also work with the GitHub MCP server, but fine-grained tokens are recommended because you can scope them to specific repositories.

Cloudflare API token

  1. In Cloudflare go to My Profile โ†’ API Tokens โ†’ Create Token
  2. Use the Edit Cloudflare Workers template, or create a custom token with Workers Scripts:Read, Account:Read and Zone:Read at minimum
  3. Copy the token

Sentry auth token

  1. In Sentry go to Settings โ†’ Auth Tokens โ†’ Create New Token
  2. Select scopes: project:read, event:read, org:read
  3. Copy the token

Step 2 โ€” Connect in Agent Studio

Start from the Sentry template, then add GitHub and Cloudflare

The Sentry Error Triage template has the Sentry server pre-wired. Open it, paste your Sentry token, then click + Add Server twice to add GitHub and Cloudflare.

Use Sentry Error Triage Template โ†’

To wire all three from scratch in MCP Agent Studio:

  1. Click + Add Server โ†’ https://api.githubcopilot.com/mcp/, select HTTP, paste GitHub token
  2. Add second server โ†’ https://mcp.cloudflare.com/mcp, select HTTP, paste Cloudflare token
  3. Add third server โ†’ https://mcp.sentry.dev/mcp, select HTTP, paste Sentry token
  4. Choose a model โ€” Claude Sonnet 4.6 handles multi-step incident chains (Sentry โ†’ GitHub diff โ†’ Cloudflare deployment) well; DeepSeek V4 Pro is a strong cheaper choice for structured lookups

The Incident Workflow in Practice

YOU

"What new errors appeared in Sentry in the last hour and which is the most critical?"

AGENT

Queries Sentry, returns a ranked list of new issues with affected users and severity.

YOU

"Walk me through issue PROJ-1234 โ€” what broke and which commit likely caused it?"

AGENT

Pulls the Sentry stack trace, cross-references the file path with recent GitHub commits, returns the most likely offending commit with author and diff summary.

YOU

"What Cloudflare Worker deployment happened around that commit time?"

AGENT

Lists Cloudflare Worker deployment history, confirms which Workers version went live and what routes it affects.

That entire chain โ€” from "what broke" to "here is the commit and the deployment" โ€” runs in under 60 seconds with no tab switching.

Which Model to Use

  • Claude Sonnet 4.6 โ€” best for incident chains that require reading a Sentry stack trace, reasoning about file paths and cross-referencing with GitHub diffs. The reasoning quality on complex error analysis is noticeably better than cheaper models.
  • DeepSeek V4 Pro โ€” strong for structured queries: listing PRs, listing Cloudflare Worker routes, checking deployment history. Significantly cheaper than Sonnet for these lookups.
  • Claude Haiku 4.5 โ€” fast for quick single-server Sentry or GitHub queries when you need a rapid answer during an incident.

Set up your DevOps agent in minutes

GitHub ยท Cloudflare ยท Sentry โ€” official MCP servers ยท No local install ยท Free credits on sign-up

Frequently Asked Questions

Does this work with GitHub Enterprise? +
The GitHub MCP server at api.githubcopilot.com works with github.com accounts. For GitHub Enterprise Server (self-hosted), check GitHub's MCP documentation for enterprise endpoint configuration โ€” the server URL will differ.
Can the agent create GitHub issues or comment on PRs? +
Yes, if your token includes write permissions for Issues and Pull requests. Fine-grained tokens let you scope write access to specific repositories, which is safer for production.
Which Cloudflare products does the MCP server expose? +
The Cloudflare MCP server exposes Workers, KV, R2, D1, Pages and account analytics. Available tools depend on your account plan and the scopes on your API token. Workers and account analytics are accessible on free plans.
Can I save this 3-server stack as a reusable agent? +
Yes. Click Save Agent after configuring your three servers, model and system prompt. It appears in My Agents and restores all settings automatically every time you open it.

Related Guides

MP

Written by MCP Playground

15+ years in product development. AI enthusiast building developer tools that make complex technologies accessible to everyone.

Test any MCP server with 30+ AI models โ€” free

Connect any MCP endpoint and chat with Claude, GPT-5, Gemini, DeepSeek and more. Watch every tool call live.

โœฆ Free credits on sign-up ยท no credit card needed

Try for Free โ†’