Review cost from your AI assistant
Connect your AI assistant to Costfluent and ask it the weekly cost questions on spikes, budgets, anomalies, untagged cost, savings and Kubernetes, with a scheduled summary from CI.
By the end of this guide, your AI assistant answers the cost questions your team asks each week from Costfluent's own figures, and a CI job prints a summary on a schedule. It is for the engineers who would rather ask in their editor or terminal than open another app. The path connects the assistant, works through prompts grouped by the job they serve, adds the summary from CI, and ends with what the assistant cannot do. Each step links to the page that owns the detail.
Before you start
- An assistant that runs local MCP servers, such as Claude Code, Claude Desktop, Cursor, VS Code, Codex, Copilot CLI or Gemini CLI.
- An API token from the Read only preset, created as Create a token describes; the MCP page's Before you start says who can create one. Some assistants can use the command line's browser sign-in instead; see Connect your assistant.
- The prompts on spikes, budgets and untagged cost work on the sample data a new organization starts with, and every cost read that covers it says so. Anomalies, savings findings and Kubernetes cost need a real connection, and the Kubernetes prompts a cluster that reports to Costfluent.
1. Connect your assistant
Follow the guide for your assistant from Connect your assistant, or paste the Setup prompt into a new conversation and let the assistant walk you through it. Then ask a first question, such as what you spent on each provider last month. The assistant answers from what the read tools in the MCP page's Tools table return, so check that table for what it can read. Ask good questions lists what makes an answer right the first time: name the period, the workspace and the measure, and use your own report, budget and tag names.
2. Ask about spikes
Ask what moved and when, then what happened on those days. The assistant can set the cost beside your notes and the GitHub deployments and merged pull requests your connections record. To start from a saved report, select Copy as, then Question for an assistant, under More actions on its page; see Use a report in code or with an assistant. The full path is Investigate a cost increase.
Code
Code
3. Ask about budgets
Ask which budgets are at risk or over, and how a budget's periods ended against their amounts. See Budgets and Budget routine.
Code
Code
4. Ask about anomalies
Ask which anomalies were detected and how far the actual cost ran above the expected. Acknowledging one stays in Costfluent unless your organization lets agents change objects (step 9). See Insights and Get told about a cost spike early.
Code
Code
5. Ask about untagged cost
Ask by a tag key your cloud accounts write, such as team or environment, and the assistant groups the cost by its values, with the cost that carries none. See Tags and tag coverage and Raise tag coverage and keep it up.
Code
Code
6. Ask about savings
Ask for the findings in the savings queue, the largest saving first, with their evidence, risk and effort. Setting a finding's status or owner stays in Costfluent unless your organization lets agents change objects. See Savings and Run a savings review.
Code
Code
7. Ask about Kubernetes
Ask which clusters, namespaces or workloads cost the most, how much of their cost was idle, and how the CPU and memory they used compare with what they requested. See Kubernetes efficiency, Kubernetes cost by namespace and team and Reduce Kubernetes idle cost and rightsize workloads.
Code
Code
8. Send a summary from CI
The command line runs each read tool as a command, with the same capability check and result, and prints JSON into a CI log. Give the CI job a token of its own from the Read only preset, kept as a CI secret in COSTFLUENT_API_TOKEN; for a job that must outlive its creator's membership, use a service token. Install the command line in the job as Install describes, and run costfluent list-budgets on your CI's schedule, so each run's log shows your budgets with their current spend and state. Any other read command of the Commands table runs the same way; How it behaves says how a command exits when a call fails, so the job turns red rather than printing nothing.
9. Know what it cannot do
The MCP page's How it behaves owns these limits:
- It reads by default. Its write tools, which create and change annotations, cost reports, budgets, cost alerts and dashboards, acknowledge anomalies and set a savings finding's status and owner, stay off until Let AI agents create and change objects is turned on, and then only for the write capabilities the token carries; Let agents create and change objects says who can turn it on. The command line's browser sign-in never offers them.
- No tool deletes anything or touches a cloud account, so the assistant can find a saving but never stops or resizes a resource.
- A token reads one organization, and a workspace token only its own workspace.
- Kubernetes figures leave out spend in a currency with no exchange rate and the days before your plan's history starts; the result names both, so ask the assistant what a figure does not count.
- Names, tags and descriptions in a result are written by your users and your cloud accounts. The server tells the assistant to treat them as data, never instructions; still, run it in an assistant that asks before any call that changes something.
Check the result
- The assistant answers the first question in step 1 with figures, and can say which filter and dates they came from, so you can open the same numbers in Cost reports.
- Asked which Costfluent tools it can call, the assistant names read tools only while Let AI agents create and change objects is off.
- The CI job's latest log lists your budgets with their state.
Keep it true
Costfluent recommends asking the spike and budget prompts at the start of each week and the savings and Kubernetes prompts once a month, and running the CI summary weekly. Replace the CI job's token before its expiration, and revoke an assistant's token under API tokens when you stop using the assistant.