From Hours to Minutes: Automating AWS Cost Insights with AI Skills and the Billing and Cost Management MCP Server

From Hours to Minutes: Automating AWS Cost Insights with AI Skills and the Billing and Cost Management MCP Server

Capture your cost reporting workflow once, then run it for any application with a single prompt.

Cowritten by  Rosa Corley 

Your monthly cost insights shouldn’t take hours to pull together. With an AI skill and the AWS Billing and Cost Management MCP server, you can turn that work into a repeatable mechanism that runs with one prompt and produces the same insights every time. And because a skill is just a file, you can share it, so others get the insights they need without waiting for you.


Why is this important? 

A FinOps practitioner wants confidence that the organization spends wisely and captures every savings opportunity. An engineering lead wants their team to run efficiently, with no surprise anomalies. A product owner wants to know what their application costs and whether that spend is earning its keep in business value. Finance wants to know that everyone is staying within budget. They each care about something different, and the data they need lives in different places, from Cost Explorer to Cost Optimization Hub to AWS Budgets. Getting the right view out of each takes tooling knowledge most of them do not have and should not need. So, the work lands on the FinOps practitioner, who rebuilds it every month for multiple different teams. 
AI assistants connected to MCP servers help, but on their own they create a new problem: you retype the same chain of prompts every month and get slightly different results each time. To put it simply, prompting gets you an answer. A skill gets you the same answer next month, and for the next person who asks. 
That second part matters, because cost is everyone’s responsibility, not just the FinOps team’s. Many of the people who need these insights have picked up cost work on top of their day job. A shared skill lets each of them get the view they need without waiting on you. 

What resources are relevant? 

The examples in this post use Kiro, but the pattern is not tied to one tool. Kiro Crew, AWS Quick Desktop, or any other MCP-compatible AI assistant that supports skills or reusable instructions can do the same thing. The skill describes the workflow, and you choose where to run it. 
The following items are required: 
  • AWS Billing and Cost Management MCP server: the open-source server from AWS Labs that provides your AI assistant with access to Cost Explorer, Cost Optimization Hub, Compute Optimizer, AWS Budgets, Savings Plans and Reserved Instance data, anomaly detection, cost categories, and cost allocation tags as tools. Follow the install guide to add it to your AI assistant:  https://awslabs.github.io/mcp/servers/billing-cost-management-mcp-server  AWS service APIs incurs charges on a per-request basis. Each API call made by this MCP server will result in charges to your AWS account. For current pricing information review the respective services API pricing. 
  • Cost Optimization Hub and Compute Optimizer enabled: in the account (or management account) you want insights for. Both are free, but each can take up to 24 hours to produce its first recommendations, so do this a day ahead. 


Figure 1. One prompt, one skill, and the MCP servers it calls produce the same insights every run. 

How to implement 

The example: a one-page insight report for an application 

To make this concrete, we will build a one-page report for Application A, which runs across three AWS linked accounts. The report is a self-contained HTML file anyone can open in a browser. We will build it for this one application first, then convert it into a skill anyone can reuse. It answers seven questions, in this order: 
  1. Executive summary: what someone should know in under a minute. 
  1. Month over month spend variance: how much spend changed, and what drove it. 
  1. Six-month spend trend: whether spend is growing, flat, or shrinking. 
  1. Cost vs. budget: whether the application is on track for the month. 
  1. Top five anomalies: anything unusual across the three accounts. 
  1. Commitment health: Savings Plans and Reserved Instance coverage, utilization, and upcoming expirations. 
  1. Optimization opportunities: the recommendations available, ordered by priority and deadline. 

Once this lives in a skill, anyone can get quick insight into the AWS cost and usage of any application, simply by prompting it with that application’s accounts. No one needs to know which tools has the data or wait on someone else to pull it together. 

Build it one question at a time 

Start by prompting your way to the report, one section at a time. The goal is not to get everything from one prompt, but to get each section exactly right and capture what worked. Begin with month over month spend: 
 Show me the month over month spend for accounts 111111111111, 222222222222, and 333333333333.  
The AI returns what it thinks is best. It might give you only the total change across the three accounts. That is useful, but it is not what the application owner needs: they want to know where the change came from. You could break it down by account, by service, or by region. For this example, we want it by service, so we clarify: 
 Break that down by service, and show the top five services driving the change.  
The same goes for how it looks. Style the report however you want just by asking: a table, a bar chart, a pie chart, even a light and dark mode toggle. Each request becomes part of what you capture later. 
 Show the top five services as a bar chart, with a table of the exact figures underneath.  
Note the wording that got you there, then move onto the six-month trend, cost vs. budget, anomalies, commitment health, and optimization opportunities, refining each until it is right. Finish with the executive summary, and you have a report ready to hand to the application owner. 
The catch: next month you will have to repeat every prompt and clarification, in the same order and wording, to get the same report. The next step solves that. 

