Cloud Guardian
Documentation menu

Cloud Guardian in Codex

Bring saved cloud infrastructure, costs, Vercel billing, and project context into your Codex chat. The Cloud Guardian plugin bundles setup and cost-review skills with a local Model Context Protocol (MCP) server.

Plugin package 0.1.3 uses MCP runtime 0.1.2. Package documentation and skills can update independently of the binary; the install commands below pin the runtime explicitly.

The local plugin works with Codex desktop and Codex CLI. Compatible desktop hosts can also show the native cloud cost overview and project mentions. Text tools work when those app features are unavailable. This local stdio connection does not connect ChatGPT on the web.

Install the plugin

On macOS or Linux, install the MCP binary, add the repository marketplace, and install the plugin:

curl -fsSL https://raw.githubusercontent.com/skunkworq/cloud-guardian-plugin/main/install.sh -o /tmp/install-cloud-guardian-mcp.sh
bash /tmp/install-cloud-guardian-mcp.sh --version v0.1.2
export PATH="$HOME/.local/bin:$PATH"
codex plugin marketplace add skunkworq/cloud-guardian-plugin --ref main
codex plugin add cloud-guardian@cloud-guardian

The installer places cg-mcp in ~/.local/bin and verifies the release checksum. The plugin looks for cg-mcp on PATH, then in ~/.local/bin. Start a new Codex session after installation so the bundled skills and tools are available.

For an upgrade, rerun the runtime installer, then run codex plugin marketplace upgrade cloud-guardian and codex plugin add cloud-guardian@cloud-guardian. Restart the MCP connection and start a new chat. A marketplace update alone does not replace the installed binary or a running server.

This is a Cloud Guardian repository marketplace. Installing from it does not require a listing in the official plugin directory. See OpenAI's plugin guide for the Codex plugin browser and supported hosts.

Private repository access

If you use a private fork of the marketplace, authenticate GitHub CLI with an account that has access, then install from a local clone. Substitute your fork's repository name:

gh repo clone OWNER/cloud-guardian-plugin
bash ./cloud-guardian-plugin/install.sh --version v0.1.2
export PATH="$HOME/.local/bin:$PATH"
codex plugin marketplace add ./cloud-guardian-plugin
codex plugin add cloud-guardian@cloud-guardian

Use only the MCP server

For Codex without the bundled skills, install the binary with the command above and register its absolute path:

codex mcp add cloud-guardian -- "$HOME/.local/bin/cg-mcp"

Choose either the plugin connection or this standalone connection to avoid loading duplicate tools. An absolute path also avoids PATH differences when launching a desktop app. Other local MCP clients can use a stdio entry such as this, replacing the path with the installed binary's actual location:

{
  "mcpServers": {
    "cloud-guardian": {
      "command": "/absolute/path/to/cg-mcp"
    }
  }
}

The installer and browser sign-in support macOS and Linux. Windows cross-builds are available in the MCP release assets for development; the Windows browser sign-in flow is not implemented yet.

First run: sign in and choose an organization

For Vercel-only billing exploration, skip to Explore Vercel costs: it uses the local Vercel CLI login and does not require a Cloud Guardian session. The sequence below applies to saved Cloud Guardian infrastructure and costs.

Choose cloud-guardian:setup in the Codex skills picker, or invoke it in a prompt:

$cloud-guardian:setup
Sign me in, show my organizations, and open the saved cost overview
for the organization I choose.

The first-run sequence is:

  1. Call cg_login and complete Google sign-in in the browser.
  2. Call cg_whoami to verify the account and organization memberships.
  3. Call cg_list_organizations, then choose the organization to use.
  4. Call cg_open_overview with that explicit org_id.

For example, after selecting an organization:

{ "org_id": "YOUR_ORG_ID" }

Use the same org_id in subsequent tools that accept it. Defaults can choose an organization automatically, so explicit scope is especially useful when you belong to more than one. Login tokens are stored at ~/.config/cloud-guardian/auth.json and refreshed automatically.

