Skip to main content

Quick Install

Run this command to add CostHawk to Claude Code:
claude mcp add -s user -e COSTHAWK_API_KEY=YOUR_TOKEN_HERE costhawk -- npx -y costhawk
Replace YOUR_TOKEN_HERE with your access token from Settings → Developer in your CostHawk dashboard.

Manual Configuration

Add to ~/.claude/.mcp.json:
{
  "mcpServers": {
    "costhawk": {
      "command": "npx",
      "args": ["-y", "costhawk"],
      "env": {
        "COSTHAWK_API_KEY": "YOUR_TOKEN_HERE"
      }
    }
  }
}
Then restart Claude Code.

Claude Desktop

macOS

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
  "mcpServers": {
    "costhawk": {
      "command": "npx",
      "args": ["-y", "costhawk"],
      "env": {
        "COSTHAWK_API_KEY": "YOUR_TOKEN_HERE"
      }
    }
  }
}

Windows

Edit %APPDATA%\Claude\claude_desktop_config.json:
{
  "mcpServers": {
    "costhawk": {
      "command": "npx",
      "args": ["-y", "costhawk"],
      "env": {
        "COSTHAWK_API_KEY": "YOUR_TOKEN_HERE"
      }
    }
  }
}
Then restart Claude Desktop.

Verify Installation

After restarting, ask Claude:
“What CostHawk tools are available?”
Claude should list the available tools like costhawk_get_usage_summary, costhawk_get_savings, etc.

Updating

The MCP server uses npx -y costhawk which automatically fetches the latest version. To force an update, clear the npx cache:
rm -rf ~/.npm/_npx
Then restart Claude Code/Desktop.

Environment Variables

VariableRequiredDefaultDescription
COSTHAWK_API_KEYYes-Your CostHawk access token
COSTHAWK_API_URLNohttps://costhawk.aiAPI base URL