Skip to main content
You already debug your infrastructure inside a coding agent. CostGraph’s MCP puts cost data, pricing, and recommendations right next to it. On first connect your browser opens app.costgraph.ai: sign in with your CostGraph account if needed, pick a tenant, and approve.

Prerequisites

  • A CostGraph account with an active billing plan. For non-OAuth capable clients, an API key from your account settings.
MCP access requires an active billing plan. Set up billing in the CostGraph platform before connecting.

Connect your agent through OAuth or API key

Running headless or in CI, where a browser sign-in is not an option? Create an API key from your account settings and send it in the X-API-Key header instead, as shown in the following tabs.
Pick your agent and drop in the config.
Add CostGraph to ~/.codex/config.toml to sign in by using OAuth:
Or, with an API key:
After it’s connected, head to Usage to put it to work.

FAQ

No. CostGraph is read-only over MCP. It hands back recommendations, pricing, and your inventory. Your agent, using its own git or kubectl access, is what actually applies a change or opens a PR.
Interactive clients sign in with your CostGraph account and use a short-lived token that refreshes itself. Headless and CI setups send a bl_ API key in the X-API-Key header. Either way, every read is scoped to your own tenant, so an agent only ever sees your data.
Every connected client is listed under Settings > Connected apps. Revoking one cuts off that client immediately. API keys can be deactivated or rotated at any time from Settings.
Cost recommendations, live pricing, and your tenant’s inventory and metrics. See Usage for the kinds of questions that maps to.