Setup reads existing Cloud Guardian data. Connecting a new provider, requesting a fresh scan, planning remediation, and executing a change are separate actions. See authentication and workflows for the next steps.

Native overview and project mentions

Cloud Guardian implements the OpenAI MCP extensions. Availability depends on the host's support for app entry points and composer mentions.

  • Open Cloud cost overview from the app sidebar or a chat tab when the host offers those entry points, or call cg_open_overview directly.
  • The cg_overview_app sidebar/chat entrypoint opens immediately. A sole organization loads automatically; with multiple organizations, choose one before loading projects and costs. The viewer shows your account email and lets you switch organizations. Pass org_id to open a specific organization directly. Viewer selection does not change other tools' defaults.
  • Saved data is cached separately for each sign-in session and organization. Full results are fresh for 30 seconds; the app can show a snapshot for the same organization up to five minutes old while updating, with its load time visible. Refresh retries the selected organization, including after a failed switch. Normal token renewal preserves the cache; a new sign-in invalidates it.
  • Search and page through connected projects without rendering the entire inventory at once.
  • Monthly run-rate figures are in USD; billing-derived costs, scanner estimates, free-tier credits, incomplete pricing, and freshness remain visible. Opening or refreshing the overview does not trigger a provider scan.
  • Search projects in the composer's mention picker when available. Search matches project names, cloud identifiers, GitHub repositories, and organization names, slugs, and IDs, returning at most 20 results shared across matching organizations. Multi-organization results include organization labels.
  • Select a project to share its reference with the chat, or choose Ask about this project when the host supports messages.

Project references use authenticated resources at cloudguardian://orgs/{org_id}/projects/{project_id}. Hosts that support app deep links can use /orgs/{org_id} or /orgs/{org_id}/projects/{project_id}. The overview is embedded in the MCP binary. Its Cloud Guardian overview reads saved data; the separate Vercel explorer runs only when you request it. cg_open_overview also returns a text summary for clients without app support.

An unknown price is not a confirmed zero cost. Review pricing coverage and observation age before treating a monthly run-rate estimate as a complete bill.

Explore Vercel costs

MCP runtime 0.1.2 can query Vercel billing immediately using your existing local CLI login. Install a current Vercel CLI, run vercel login, and verify with vercel whoami. No Cloud Guardian login, organization, persistent connector, or scan is required for cg_explore_vercel_costs.

$cloud-guardian:cloud-costs
Explore Vercel costs for team YOUR_TEAM_SLUG_OR_ID.
Show billed and effective costs with project and service details.

In the native overview, enter the team slug or ID and choose Explore Vercel costs. It makes no automatic Vercel query when the view opens. Costs appear in a separate panel with their period and are not added to resource monthly run-rate. Optional paired from_date and to_date use YYYY-MM-DD calendar dates in America/Los_Angeles. See the Vercel workflow for tool examples. For saved inventory and billing, separately request persistent onboarding with an explicit Cloud Guardian organization, team_... ID, and dedicated API token.

Bundled skills and tools

SkillUse it for
cloud-guardian:setupSet up Vercel CLI exploration or sign in to Cloud Guardian, choose an organization, inspect connections, and open existing data
cloud-guardian:cloud-costsExplore Vercel billing, investigate saved costs and violations, and review specifically authorized remediation

Check the installed names in Codex's skills picker if using a fork or customized plugin.

Tool categoryExamples
Identity and organizationscg_login, cg_whoami, cg_list_organizations
Projects and connectionscg_list_org_projects, cg_list_connectors, provider onboarding tools
Saved infrastructure and costscg_get_infrastructure_status, cg_get_cost_trend, cg_get_cost_breakdown
Immediate Vercel billingcg_explore_vercel_costs with a team slug or ID
Overview and project referencescg_overview_app, cg_open_overview, cg_search_mentions
Scans and remediationcg_trigger_scan, cg_plan_remediation, cg_execute_remediation

The full tools reference lists parameters and required fields. The plugin page provides the short installation and onboarding guide.