Ask cost questions in Claude Code. Get real answers without switching tabs.
StackSpend provides an MCP server for Claude Code. Connect with your API key and Claude can fetch line items, daily rollups, and anomaly data directly. Ask questions like "What were my cloud costs last week?" or "Show anomalies from the past 7 days" and get structured answers without leaving your coding workflow.
How it works in practice
StackSpend MCP server exposes get_line_items, get_daily_rollups, and get_anomalies as MCP tools. Claude Code can call them when you ask cost questions.
Add MCP config with your API key. Restart Claude Code. Ask in natural language—Claude uses the tools and returns formatted answers.
Same API key you use for REST. Scoped to line_items:read, rollups:read, anomalies:read. No additional setup beyond MCP config.
When this use case fires
Answering "why did cloud spend go up last week?" requires switching tabs and manually filtering
A developer wants cost context while debugging a slow API but has to open a separate dashboard
Cost review slips because nobody wants to context-switch out of the coding workflow
Finance asks for a spend breakdown and the developer has to export CSVs from multiple dashboards
Cost data is in dashboards and APIs. You have to log in or run curl to get answers. Natural language queries would be faster.
Developers and analysts need quick cost insights without switching contexts. "How much did we spend on OpenAI this month?" should be one question.
Integrating cost data into workflows requires custom scripting. No out-of-the-box way to ask an AI assistant.
How StackSpend does this
Dashboard tabs and CSV exports is built for different jobs. Here is what StackSpend adds.
Dashboard tabs and CSV exports
- Context switching to a cost dashboard interrupts the development workflow
- No natural language interface — every cost question requires manual navigation
- CSV exports for analysis are manual and require separate tooling
- Cost data is not available in the IDE where spending decisions are made
StackSpend
- Ask cost questions in natural language while staying in the Claude Code workflow
- Claude fetches real cost data via MCP tools — no context switching required
- Works with your existing StackSpend API key and read-only permissions
- Line items, rollups, and anomalies available as structured data on demand
What we track
Who uses this
Developers who want cost answers inside Claude Code instead of another dashboard tab.
Teams that already use StackSpend data and want natural-language investigation in their coding workflow.
Buyers evaluating whether MCP access is a faster path than building custom internal cost tooling.
Frequently asked
What providers does claude code cost analysis work with in StackSpend?
How does StackSpend power claude code cost analysis?
How quickly can I set up claude code cost analysis?
Set it up in 5 minutes. Know by tonight.
Connect your providers with read-only access. Claude Code Cost Analysis starts from day one — no manual setup, no threshold tuning required.