Cordon integrates with Claude Code so your AI agent can make authenticated API calls without holding real credentials.
Automated setup
The fastest way to get started:
This:
- Generates CA certificates (if not already present)
- Creates a scaffold
cordon.yaml
- Configures Claude Code’s
settings.json with proxy env vars (HTTPS_PROXY, HTTP_PROXY, NODE_EXTRA_CA_CERTS)
Global setup with background service
To install cordon as a background service that starts automatically:
cordon setup claude-code --global
This additionally installs a launchd (macOS) or systemd (Linux) service so cordon runs in the background without a terminal window.
Remove the setup
cordon setup claude-code --remove
Manual setup
If you prefer manual configuration, set these env vars in Claude Code’s environment:
export HTTPS_PROXY=http://127.0.0.1:6790
export HTTP_PROXY=http://127.0.0.1:6790
export NODE_EXTRA_CA_CERTS=./ca-cert.pem
You can add these to Claude Code’s settings.json:
{
"env": {
"HTTPS_PROXY": "http://127.0.0.1:6790",
"HTTP_PROXY": "http://127.0.0.1:6790",
"NODE_EXTRA_CA_CERTS": "./ca-cert.pem"
}
}
Trust the CA
If tools used by Claude Code fail with certificate errors:
tls: failed to verify certificate: x509: certificate signed by unknown authority
Add the CA to the system trust store:
Node.js ignores the system trust store, so you still need NODE_EXTRA_CA_CERTS for Node-based tools (this is handled automatically by cordon setup claude-code).
Workflow
Once configured, the workflow is:
- Start cordon:
cordon start (or use the background service)
- Start Claude Code as usual
- When Claude Code makes API calls to configured hosts, cordon transparently injects credentials
- Claude Code never sees or logs real API keys
Use cordon doctor to diagnose any setup issues. It checks config validity, cert paths, trust store status, and port availability.