Skip to main content
Glama
USE_CASE.mdโ€ข11.8 kB
# Iris MCP Use Cases: CI/CD Integration This document outlines real-world use cases for Iris MCP's reverse tunneling capability, focusing on CI/CD pipeline integration with varying levels of autonomy. ## Overview Iris MCP's bidirectional orchestration enables CI/CD systems (running remotely) to coordinate with local development teams through SSH reverse tunneling. This allows for intelligent, context-aware workflows that bridge the gap between automated builds and human developers. ## The Autonomy Spectrum Different organizations have different risk tolerances and trust levels for autonomous actions. Iris MCP supports a spectrum from fully manual to highly autonomous workflows: ``` Manual โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บ Autonomous โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ Human-Gated Assisted Semi-Autonomous Full-Auto ``` --- ## Use Case 1: Human-Gated (Manual Approval) **Scenario**: Production build fails on critical authentication module **Workflow**: ``` 1. CI/CD Build Fails (main branch) โ””โ”€> Error: TypeError: Cannot read property 'token' of undefined at AuthService.validate (auth.service.ts:42) 2. CI/CD wakes team-jenova via reverse MCP โ””โ”€> Message: "๐Ÿšจ Production build failed on commit abc123 Module: authentication Error: TypeError in AuthService.validate File: auth.service.ts:42 Priority: HIGH - blocking production deployment" 3. team-jenova receives alert and investigates โ””โ”€> Reads error logs โ””โ”€> Reviews recent commits โ””โ”€> Identifies root cause 4. team-jenova fixes the issue locally โ””โ”€> Updates auth.service.ts โ””โ”€> Runs local tests to verify fix โ””โ”€> Commits changes 5. team-jenova creates Pull Request โ””โ”€> PR #143: "Fix: Handle missing token in AuthService" โ””โ”€> Links to failed build โ””โ”€> Includes test results 6. **HUMAN REVIEW REQUIRED** โ† Critical gate โ””โ”€> Senior developer reviews code โ””โ”€> Security team reviews auth changes โ””โ”€> QA verifies test coverage 7. Human approves and merges PR 8. CI/CD automatically rebuilds and deploys ``` **Characteristics**: - โœ… Automated notification and context delivery - โœ… Autonomous investigation and diagnosis - โœ… Autonomous fix generation and PR creation - โŒ **Human approval required for merge** - **Best for**: Production code, security-critical modules, regulatory compliance --- ## Use Case 2: Assisted (Claude Investigates, Human Decides) **Scenario**: Integration tests fail intermittently on staging **Workflow**: ``` 1. CI/CD Nightly Build Reports Flaky Tests โ””โ”€> Test: "User login flow" failed 3/10 runs Last 24h failure rate: 30% 2. CI/CD wakes team-backend via reverse MCP โ””โ”€> Message: "โš ๏ธ Flaky test detected: User login flow Failure rate: 30% (3/10 runs) Last passed: 6 hours ago Possible race condition or timing issue" 3. team-backend investigates autonomously โ””โ”€> Analyzes test logs across all 10 runs โ””โ”€> Identifies timing variance in async operations โ””โ”€> Compares successful vs failed runs โ””โ”€> Generates diagnostic report 4. team-backend reports findings to developers โ””โ”€> Creates detailed investigation report โ””โ”€> Suggests fix: Add explicit wait for auth token โ””โ”€> Proposes code changes with diff 5. **HUMAN REVIEWS PROPOSAL** โ† Decision gate โ””โ”€> Developer reads investigation report โ””โ”€> Reviews proposed fix โ””โ”€> Decides: approve, modify, or reject 6. If approved: team-backend creates PR โ””โ”€> Human merges after final review ``` **Characteristics**: - โœ… Automated investigation and root cause analysis - โœ… Autonomous diagnostic report generation - โœ… Suggested fixes with code diffs - โŒ **Human decides whether to proceed** - **Best for**: Non-blocking tests, investigation-heavy issues, learning scenarios --- ## Use Case 3: Semi-Autonomous (Auto-PR with Human Gate) **Scenario**: Dependency updates fail during automated maintenance **Workflow**: ``` 1. CI/CD Weekly Dependency Update Build Fails โ””โ”€> Package: @types/node updated 18.x โ†’ 20.x Breaking change: fs.promises.readFile signature changed 2. CI/CD wakes team-dependencies via reverse MCP โ””โ”€> Message: "๐Ÿ“ฆ Dependency update failed: @types/node Version: 18.x โ†’ 20.x Impact: 12 type errors in file operations Policy: Auto-fix allowed for dependency updates" 3. team-dependencies autonomously fixes type errors โ””โ”€> Updates fs.promises.readFile calls (12 files) โ””โ”€> Updates type annotations โ””โ”€> Runs type checker to verify โ””โ”€> Runs unit tests to verify behavior 4. team-dependencies creates PR automatically โ””โ”€> PR #144: "chore: Fix type errors for @types/node 20.x" โ””โ”€> Includes: changelog, test results, type check output โ””โ”€> Auto-labels: "dependencies", "autogenerated" 5. CI/CD runs full test suite on PR โ””โ”€> All tests pass โœ“ โ””โ”€> Type checking passes โœ“ โ””โ”€> Linting passes โœ“ 6. **HUMAN REVIEW** (but streamlined) โ””โ”€> Developer sees: "Auto-fix PR - all checks passed" โ””โ”€> Quick review of changes (diff is clean) โ””โ”€> Approves and merges 7. Optional: Auto-merge if org policy allows โ””โ”€> "Auto-approve PRs from team-dependencies IF: labeled 'dependencies' AND: all CI checks pass AND: no security alerts" ``` **Characteristics**: - โœ… Fully autonomous fix generation and PR creation - โœ… Autonomous testing and validation - โš ๏ธ **Human approval recommended but streamlined** - โš ๏ธ **Optional auto-merge with strict policies** - **Best for**: Dependency updates, code formatting, documentation fixes --- ## Use Case 4: Full-Autonomous (Trusted Patterns Only) **Scenario**: Documentation typos detected in CI/CD spelling check **Workflow**: ``` 1. CI/CD Runs Spelling/Grammar Check on Docs โ””โ”€> Found 5 typos in README.md โ””โ”€> Found 2 grammar issues in API.md 2. CI/CD wakes team-docs via reverse MCP โ””โ”€> Message: "๐Ÿ“ Documentation issues detected Severity: LOW Auto-fix policy: ENABLED for docs" 3. team-docs fixes issues autonomously โ””โ”€> Corrects typos in README.md โ””โ”€> Fixes grammar in API.md โ””โ”€> Runs spell checker to verify 4. team-docs creates PR automatically โ””โ”€> PR #145: "docs: Fix spelling and grammar" โ””โ”€> Auto-labels: "documentation", "auto-fix" 5. CI/CD auto-merges PR (policy-based) โ””โ”€> Condition 1: Source is team-docs โœ“ โ””โ”€> Condition 2: Files match pattern: **.md โœ“ โ””โ”€> Condition 3: No security implications โœ“ โ””โ”€> Condition 4: All CI checks pass โœ“ โ””โ”€> **AUTO-MERGE APPROVED** 6. Notification sent to team โ””โ”€> "FYI: Auto-merged documentation fixes (PR #145)" โ””โ”€> Developers can review post-merge if desired ``` **Characteristics**: - โœ… Fully autonomous fix, PR, and merge - โœ… No human interaction required - โš ๏ธ **Strict policy enforcement required** - โš ๏ธ **Limited to low-risk changes only** - **Best for**: Documentation, formatting, linting auto-fixes, typos --- ## Policy Configuration Examples ### Conservative Policy (High-Risk Codebase) ```json { "autoApproval": { "enabled": false, "allowedTeams": [], "allowedPatterns": [], "requireHumanReview": true } } ``` ### Balanced Policy (Typical Production App) ```json { "autoApproval": { "enabled": true, "allowedTeams": ["team-docs", "team-dependencies"], "allowedPatterns": [ "**.md", // Documentation "package-lock.json" // Dependency updates ], "blockedPatterns": [ "**auth**", // Never auto-merge auth code "**security**" // Never auto-merge security code ], "requireAllChecks": true, "requireHumanReview": { "production": true, "staging": false } } } ``` ### Aggressive Policy (Internal Tools / Experimental) ```json { "autoApproval": { "enabled": true, "allowedTeams": ["team-docs", "team-dependencies", "team-backend", "team-frontend"], "allowedPatterns": ["**"], "blockedPatterns": [ "**security**", "**secrets**", ".env*" ], "requireAllChecks": true, "requireHumanReview": false, "notifyOnMerge": true // Still send notifications } } ``` --- ## Advanced Scenarios ### Scenario A: Multi-Team Coordination ``` CI/CD detects API breaking change โ†“ CI/CD wakes team-backend (API owners) โ†“ team-backend proposes fix โ†“ team-backend wakes team-frontend: "API change requires frontend updates" โ†“ team-frontend updates API calls โ†“ Both teams create PRs that link together โ†“ Human reviews coordinated changes โ†“ Both PRs merged together (atomic deployment) ``` ### Scenario B: Rollback Automation ``` CI/CD detects production error spike after deployment โ†“ CI/CD wakes team-oncall โ†“ team-oncall analyzes error logs and recent deployments โ†“ team-oncall determines: last deploy (PR #142) caused issue โ†“ team-oncall creates revert PR automatically โ†“ team-oncall notifies on-call engineer: "Proposed rollback ready" โ†“ Engineer reviews and approves (or overrides) โ†“ Rollback deployed within minutes ``` ### Scenario C: Security Vulnerability Response ``` Security scanner detects CVE in dependency โ†“ CI/CD wakes team-security โ†“ team-security analyzes vulnerability impact โ†“ team-security checks for available patch โ†“ team-security updates dependency and runs tests โ†“ team-security creates URGENT PR with security label โ†“ **HUMAN SECURITY REVIEW REQUIRED** (always) โ†“ Security team approves emergency merge ``` --- ## Trust Progression Over Time As AI capabilities improve and teams build confidence, the autonomy level can increase: **Phase 1: Learning** (Months 1-3) - All PRs require human approval - Claude generates reports and suggestions - Humans learn to trust the analysis **Phase 2: Selective Automation** (Months 4-6) - Auto-merge for documentation and dependencies - Assisted mode for bug fixes - Human review for logic changes **Phase 3: High Trust** (Months 7+) - Auto-merge for non-critical modules - Semi-autonomous for most fixes - Human review only for critical paths **Key Principle**: Start conservative, measure outcomes, increase automation based on demonstrated reliability. --- ## Metrics to Track To determine appropriate autonomy levels: ``` - **Accuracy Rate**: % of autonomous fixes that pass human review - **False Positive Rate**: % of flagged issues that weren't real problems - **Time Saved**: Hours of developer time saved vs manual investigation - **Rollback Rate**: % of auto-merged PRs that required rollback - **Coverage**: % of build failures that were auto-resolved ``` **Safe thresholds for increasing autonomy**: - Accuracy Rate > 95% - Rollback Rate < 2% - False Positive Rate < 10% --- ## Conclusion Iris MCP's reverse tunneling enables a **spectrum of autonomy** in CI/CD workflows. Teams can start conservative with human-gated approvals and progressively increase automation as trust builds. The key insight: **Autonomous investigation and PR creation are valuable even when human approval is required.** The speed and context preservation alone justify the integration, and full automation becomes an option as AI capabilities improve. **The future is already here** - it's just a matter of configuring the right trust policies for your organization's risk tolerance.

Latest Blog Posts

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/jenova-marie/iris-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server