skip to content
Use with Claude Code & Cursor

CLI & local API

Use with Claude Code & Cursor

Point an agent tool at localhost and it talks to a model on your own machine instead of a cloud API. The swap is one line of config.


Coding agents reach a model the same way: an HTTP endpoint that accepts OpenAI-style chat requests. Conifer stands up that endpoint locally, so swapping the base URL to loopback puts the tokens on your own GPU. The server and its request format are covered on conifer serve.

Start the server

terminal
conifer serve --model qwen3-8b

Clients point at http://127.0.0.1:8080/v1. There is no auth; the server holds to loopback unless you pass a non-loopback --host, which it reads as deliberate exposure. The keep-alive policy and load-on-demand are covered on conifer serve.

Cursor

Cursor overrides the OpenAI base URL directly; that override is the entire integration. Conifer ignores the API key, but most clients refuse to send without one, so use any non-empty string.

Cursor → OpenAI provider settings
FieldValue
Base URLhttp://127.0.0.1:8080/v1
API keylocal
Modelthe id you served, or any string

Cursor's cloud features still route through Cursor's own backend; only the chat model is redirected.

The model id is advisory: a client that hardcodes gpt-4o gets the resident model, and the response reports the served-model id. Naming another registered model loads it on demand.

Claude Code

Claude Code speaks the Anthropic Messages API, a different wire shape, so it cannot point at the server the way Cursor does. Any open-source Anthropic-to-OpenAI shim bridges the gap: run it locally, set Claude Code’s base URL to the proxy, and it forwards to /v1/chat/completions.

What carries over, what doesn’t

The server covers what a coding agent leans on: streamed completions, stop sequences, tool calls, and schema-constrained output. Tool use needs a tool-capable model, so pick from Coding. Anything wired to a vendor’s backend, like a hosted indexer, keeps hitting it.

The redirected chat model is what stays local: prompts, code context, and generated tokens move between the editor and a process on your machine; the full accounting is on the local-first guarantee. Models worth pointing an agent at sit on the models ledger; the commands are in the conifer CLI.