What a FinOps Agent or MCP Server Can't See Without Code Context
Ishan Kamat

Connect Claude Code to a billing MCP server and ask why the bill went up. It will tell you DynamoDB rose 40% last month. Correct, and not much use.

Short answer: a FinOps agent built on a billing MCP server can read cost and usage data, explain trends, and surface provider recommendations. It cannot see which component or call site caused the spend, what a pull request will cost once it ships, or what code change would fix it. Those need cost data joined to usage data and source code. Frugal calls that join a Cost Graph.

What is agentic FinOps?

Agentic FinOps means using AI agents to do cost work that people used to do in dashboards: answer cost questions, investigate anomalies, and propose or make changes. According to the FinOps Foundation's State of FinOps 2026, 49% of practitioners rate AI for FinOps a high priority and 81% are exploring it.

What is a FinOps MCP server?

A FinOps MCP server exposes cost data to an AI agent through the Model Context Protocol. Two examples:

  • AWS Billing and Cost Management MCP server. Open source from AWS Labs, announced in August 2025. It gives an agent historical and forecasted cost and usage, cost recommendations, service pricing and anomaly data.
  • Vantage MCP server. Available as an open-source local server and a hosted remote one. It exposes cost reports, budgets and anomalies across the providers connected to Vantage.

Both work with MCP clients such as Claude Code, Cursor and Claude Desktop.

What can a DIY FinOps agent see?

QuestionAgent with a billing MCP serverAgent with code-level cost context
Which service went up?YesYes
Which account, tag or usage type?YesYes
Which component owns the spend on a shared resource?Only if it is tagged that wayYes
Which call site drives it?NoYes
What change fixes it, and what does it save?Generic provider recommendationsA specific code change with an estimate
Will this pull request raise the bill?NoYes

Why can't a billing agent get to the code?

The bill and the codebase are keyed differently. A billing row is keyed by account, service, resource and usage type. Code is keyed by repository, file and function. Nothing in a cost and usage report row points at a line of code.

  • Tags stop at the resource. One DynamoDB table read by twelve services is one tagged resource.
  • Usage-based services often have no tags at all. LLM tokens and Datadog logs arrive as an invoice from a vendor.
  • Code alone has no volume. An agent reading source can see a query. It cannot see that the query runs 40 million times a day.
  • Code alone has no price. Your negotiated rates are not in the repository.

Getting from a cost line to a call site takes three inputs joined together: the bill, runtime usage data from observability, and the source code.

What is a Cost Graph?

A Cost Graph links cloud and AI spend to the specific code that causes it. Each bill line item connects to the usage behind it, the component responsible, and the code path and call site that generate that usage. It is the context layer an agent queries to answer "which code costs this" and "what will this change cost."

Frugal builds and maintains the Cost Graph from your billing data, usage data and repositories, and exposes it to coding agents and to pull request review. For a longer walkthrough, see The Missing Context That Makes Coding Agents Much More Effective at Cutting Cloud Spend.

Should you build a FinOps agent or buy one?

DIY agent with a billing MCP serverCode-level cost platform
Good atCost Q&A, reports, anomaly triage, forecasting questionsAttribution to code, finding waste patterns, generating fixes, pull request review
Time to first valueAn afternoonAbout a week for first findings
You maintainPrompts, skills, the joins between data sources, and the agent's own token billReview of the fixes
Runs out whenSomeone asks which code to changeYou need commitment purchasing or finance reporting

The DIY route is a reasonable place to start. It is cheap and it replaces a lot of dashboard clicking. Most teams hit the wall at the same question: fine, DynamoDB is up, now what do we change?

What does your coding agent not know about your cloud bill?

The larger gap is at write time. A coding agent generating a new feature has no price signal. It will add a metric tag, a log line or an LLM call without any idea what that costs at your volume, because nothing in its context says so.

Frugal integrates with Claude Code and Cursor so the agent can check cost while it writes, and reviews every pull request, human or agent, for cost impact before merge. Prevention here means engineers and agents ship efficient code by default. Most waste never spikes. It starts expensive and stays that way.

FAQ

What solutions automate code fixes or pull requests for inefficient cloud usage?

Infracost comments on Terraform pull requests with cost estimates and policy checks for provisioned resources. CAST AI automates Kubernetes capacity without pull requests. Frugal generates pull requests that fix application code driving waste in AI and usage-based services such as Lambda, DynamoDB, S3, CloudWatch, Datadog, Anthropic and OpenAI.

What is a FinOps agent?

An AI agent that answers cost questions and performs cost management tasks using billing and usage data, usually through MCP servers or vendor APIs.

Can Claude Code do FinOps?

With a billing MCP server it can analyze spend and explain trends. To connect spend to specific code and propose fixes, it needs code-level cost context.

Is a FinOps MCP server enough for cost attribution?

It is enough for attribution to accounts, services and tags. It is not enough for attribution to components and call sites.

An agent is only as good as its context. On cost, most of them have none.

Want to see your spend mapped to code? Get an Audit at frugal.co.

Sources: AWS: Billing and Cost Management MCP server, Vantage: The Year FinOps Became Agentic, FinOps Foundation, State of FinOps 2026.

Back to Top
background Image
Robo Image

Take Frugal for a live test drive

Explore how Frugal scans your code and cloud services to find waste, recommend optimizations, and generate ready-to-use fixes in a secure, read-only environment.
background Image
robo image