Connect your first tool
Every tool needs two things: Harbor Pilot's address and an access token from a client. This page connects Claude Code; the Tools section covers Codex, OpenCode, Pi and SDKs the same way.
1. Get an access token
Creating a client shows its first token once. To make another one, open the client and choose Create token on its Access tokens tab, or use the command line with an API token:
export HP_SERVER=https://pilot.example.com
export HP_API_TOKEN="$(cat ~/.config/harbor-pilot/api.token)"
harbor-pilot token issue --binding <client-id> --name laptop > ~/claude.tokenTokens start with hpk_. Harbor Pilot stores only a hash, so a lost token can't be shown again: create a new one and revoke the old one.


2. Configure the tool
Open Clients → Set up a tool. Choose the client, the model and the tool, and the page shows the exact steps for it, built from your server's public address.


You can follow those steps by hand, or let the harbor-pilot command do it. On the machine that runs Claude Code:
harbor-pilot harness setup claude \
--url https://pilot.example.com \
--token-stdin --model coding/default --yes < ~/claude.tokenThis:
- saves the token in
~/.config/harbor-pilot/tokens/claude.tokenwith mode 0600; - backs up
~/.claude/settings.json(or$CLAUDE_CONFIG_DIR/settings.json) next to it; - sets
env.ANTHROPIC_BASE_URLandenv.ANTHROPIC_MODEL, and anapiKeyHelperthat prints the token file, so the token never appears insettings.json; - records what it changed, so
harbor-pilot harness uninstall claude --yesremoves exactly that.
Run harbor-pilot harness preview claude … first to see the diff without writing anything.
3. Send a request
Start Claude Code as usual and ask it something. The request appears in Requests within a second or two. Open it to see which account served it and why.


If nothing arrives:
harbor-pilot harness statusshows whether the tool is configured and whether its file changed since.harbor-pilot doctor --server https://pilot.example.comchecks the server, its keys and the CLI bridges.- A
401means the token is wrong, revoked or expired. A request that is refused by the plan shows up in Requests with the reason.
More in Troubleshooting.
Next
- Claude Code, Codex, OpenCode, Pi and SDKs and API clients.
- Clients and access tokens: limits, projects and rotating tokens.