Ask Claude what your cloud costs.
An MCP server puts real spend data inside Claude Code, so the answer arrives without switching tabs.
- 5 min
- setup, per provider
- 90 days
- history, instantly
- Same-day
- anomaly alerts
- Read-only access
- 14-day free trial
- No credit card required
Spend vs Budget
Forecast $45,000 this month
How does StackSpend handle Claude Cost Analysis?
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 does it work in practice?
- 01
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.
- 02
Add MCP config with your API key. Restart Claude Code. Ask in natural language—Claude uses the tools and returns formatted answers.
- 03
Same API key you use for REST. Scoped to line_items:read, rollups:read, anomalies:read. No additional setup beyond MCP config.
What makes this work?
Price the tools that have no billing API.
Claude Code, Cowork and Office agents emit OpenTelemetry usage straight to a StackSpend endpoint — nothing to install, no credentials stored. Usage is priced per model, user and session as a token-based estimate, and labelled as one.
How it worksEvery model you run, in one lens.
Usage by base model, project and user, in tokens and in API-equivalent value. Estimated and billed usage stay separate, so the numbers never double-count and never pretend to be your invoice.
Business plan
How it worksSee this running against your own bill by tomorrow morning.
Read-only · 5 minutes per provider
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.
What does StackSpend track?
- npm package @stackspend/mcp-server
- MCP tools (line items, daily rollups, anomalies)
- Natural language cost queries
- Same API as REST
- Claude Code and MCP-compatible clients
When does this use case fire?
- 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 does StackSpend do 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
Native tools show you last month. StackSpend tells you tomorrow.
Claude Cost Analysis starts from day one — no manual setup and no threshold tuning required.
Read-only access · Flat plans, never a % of your bill · No credit card required
What do you get when you connect?
- Setup
- Connect StackSpend to Claude via MCP with the same API key you already use.
- Workflow
- Query line items, daily rollups, and anomalies without leaving your coding workflow.
- Access
- Read-only cost data access through scoped MCP tools.
- Use case
- Best for teams that want natural-language cost analysis instead of manual dashboard checks.
Claude Cost Analysis, answered
How do I analyze cloud and AI costs from inside Claude Code?
StackSpend provides an MCP server for Claude Code. Add the MCP config with your StackSpend API key, restart Claude Code, and ask cost questions in plain English — Claude calls the server's tools and returns structured answers without leaving your coding workflow. It exposes get_line_items, get_daily_rollups, and get_anomalies, so "what were our cloud costs last week?" becomes one question instead of a dashboard login.
What is the StackSpend MCP server for Claude Code?
The StackSpend MCP server is an npm package, @stackspend/mcp-server, that exposes your cost data to Claude Code and other MCP-compatible clients as callable tools: get_line_items, get_daily_rollups, and get_anomalies. It lets Claude fetch real, cited cost figures in response to natural-language questions, turning cost analysis into a conversation in the IDE rather than a manual dashboard or curl workflow.
What can I ask the StackSpend MCP server in Claude Code?
You can ask natural-language cost questions like "how much did we spend on OpenAI this month?", "show anomalies from the past 7 days", or "break down last week's cloud costs." Claude maps these to get_line_items, get_daily_rollups, and get_anomalies, then returns formatted, structured answers — so developers and analysts get quick cost insight without context-switching out of Claude Code.
Is the StackSpend MCP server read-only and secure?
Yes. The MCP server uses the same API key as the StackSpend REST API, scoped read-only to line_items:read, rollups:read, and anomalies:read, so Claude can fetch cost data but never write to it or to your provider accounts. There is no setup beyond adding the MCP config with your key, and access is limited to reading the same cost data you already see in StackSpend.
Tomorrow morning: one number, in Slack.
Connect read-only today. Claude Cost Analysis starts from day one — no manual setup, no threshold tuning required.