CostHawkCostHawk
CostHawk MCP Server

The AI cost control plane your assistants can call.

CostHawk's MCP server gives authorized AI assistants 22 tools for usage reporting, local telemetry, savings analysis, anomaly detection, alert routing, live pricing, proxy setup, and executive ROI reporting. CTOs get answers in plain English; technical evaluators can inspect the exact tool surface.

Install

npm
npm exec --yes costhawk@latest -- --login

Tool surface

22

Registered tools across reporting, sync, alerts, pricing, and ROI.

Access model

Scoped

MCP read/write tokens keep reporting and action tools governed.

  • 22 registered MCP tools in the npm package
  • Read-only local reports before any upload
  • Dry-run sync previews for local telemetry
  • MCP read/write scopes for governed access
  • No prompts, responses, or source code stored from MCP telemetry

Tool surface

More than a connector. It is an operating layer.

The MCP server is useful before, during, and after rollout: local discovery, dashboard sync, executive reporting, pricing checks, alert routing, and governance checks all sit behind one assistant-accessible interface.

Usage and attribution

Ask for API spend, token volume, provider mix, model mix, and project or team breakdowns.

costhawk_get_usage_summarycosthawk_get_usage_by_tag

Savings and ROI

Compare retail token cost against flat-rate subscriptions and turn local activity into an executive ROI report.

costhawk_get_savingscosthawk_list_subscriptionscosthawk_get_savings_breakdowncosthawk_get_local_roi_report

Anomalies, alerts, and routing

Find spikes, review recent budget alerts, and create Slack, Teams, PagerDuty, Discord, or custom webhook routes.

costhawk_detect_anomaliescosthawk_list_alertscosthawk_list_webhookscosthawk_create_webhook

Local AI-tool telemetry

Read Claude Code, Codex, and Cursor usage locally; preview what would sync before uploading metadata to CostHawk.

costhawk_get_local_claude_code_usagecosthawk_sync_claude_code_usagecosthawk_get_local_codex_usagecosthawk_sync_codex_usagecosthawk_get_local_cursor_usagecosthawk_sync_cursor_usage

Pricing and proxy setup

Look up current model pricing, inspect wrapped proxy-key setup, and check provider integration status.

costhawk_get_model_pricingcosthawk_get_proxy_guidecosthawk_list_integrations

Workspace guardrails

Expose workspace and project-memory policy so assistants know when shared Company Brain writes are allowed.

costhawk_get_company_brain_onboarding

Natural language workflows

Ask the questions leaders already ask.

The assistant calls CostHawk's tools behind the scenes and returns structured, table-ready answers. Operators can move from question to action without switching between provider billing portals, spreadsheets, and dashboards.

Example prompts

Show me the last 30 days of AI spend by provider and model.
Which projects are driving the biggest week-over-week increase?
Are Claude Max and OpenAI Pro saving us money this month?
Generate an ROI report using local Claude Code and Codex activity.
Find cost anomalies and create a Slack alert for budget spikes.
Before writing to Company Brain, tell me whether this project is allowed.

Local-first telemetry

Start with the tools your team already uses.

CostHawk can report from local AI-tool usage without asking for provider admin keys. For supported local sources, the MCP server reads usage metadata, estimates retail cost from current pricing, and can preview exactly what would be uploaded before a sync.

Claude Code

Parses local transcript metadata from the user's machine.

Codex

Reads local session logs and estimates retail token cost.

Cursor

Reads local SQLite usage data with self-test and transparency modes.

Gemini CLI

Uses CostHawk through MCP as an assistant/reporting surface.

What CostHawk stores

  • Token counts by type: input, output, cache creation, and cache read.
  • Model names, timestamps, session identifiers, and hashed project identifiers.
  • Estimated cost and synced daily usage rows for reporting.
  • No prompt text, response text, source code, or raw file contents from MCP telemetry.

Control points

Reporting is read-only until you choose otherwise.

Most tools answer questions. Write-capable tools are explicit: syncing usage metadata or creating alert webhooks requires an MCP token with the right scope.

Read reports

Usage, pricing, savings, anomalies, alerts, integrations.

Sync metadata

Claude Code, Codex, and Cursor upload tools require write scope.

Create routes

Webhook creation supports Slack, Teams, PagerDuty, Discord, and HTTP.

Govern access

MCP tokens are scoped for read, write, or hybrid MCP plus OTel use.

MCP Server

Put CostHawk inside the assistant your team already uses.

Start with local telemetry, then let authorized leaders and operators ask CostHawk for usage, savings, anomalies, alerts, pricing, and ROI from the same assistant workflow.