Back to Blog
MCP // DEVOPS × AI

Building a MCP: Giving AI Hands in Your CI/CD Pipeline

I built a cloud-hosted Model Context Protocol server so ChatGPT and Claude can look straight into your GitHub repos: check CI/CD failures, review pull requests, and spit out workflow configs, all without you leaving the chat window.

September 5, 2026
·5 min·Pratik Patil
MCPAICloud

01The Problem: Context Switching Hell

Every engineer knows this workflow intimately. Your pipeline breaks. Now you go through the ritual:

WITHOUT MCP — MANUAL WORKFLOW
Developer
↓ open browser
GitHub → Actions tab
↓ scan for failed run
Expand failed job
↓ scroll through logs
Find the error line
↓ copy-paste to ChatGPT
Understand the cause
↓ edit CI config
Commit → push → wait
↓ repeat if still broken

That's 8–10 steps of context switching before you even start fixing anything. And the worst part is you still had to manually copy-paste your error logs into the AI. It couldn't look at your actual GitHub. It only knew what you handed it.

The problem was never that ChatGPT is bad at reading CI failures. It's that ChatGPT can't see them in the first place.

02What is MCP?

MCP stands for Model Context Protocol, an open standard for letting AI models call external tools. Think of it as an API layer sitting between an assistant and the outside world.

Without MCP, ChatGPT is basically a brain in a jar. Smart, but cut off from your actual systems. MCP gives it hands: access to specific tools you define, with real limits on what it's allowed to touch.

MCP CONCEPT
ChatGPT / Claude
The Brain
MCP
The Hands
GitHub
The System

03Architecture: Brain, Hands, and System

Here's the full architecture of the MCP as I built it:

SYSTEM ARCHITECTURE
            ChatGPT / Claude
                   │
                   │  MCP Protocol
                   ↓
    ┌──────────────────────────────┐
    │            MCP               │
    │                              │
    │ devops-mcp.pratikpatil.tech  │
    └──────────────┬───────────────┘
                   │
            GitHub REST API
                   │
       ┌───────────┼───────────┐
       ↓           ↓           ↓
  Repositories  Actions   Pull Requests
Layer 1 — AI Client
ChatGPT or Claude connects to the MCP endpoint, auto-discovers the available tools, and decides on its own when to call them.
Layer 2 — MCP Server
MCP server, deployed on Manufact Cloud at devops-mcp.pratikpatil.tech. It receives tool calls from the AI and turns them into GitHub API requests.
Layer 3 — MCP Tools
Specific, named tools the AI can call: github_repo_info, github_actions_status, github_actions_failure, github_workflow_logs, github_pr_review, generate_github_actions.
Layer 4 — GitHub API
The MCP talks to GitHub's REST API using an OAuth access token, pulling real repository data, workflow runs, job logs, and PR diffs.

04What the MCP Can Do

The current version focuses on GitHub and CI/CD. Here are the tools it exposes:

github_repo_infoRepository Inspection
> "Check the status of my GitHub repository."

Pulls repository metadata: visibility, default branch, stars, open issues, last pushed date. Good for confirming repo state without opening a browser.

github_actions_statusGitHub Actions Status
> "What's the latest GitHub Actions run?"

Lists recent workflow runs with their status (success, failure, cancelled). You can filter by branch or workflow file.

github_actions_failureFailure Analysis
> "Why did my latest pipeline fail?"

This is the flagship feature. The MCP pulls the failed run, finds the failing jobs, grabs their logs, and hands the AI enough data to pinpoint the root cause and suggest a fix.

github_workflow_logsWorkflow Log Inspection
> "Show me the logs for run #247."

Fetches raw logs for a specific workflow run ID, for when you want to dig into one particular run instead of the most recent one.

github_pr_reviewPull Request Review
> "Review PR #25."

Pulls the PR diff, changed files, and existing review comments, so the AI can give code review feedback without you leaving the chat.

generate_github_actionsWorkflow Generation
> "Create a CI pipeline for my Python FastAPI app."

