What is MCP?
Model Context Protocol (MCP) is a standard for connecting AI assistants to external tools and data sources. CostHawk’s MCP server lets Claude:- Check your API usage and costs
- Analyze savings from flat-rate subscriptions
- Sync Claude Code and Codex CLI usage data
- Detect cost anomalies
- Manage webhooks and alerts
- Look up model pricing
Trust & Privacy
CostHawk was built for developers who care about transparency. We believe you should know exactly what runs on your machine.Local-First Parsing
We compute usage locally from Claude/Codex session files before anything leaves your machine.
No Prompt Content
Only usage metadata is sent: token counts, models, timestamps, and hashed project IDs — never your code or prompts.
Preview Before Upload
Use
dryRun: true to see exactly what would be sent, with payload previews for full transparency.Opt-In Auto-Sync
Automatic uploads are off by default. Enable with
COSTHAWK_AUTO_SYNC=true and disable Codex sync anytime.See What We Read
Run this command to see exactly which files CostHawk accesses:Installation
- macOS/Linux
- Windows
mcp:read, mcp:write, otel:ingest), so it also works for optional OTel ingestion.
After installation, restart Claude Code to load the MCP server.
Full Installation Guide
See manual configuration, Claude Desktop setup, and troubleshooting.
Available Tools
Full Tool Reference
See detailed documentation for each tool including parameters and examples.
Operations Runbook
Explicit checks for self-test, auto-sync, and Codex session troubleshooting.
Example Conversations
Check your usage:“What’s my AI API usage this month?”Analyze savings:
“Am I saving money with my Claude Max subscription?”Monitor costs:
“Are there any cost anomalies I should know about?”Set up alerts:
“Create a Slack webhook for budget alerts”
Requirements
- Node.js 18+
- Claude Code or Claude Desktop
- A CostHawk account with an access token
Troubleshooting
Tool not found errors
Tool not found errors
- Ensure Claude was restarted after adding the MCP server
- Verify the config file syntax is valid JSON
- Check that the server name is
costhawk
Authentication failed
Authentication failed
- Verify your access token is correct
- Check the token is active in your CostHawk dashboard
- Make sure you’ve been approved from the waitlist
Connection refused
Connection refused
- Ensure you have internet connectivity
- Check if costhawk.ai is accessible
- Verify no firewall is blocking the connection
