Skip to content

Claude Code

Claude Code reads its Anthropic base URL from the environment, so connecting it to TapPass is two variables.

See Connect your harness for how to get your base URL, key, and model IDs.

Terminal window
export ANTHROPIC_BASE_URL=https://app.tappass.ai
export ANTHROPIC_API_KEY=<your TapPass agent API key>
claude

Every Claude Code request now runs through TapPass. If you pin a model, use a prefixed ID such as anthropic/claude-sonnet-4-5-20250929.

To make it permanent, add those two exports to your shell profile (~/.zshrc, ~/.bashrc) or your project’s .envrc.

Terminal window
ANTHROPIC_BASE_URL=http://localhost:9620 claude

Routing the base URL (above) governs the model calls. Claude Code can be governed more deeply, in increasing order of control:

  • MCP server: reach TapPass as an MCP server so tool calls are governed on the tool plane.
  • PreToolUse hook: gate every tool call against policy with the Claude Code hook, no gateway required.
  • Governor mod: govern both tool calls and model requests with a live panel via the Claude Code Governor.
  • Sandbox: confine the whole session so the governed path is the only path, see Sandboxes and enforcement.

Run one prompt, then confirm a governed event for your agent in the TapPass console.