MCP Workflows

Common workflows using Cloud Guardian MCP tools with Claude Code.

Infrastructure Health Check

1. cg_whoami                          → Verify auth and org context
2. cg_get_infrastructure_status       → See all resources and violations
3. cg_list_cost_alerts                → Check for cost anomalies
4. cg_get_cost_breakdown              → Identify top cost drivers

Cost Investigation

1. cg_get_cost_trend days=30          → View 30-day cost trend
2. cg_get_cost_breakdown sort_by=cost → Top resources by cost
3. cg_get_resource_cost_history       → Drill into specific resource
4. cg_get_savings_summary             → See verified savings

Fix a Violation

1. cg_get_infrastructure_status       → Find violations
2. cg_plan_remediation                → See what would be fixed
3. cg_execute_remediation id=...      → Execute the fix
4. cg_get_infrastructure_status       → Verify fix applied

Onboard a New Project

1. cg_create_connector                → Upload SA key for the project
2. cg_test_connector id=...           → Verify permissions
3. cg_list_org_projects               → See current projects
4. cg_onboard_gcp_project             → Link project to org
5. cg_trigger_scan                    → Run first scan
6. cg_get_project_status              → See scan results

Batch Remediation

1. cg_list_remediation_actions status=pending  → See pending fixes
2. cg_batch_execute_remediation                → Execute all pending
3. cg_get_savings_summary                      → Track savings

Operational Health

1. cg_get_operational_health          → System-wide health metrics
2. cg_list_scan_logs                  → Recent scan cycles
3. cg_system_diagnostics              → Debug system state

Tips

  • Most tools accept an org_id parameter to scope to a specific organization
  • Use cg_list_organizations to find your org ID
  • Remediation actions can be executed in dry_run mode first
  • Cost data is available after at least one scan cycle completes