Start 14-day free trial

FinOps MCP Server: How SREs Query Multi-Cloud Costs Inside Cursor and Claude

Stop context switching. Learn how SREs use a FinOps MCP server to query live AWS, Azure, and Kubernetes costs directly inside Cursor and Claude.

FinOps MCP Server: How SREs Query Multi-Cloud Costs Inside Cursor and Claude
Figure 1: Architectural overview of FinOps MCP Server: How SREs Query Multi-Cloud Costs Inside Cursor and Claude.

Model Context Protocol (MCP) bridges the critical gap between AI-driven development and live infrastructure telemetry. By integrating the CostGlass FinOps MCP server, platform engineers and SREs can query real-time multi-cloud costs, active anomalies, and Kubernetes namespace spend directly inside Cursor, Claude Desktop, or Claude Code. This shifts cost optimization left to the exact moment code is written, stopping budget overruns before resources are deployed.

Traditional FinOps workflows require engineers to constantly switch context. When drafting a Terraform configuration or scaling an Amazon EKS deployment, you must log into a third-party dashboard, run a complex query, or wait for a weekly Slack alert to see if your changes will spike the bill.

By bringing live financial data directly into the IDE, engineers can make cost-conscious decisions as they write code. This guide explores how to leverage a FinOps MCP server to query unified multi-cloud costs, why DIY implementations are an expensive engineering trap, and how this workflow protects SaaS gross margins.


Shifting FinOps Left: The SRE Workflow in Cursor

When writing code inside Cursor or chatting with Claude, you can now query your infrastructure spend in real time. Instead of guessing the monthly run-rate impact of upgrading an instance type, you simply ask the AI.

For example, when refactoring an AWS resource block, an engineer can prompt Claude:

"Check our current AWS compute spend for the staging environment and tell me if we have any active EC2 rightsizing recommendations we can apply to this Terraform file."

Using the CostGlass MCP server, the AI queries your live, normalized cross-cloud billing ledger, matches the resources in your workspace, and replies:

"Your staging AWS compute spend is currently $4,120/month. I found a pending rightsizing recommendation for m7g.2xlarge instances in this Terraform file. Downsizing them to m7g.xlarge based on p95 CPU utilization will save $1,240/month. Would you like me to update the Terraform configuration?"

This interaction transforms FinOps from a passive, retrospective accounting task into an active, automated engineering practice.


The Build vs. Buy Trap: Why DIY FinOps Pipelines Fail

Some platform teams attempt to build an in-house FinOps MCP server by writing custom scripts that query raw cloud billing exports (like AWS CUR 2.0 or Azure MCA exports) and exposing them to LLMs. This approach quickly turns into a fragile, high-maintenance engineering burden.

The Fragility of Raw Billing Schemas

Raw cloud billing files contain millions of rows of un-normalized, highly complex data. AWS CUR 2.0, Azure Billing Profiles, and Google Cloud BigQuery exports use entirely different schemas, naming conventions, and resource formats. LLMs struggle to parse these massive datasets directly, leading to severe hallucinations, slow response times, and massive token costs.

The Maintenance Burden

To keep a DIY MCP server functioning, your team must continuously maintain an ETL pipeline to aggregate, deduplicate, and normalize cross-cloud data. Any change to a cloud provider's billing schema breaks your integration. Furthermore, calculating complex metrics like amortized costs, commitment coverage, and Kubernetes pod-level allocation requires a custom-built calculation engine.

The Turnkey Alternative

CostGlass solves this instantly out-of-the-box. Instead of writing and maintaining complex data pipelines, CostGlass connects to 13 native multi-cloud, container, and SaaS integrations (including AWS, Azure, GCP, Kubernetes OpenCost, Snowflake, and Datadog) and normalizes the data every 6 hours.

The CostGlass MCP server (@costglass/mcp) queries this clean, pre-aggregated ledger. Your AI assistants receive structured, audit-ready data instantly, ensuring highly accurate, hallucination-free financial insights.


C-Suite Business Case: IDE-Level FinOps as a Gross Margin Safeguard

For CFOs, CTOs, and VPs of Engineering, bringing FinOps into the IDE is a powerful strategy for protecting SaaS gross margins and EBITDA.

Typically, cloud cost management is reactive. Finance identifies a budget spike at the end of the month, raises a ticket, and engineers spend hours auditing logs to find the culprit. By the time the issue is resolved, thousands of dollars have been wasted.