Generates .github/workflows/*.yml files for Python, Node.js, Java, or Docker projects, complete with checkout, build, test, and deploy steps.

pratik@ops-console — failure analysis
PIPELINE STATUS
❌Build — Failed
❌Docker Build — Failed
⏭Deploy — Skipped
AI DIAGNOSIS
The deployment failed because the Docker image
reference contains uppercase characters.
Docker image names must be lowercase.
- ghcr.io/Pratik02-07/FastAPI-CI-CD
+ ghcr.io/pratik02-07/fastapi-ci-cd

05How It Works End-to-End

Say you type: "Check my latest GitHub Actions pipeline."

REQUEST FLOW
YOU—type the message
ChatGPT / Claude—decides a tool call is needed
github_actions_status—tool is called by the AI
MCP—receives the tool call
GitHub REST API—actual HTTP request is made
Workflow runs data—returned as JSON
MCP—formats and returns to AI
ChatGPT / Claude—generates human-readable answer
YOU—get the explanation
The AI decides when a tool call is worth making. The MCP does the actual work outside the chat.

The AI doesn't magically know about your GitHub. It knows about the tool, and chooses to call it. From there, the MCP handles the actual GitHub communication and hands back structured data the AI can reason over.

GENERATED WORKFLOW EXAMPLE
name: CI

on:
  push:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup Python
        uses: actions/setup-python@v5

      - name: Install dependencies
        run: pip install -r requirements.txt

      - name: Run tests
        run: pytest

06Why OAuth Matters

The MCP endpoint is publicly reachable at devops-mcp.pratikpatil.tech/mcp. That doesn't mean anyone who stumbles on it can touch my GitHub repositories, though.

ChatGPT
   ↓
  MCP
   ↓
OAuth authentication  ← GitHub asks: "Who is this user?"
   ↓
User grants access    ← "Pratik authorized this app"
   ↓
Access token issued
   ↓
GitHub API (authenticated)
Security boundary

OAuth answers one question: "Who is this user, and are they allowed to use the DevOps MCP?" The GitHub connection is what gives the MCP permission to call GitHub at all. The OAuth token then scopes exactly which repositories and actions that permission covers.

07Custom Domain & Cloud Deployment

The MCP runs on Manufact Cloud and sits behind a custom subdomain instead of a throwaway deployment URL.

               Internet
                  │
                  ↓
  devops-mcp.pratikpatil.tech
                  │
                  ↓
           Manufact Cloud
                  │
                  ↓
             MCP Server
                  │
       ┌──────────┴──────────┐
       ↓                     ↓
    GitHub API          MCP Clients
                     (ChatGPT / Claude)

That makes it a proper cloud-hosted MCP service instead of something running off my laptop. Any compatible MCP client, whether that's ChatGPT, Claude Desktop, or a custom integration, can connect, authenticate, and start using the DevOps tools right away.

08Making the MCP Context-Aware

One limitation in the current version: even with GitHub connected and authenticated, the tools still make you spell out the repository every single time. So instead of just asking:

"Show me my recent GitHub Actions runs"

you currently have to say something closer to:

"Check Pratik02-07/devops-mcp, workflow ci.yml, branch main, limit 10."

The fix is making every parameter optional and letting the tool figure the rest out on its own. There's a distinction worth pulling apart here:

GitHub Connection
"Who am I and what am I allowed to access?"
— solved by OAuth
Repository Discovery
"What repository should I operate on?"
— needs context-awareness

The ideal tool signature makes everything optional:

typescript— optional parameters with discovery fallback
// All parameters are optional
interface ActionsInput {
  repository?: string   // auto-discovered if not given
  workflow?:   string   // listed from repo if not given
  branch?:     string   // defaults to repo's default branch
  limit?:      number   // defaults to 10
}

async function githubActionsStatus(input: ActionsInput) {
  // Step 1: resolve repository
  if (!input.repository) {
    input.repository = await discoverRepository()
    // → lists accessible repos, picks most relevant
  }

  // Step 2: resolve workflow
  if (!input.workflow) {
    const workflows = await listWorkflows(input.repository)
    // → returns all .yml files in .github/workflows/
  }

  // Step 3: fetch runs
  return await fetchWorkflowRuns(input)
}

With that in place, going from intent to result stays simple:

CONTEXT-AWARE RESOLUTION
"Show failures for my DevOps MCP"
↓ AI calls github_actions_failure()
MCP: resolves "DevOps MCP" → Pratik02-07/devops-mcp
↓ lists workflows automatically
MCP: discovers ci.yml, deploy.yml
↓ fetches failed runs
MCP: returns failed jobs + logs
↓ AI reasons over data
Root cause + fix returned to user

09Why MCP Instead of Just Asking ChatGPT?

This is the part that actually matters. It's not about what the AI knows. It's about what it can reach.

Without MCP
Developer
↓ opens GitHub manually
Copy error logs
↓ paste into ChatGPT
ChatGPT analyzes it
The AI only sees what you copy-paste. Manual, and easy to mess up.
With MCP
Developer
↓ types one sentence
ChatGPT
↓ calls MCP tool
GitHub data retrieved
↓ AI reasons over it
Developer gets answer
The AI pulls its own data. No copy-paste, fewer mistakes.

Here's the full list of what the MCP exposes right now: the actual actions the AI can take.

MCP Tool Registry6 tools active
github_repo_info
Inspect repositories
View repository metadata, visibility, default branch, and activity.
github_pr_review
Review pull requests
Inspect diffs, changed files, and review comments.
github_actions_status
Check GitHub Actions
List recent workflow runs, filtered by workflow or branch.
github_actions_failure
Diagnose failed workflows
Retrieve failed jobs/logs and identify likely root causes and fixes.
github_workflow_logs
Inspect workflow logs
Fetch failed-job logs for a specific run.
generate_github_actions
Generate GitHub Actions workflows
Create workflow configuration for Python, Node.js, Java, or Docker projects, including Docker, Kubernetes, or AWS deployments.
Worth noting: none of these tools modify your repository or deploy anything on their own. They read, analyze, and generate. Give the AI a repo URL, a PR number, a workflow run ID, or some project details, and it takes it from there.

Honestly, the tools themselves are the less interesting part. What I actually got out of this was practice building the pattern behind them: connecting an AI model to a real system through something structured and auditable, instead of just pasting text back and forth all day.

MCP itself is still young, and a lot of this will probably look different in a year. But giving a model hands instead of just a voice is clearly where this is headed, and this project was my first real attempt at building that.

Try the DevOps MCP
devops-mcp.pratikpatil.tech/mcp
View Source