CostAffective
Integrations

Claude Code Setup

Add CostAffective to Claude Code CLI configurations for prompt token reductions.

Claude Code CLI Setup

Claude Code uses the global user configuration profile located at ~/.claude.json to launch MCP subprocesses during tasks.

Step-by-Step Integration

  1. Locate the config file at ~/.claude.json. If it does not exist, create an empty JSON file.
  2. Inject the CostAffective server block inside the mcpServers dictionary using absolute binary paths:
{
  "mcpServers": {
    "costaffective": {
      "command": "/home/user/.local/bin/costaffective",
      "args": ["serve"]
    }
  }
}

Verify Tools Discovery

Run Claude Code in your terminal. You can check that the CostAffective tools are registered successfully by running:

# Inside Claude Code shell
/tools