Route Cursor and Claude Code through Auxot

Put your editor and terminal on the same routing spine — Cursor via OpenAI-compatible base URL, Claude Code via Anthropic Messages — so local or LAN Auxot picks GPU, CLI, or cloud per your provider order.

Plus: three moves — curl bisect before blaming Cursor, Admin-Agent sketch when Auxot lives on another box, and when to paste an agent UUID into the model field vs leaving auto.

Audience Developers
Time ~10 min
Prerequisites Auxot Server reachable from the machine where you edit (browser UI loads). A Personal API Key ([Generate your first API key](/tutorials/generate-your-first-api-key)). **Cursor** and/or **Claude Code** installed — configure whichever you actually use. One inference path online ([Take Auxot's pulse in 10 seconds](/tutorials/take-auxots-pulse)). For deeper CLI governance (agent UUIDs, Codex), read [Connect a CLI provider (Claude Code, Cursor, Codex)](/tutorials/connect-a-cli-provider) — this lesson is the host/port + dual-protocol cheat sheet.
You'll end up with Cursor pointing at `/api/openai` and Claude Code at `/api/anthropic/v1` with your Auxot key — smoke-tested — plus a mental map of why the paths differ and where requests surface in System Health.

When a tutorial shows italic text in quotation marks, it usually mirrors a label or helper string inside Auxot. Product copy changes between releases — if something reads differently in your workspace, trust what you see on screen.

Callouts with a Worth knowing gold accent are meant as must-read context before you move on. Blockquotes that open with Tip are lighter, optional depth.

Why this matters

Cursor and Claude Code default to vendor clouds. Point them at your Auxot Server and every completion rides your routing stack (GPU first, then CLI workers, then cloud, per Providers overview), with audit trails tied to the API key you minted.

The wiring is not symmetric:

ToolProtocol Auxot speaks hereBase URL ends at
CursorOpenAI Chat Completionshttp(s)://HOST:PORT/api/openai
Claude CodeAnthropic Messageshttp(s)://HOST:PORT/api/anthropic/v1

Mixing them up produces instant 404s or confusing 401s, not model quality problems.

Connect a CLI provider (Claude Code, Cursor, Codex) covers why CLIs should use Auxot (governance, agent UUIDs, and Codex). This tutorial is the exact URLs + env vars page you keep next to Claude Code & Cursor (Local).


Quick start

  1. Copy origin — whatever appears in the browser bar when Auxot loads (localhost, LAN IP, or HTTPS hostname). Note port: docs often use 8420; some installs use 8080 (local setup note).
  2. Mint a keySettings → API Keys: name it after the machine (“Cursor — dev laptop”).
  3. CursorSettings → Models → OpenAI: API Key = Auxot key; Override OpenAI Base URL = http://ORIGIN/api/openai (no /chat/completions suffix).
  4. Claude Code — in the shell you launch claude from:
    export ANTHROPIC_BASE_URL=http://ORIGIN/api/anthropic/v1
    export ANTHROPIC_API_KEY=user.xxxxxxxxxxxxxxxx
    
    Value is your Auxot key, not a raw Anthropic console secret unless you intentionally bypass Auxot.
  5. Smoke test — Cursor: send any inline chat. Claude Code: run claude, ask a one-line question. Open System Health: traffic should appear tied to your key.

Done? Both tools (whichever you configured) authenticate and return text: failures move from “IDE broken” to reachable host / headers / provider offline.


The agent can do that?

1. Bisect with curl before Cursor blame

From the same machine:

curl http://localhost:8420/api/openai/chat/completions \
  -H "Authorization: Bearer user.xxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"auto","messages":[{"role":"user","content":"ping"}]}'

Why it’s non-obvious: Cursor upgrades, HTTP/2 proxies, and stale env layers fake “Auxot down.” Curl proving 200 isolates editor config fast (debug pattern).

2. LAN hosting cheat sheet via Admin Agent

Auxot serves on http://192.168.1.50:8420. My Cursor laptop must hit it; Claude Code runs on another workstation. List env vars + exact base strings each machine needs, and remind me about TLS and bearer leakage on Wi‑Fi.

Why it’s non-obvious: Two laptops × two protocols × HTTPS offload ⇒ easy typo. Paste IPs you chose; reply is a checklist: you still export vars.

3. Agent UUID vs auto

I want Cursor using agent "[name]" by default — UUID routing vs model auto. What breaks if I paste the UUID into the model field, and what stays the same in Auxot audit logs?

Why it’s non-obvious: auto saves typing but skips context files tied to a dedicated agent. UUID trades convenience for Give your agent its job description-shaped behavior inside the IDE: decision stays yours.


Go deeper

Paths: never trail-slash the origin

Auxot normalizes chat paths: /api/openai and /api/openai/v1/chat/completions callers both exist, but Cursor’s base should stop at /api/openai per integration guide.

Claude Code vs CLI Workers provider

Auxot Server can also run Claude Code as a provider inside your agent set (CLI Workers). That’s server-side compute. This tutorial is client-side: your terminal’s claude binary calling into Auxot’s HTTP API: different pipeline, same governance when keys match.

Troubleshooting
  • Connection refused: wrong host/port; Auxot not bound 0.0.0.0 behind LAN; firewall.
  • 401: missing Bearer, revoked key, Team key used without access.
  • Claude Code still hits Anthropic SaaS: env vars not exported in the launching shell; restart terminal.
  • Cursor streams blank: toggle HTTP/1.1 compatibility in Cursor network settings if local TLS intermediaries buffer oddly.
  • Traffic absent in System Health: requests never reached your Auxot (VPN split horizon, corporate proxy).

Walkthrough

Step 1: Confirm Auxot is listening

Browser → login → System Health green enough to chat. Copy scheme + host + port.

Step 2: Cursor OpenAI override

  1. Open Cursor Settings → Models → OpenAI.
  2. OpenAI API Key: paste user.… key.
  3. Override OpenAI Base URL: http://HOST:PORT/api/openai (adjust scheme/host/port).
  4. Model picker: start with auto or a connected model name (OpenAI-compatible API).

Restart Cursor if it cached stale config.

Step 3: Claude Code Anthropic override

  1. npm install -g @anthropic-ai/claude-code if needed.
  2. Export:
export ANTHROPIC_BASE_URL=http://HOST:PORT/api/anthropic/v1
export ANTHROPIC_API_KEY=user.xxxxxxxxxxxxxxxx
  1. Persist via shell profile or direnv.

Run claude, send “Reply OK if you see this.”

Step 4: Verify dual-path (optional)

If you installed both tools, repeat smoke tests: same key may serve both paths simultaneously.

Step 5: Level up routing

Follow Connect a CLI provider (Claude Code, Cursor, Codex) → agent UUID + optional CLI provider record.


What’s next

Reference