Convert your prompts into a skill 

Once the report works for Application A, convert the prompts and clarifications you just worked through into a repeatable, step by step skill the AI follows every time. Each refinement becomes an instruction: "break month over month spend down by service, top five drivers" goes straight into the skill, so no one has to rediscover it. You do not have to write this by hand. Once the report looks right, tell your AI assistant to make it repeatable: 
Turn everything we just did into a reusable skill so I can run this report again later. Make the accounts and budget inputs, keep every clarification and formatting choice, and use the same section order. 
The assistant writes the skill for you. Review it, adjust anything it missed, and save it. A skill is a folder containing a SKILL.md file. The frontmatter tells the assistant when to use the skill; the body tells it how. Here is what the result might look like, saved as .kiro/skills/application-cost-report/SKILL.md: 


Figure 2. Example of an AI skill. 

Three things matter more than they look: 

  1. The description is how the assistant decides to load the skill. Write it with the words people will actually use when they ask. 
  1. The scope comes from the prompt, not the skill. The accounts and budget are inputs, so the same skill works for any application, and it asks for the accounts if they are missing. 
  1. The output order is fixed. The executive summary is written last but shown first, and every run produces the same seven sections in the same order. 


Run it with one prompt 

Open Kiro and ask: 
 Run the application cost report for Application A, accounts 111111111111, 222222222222, and 333333333333, against the application-a-monthly budget.  
Kiro loads the skill and works through the six data steps, calling the MCP server tools it needs. With approvals on, you approve each tool call. A few minutes later you have the HTML report in your workspace, with the same seven sections every time. The skill reports on the last full month by default; to look at an earlier month, just name it in the prompt. 
Here are examples of what it could look like. 


Figure 3. Executive summary and spend and usage: month over month variance, top accounts, six-month trend, and top services. 


Figure 4. Commitment coverage, utilization, and expirations within 90 days, with optimization opportunities ordered by priority. 

Test it before you trust it 

AI can hallucinate, and a cost report is only useful if the numbers are right. The skill tells the AI to use the MCP server’s figures verbatim and never make one up; verify before you share. Check every figure against the console for the same period: spend and trend in Cost Explorer, budget status in AWS Budgets, and recommendations in Cost Optimization Hub. If a number does not match, tighten the instructions in SKILL.md and run it again. 
Anything else you do not like (a section that is too long, a chart that should be a table) goes back into SKILL.md too. After two or three passes, the skill is something you can hand to someone else. 

Make it yours 

Application A is just an example. Because the accounts and budget come from the prompt, you do not edit the skill to report something else. You change the prompt: 
 Run the application cost report for Application B, accounts  
 444444444444 and 555555555555.  
Add or drop sections as your stakeholders need and keep the skill in a shared repo so teammates can pull the latest version and run it for their own applications. Version it like code, because small edits change output. 
Looking further ahead, you do not even need to run it yourself. Many AI tools can run a task on a schedule, so you can have the report created automatically at the start of each month and pair it with a scheduled email to the application owner and other stakeholders. The insights are waiting for them before anyone asks. 

Troubleshooting 

If the report does not look right, start here. 

Symptom 
Likely cause 
Fix 
The AI says the data is not available 
It gave up early or picked the wrong tool 
Name the right tool or filter, ask again, then add that guidance to SKILL.md 
You are not sure the MCP server can pull a metric 
You do not know which tools it exposes 
If the console or API has it, the server most likely does too; check the MCP server docs for its tools and parameters 
Totals from different sections do not match 
Different APIs calculate totals differently 
Show each figure as its own value with a note; do not force them to add up 
No optimization recommendations show up 
Cost Optimization Hub or Compute Optimizer was enabled recently 
Wait up to 24 hours after enabling them, then run the report again 


How this fits with the AWS FinOps Agent 

If you want a managed service with minimal setup, the AWS FinOps Agent is for you. AWS handles the permissions, scheduling, and delivery, so you can get recurring cost insights without building anything yourself. 
A skill gives you something different. It is not only a way to get AWS cost and usage data. You can share it with anyone who needs the same insights, combine it with data from other MCP servers you already use, such as the AWS Pricing MCP server or your own ticketing tools, and run it in the AI tool of your choice. Many teams will use both. 

Summary 

Cost and usage is everyone’s responsibility, but pulling the insights together by hand every month should not be anyone’s job. Build your report one question at a time with an AI assistant and the AWS Billing and Cost Management MCP server, convert what works into a skill, and you have a repeatable mechanism that turns hours of work into minutes, producing the same report with a single prompt. 
From there, share the skill so others can run it for their own applications without waiting on you, and schedule it so the insights arrive before anyone asks. Whether you use Kiro, Kiro Crew, AWS Quick, or another MCP-compatible assistant, the result is the same: less time assembling, and more time acting on what the data tells you. 
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article