cost_getLABSCO SUMMARY
One spend question, three bills.
The work it removes is reconciliation: cloud and model spend live in different consoles with different date pickers, and here they answer the same question over the same range.
What it is
A TypeScript MCP server that unifies cost data from AWS, OpenAI and Anthropic: one call for spend across every configured provider, plus per-provider, trend, breakdown, period-comparison and provider-comparison tools. Responses are cached to keep the providers' billing APIs from being hit repeatedly, and credentials come from environment variables.
What you get
- Costs for any date range, filtered to one provider or taken across all of them
- Daily, monthly or total granularity, with service-level breakdowns
- Which providers are currently configured, and whether they are responding
- Cached results, so a repeated question does not cost another billing API call
- Automatic retry with exponential backoff when a provider is slow
Requirements
A recent Node.js, and credentials for each provider you want counted, supplied as environment variables. A provider you leave unconfigured simply does not appear in the answer.
Setup effort
Build from source — git clone https://github.com/knishioka/cost-management-mcp.git
USE CASES
Answering what we spent last month
One call across every configured provider for the range you name.
Finding which service is driving the cloud bill
Take the AWS costs at service-level breakdown rather than as a single total.
Watching model spend as it accrues
Read daily granularity for the last stretch, so a change of model shows up before the invoice does.
Telling a low number from a missing provider
List which providers are actually configured — one that never connected reports nothing, which reads the same as cheap.
9 tools
Listed in project docs. Your client may show a different list.
provider_listopenai_costsanthropic_costsaws_costsprovider_comparecost_trendscost_breakdowncost_periodsBEFORE YOU INSTALL
What to know first
Tools you get
9 tools named in the project's documentation.
Requires
- Node.js 18 or higher
- AWS_ACCESS_KEY_ID in your environment
- AWS_SECRET_ACCESS_KEY in your environment
- OPENAI_API_KEY in your environment
- ANTHROPIC_API_KEY in your environment
Where it runs
All 3 documented clients run the server on your machine.
INSTALLATION
Connect your client
You clone and build this one yourself.
Server setup
git clone https://github.com/knishioka/cost-management-mcp.git
cd cost-management-mcp
npm install
cp .env.example .env
npm run buildMCP Clients
Claude Desktop
{
"mcpServers": {
"cost-management": {
"command": "node",
"args": [
"<YOUR_PATH_TO_COST_MANAGEMENT_MCP>/dist/index.js"
],
"env": {
"AWS_ACCESS_KEY_ID": "<YOUR_AWS_ACCESS_KEY_ID>",
"AWS_SECRET_ACCESS_KEY": "<YOUR_AWS_SECRET_ACCESS_KEY>",
"AWS_REGION": "us-east-1",
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>",
"CACHE_TTL": "3600",
"LOG_LEVEL": "info"
}
}
}
}Claude Code — project scope
{
"mcpServers": {
"cost-management": {
"command": "node",
"args": [
"<YOUR_PATH_TO_COST_MANAGEMENT_MCP>/dist/index.js"
],
"env": {
"AWS_ACCESS_KEY_ID": "<YOUR_AWS_ACCESS_KEY_ID>",
"AWS_SECRET_ACCESS_KEY": "<YOUR_AWS_SECRET_ACCESS_KEY>",
"AWS_REGION": "us-east-1",
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>",
"ANTHROPIC_API_KEY": "<YOUR_ANTHROPIC_API_KEY>",
"CACHE_TTL": "3600",
"LOG_LEVEL": "info"
}
}
}
}Claude Code in VS Code — global
{
"claudeCode.mcpServers": {
"cost-management": {
"command": "node",
"args": [
"<YOUR_PATH_TO_COST_MANAGEMENT_MCP>/dist/index.js"
],
"env": {
"AWS_ACCESS_KEY_ID": "<YOUR_AWS_ACCESS_KEY_ID>",
"AWS_SECRET_ACCESS_KEY": "<YOUR_AWS_SECRET_ACCESS_KEY>",
"AWS_REGION": "us-east-1",
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
}
}
}
}