By integrating cost intelligence into the software development lifecycle (SDLC), you establish a proactive safety net:

  • Preventative Optimization: SREs identify and remediate over-provisioned resources before they are pushed to production.
  • No Jira Backlog Sprawl: Instead of generating hundreds of passive alerts that sit in Jira for months, engineering teams execute rightsizing and scheduling recommendations during active development.
  • Protected Unit Economics: Engineers can monitor SaaS unit economics (such as cost per tenant or cost per API request) directly from their terminal, ensuring new feature rollouts do not erode product profitability.

How CostGlass Compares to Legacy FinOps Platforms

Legacy FinOps tools are built for retrospective finance reporting, not real-time SRE execution. They lock you into opaque, annual-only contracts and charge a percentage-of-spend "tax" that penalizes your infrastructure growth.

CostGlass is built for modern engineering teams, offering a predictable, flat monthly fee, a fast 6-hour data refresh rate, and native AI/MCP integrations.

Feature / Capability CostGlass CloudZero Vantage Finout
Pricing Model Flat monthly fee (Keep 100% of savings) Opaque, annual contract lock-in Tiered by tracked spend Opaque, annual contract lock-in
SaaS & AI Connectors 13 Native (AWS, Azure, K8s, OpenAI, Snowflake) Limited SaaS connectors Limited SaaS connectors Extra add-on fees
Data Refresh Rate Every 6 hours 24 hours 12 to 24 hours 24 hours
FinOps MCP Server Native (@costglass/mcp) None None None
Hands-On SRE Execution 8 hours/mo included (Scale plan) None (Software-only) None (Software-only) None (Software-only)
Kubernetes Cost Allocation Included in flat pricing Included Included +25% mandatory add-on fee

Configuring the CostGlass MCP Server in 3 Steps

Setting up @costglass/mcp takes less than five minutes. It connects securely to your CostGlass account using a read-only API key, ensuring your cloud financial data is accessed safely.

Step 1: Generate a CostGlass API Key

Log into your CostGlass dashboard, navigate to #settings:api-keys, and generate a secure, read-only API key (cg_live_...). This key is scoped to your organizational hierarchy, ensuring fail-closed security.

Step 2: Configure Claude Desktop or Cursor

Add the CostGlass MCP configuration to your local settings file. For Claude Desktop, open your claude_desktop_config.json file (located in your app data directory) and add the following block:

{
  "mcpServers": {
    "costglass": {
      "command": "npx",
      "args": [
        "-y",
        "@costglass/mcp"
      ],
      "env": {
        "COSTGLASS_API_KEY": "cg_live_your_secure_api_key_here"
      }
    }
  }
}

For Cursor, navigate to Settings > Features > MCP, click + Add New MCP Server, set the type to command, and enter the following configuration:

  • Name: CostGlass
  • Command: npx -y @costglass/mcp

Step 3: Query Your Live Multi-Cloud Costs

Once connected, your AI assistant can execute native tools to fetch live financial data. SREs can run natural language queries directly in the chat panel:

  • "What was our total Kubernetes namespace spend across all clusters last week?"
  • "Show me any cost anomalies detected in our Azure subscriptions in the last 48 hours."
  • "Do we have any idle databases or unattached volumes we can clean up in our OCI or AWS environments?"

Frequently Asked Questions

Is the CostGlass MCP server secure?

Yes. The @costglass/mcp server utilizes a read-only API key generated from your secure CostGlass account. It has zero mutation privileges, meaning your AI assistant can query costs and recommendations but cannot modify, delete, or provision any cloud resources directly without your explicit, manual authorization.

Does it support Kubernetes and SaaS costs?

Yes. Because CostGlass normalizes all integrations into a unified ledger, the MCP server can query costs across AWS, Azure, GCP, Kubernetes (via OpenCost), Snowflake, Datadog, and SaaS / AI token spend (OpenAI and Anthropic).

Can I run this in a private, self-hosted environment?

Absolutely. For regulated enterprises with strict security requirements, CostGlass can be deployed privately inside your own AWS account and VPC (BYOC). You can run the MCP server locally or within your private network, ensuring zero financial telemetry ever leaves your cloud boundary.

Ready to bring real-time cost intelligence directly into your development workflow? Connect your cloud accounts in five minutes with our read-only integration. Explore CostGlass Pricing to find the perfect plan for your team, or read our CostGlass API Keys Documentation to set up your secure MCP server today.

Ready to unify your multi-cloud costs?

See your AWS, Azure, GCP, and Kubernetes spend in canonical FOCUS 1.0 in under 15 minutes.

Start 14-day free trial →

More from the blog

View all →