Agent guide · rapid-mlx 0.16.2 · ← Back to README

Cursor

Cursor is a closed-source IDE that supports a custom OpenAI base URL for its chat/composer surface. Cursor calls that URL from its own servers, so rapid-mlx has to be reachable over public HTTPS, behind an API key.

Quick start

Needs: Cursor, a public HTTPS tunnel to your Mac's port 8000, and an API key. Cursor sends custom-model requests from its own servers, so it cannot reach localhost.

$ export RAPID_MLX_API_KEY="$(openssl rand -hex 24)"
$ rapid-mlx serve qwen3.6-35b-4bit             # uses RAPID_MLX_API_KEY
# expose port 8000 over HTTPS with a tunnel

In Cursor Settings → Models → API Keys, enter the same key under OpenAI, turn on Use OpenAI API Key and Override OpenAI Base URL, then enter https://<your-tunnel-host>/v1. Add the exact served model ID and select it in Chat.

TIER-2 AGENT   Wire: /v1/chat/completions (IDE chat/composer path) · Setup: Cursor Settings → Models → API Keys · Matrix cell: no dedicated cell (Cursor's agent path is locked to Cursor's backend — see gotcha below).
Tier-2 because only the IDE-chat surface is integrable and it needs the GUI app — the CLI/agent path can't point at a custom endpoint, so it can't get the per-release headless guarantee a Tier-1 agent gets.

Install

Download from cursor.com (closed-source vendor binary).

Config

Cursor routes custom-model (BYOK) requests through its own backend, so the URL you give it must be reachable from the internet over HTTPS. A tunnel that forwards to port 8000 on your Mac works. Never expose a server without a key: start it with one, and enter the same value in Cursor's OpenAI API Key field.

$ export RAPID_MLX_API_KEY="$(openssl rand -hex 24)"
$ rapid-mlx serve qwen3.6-35b-4bit          # serve reads RAPID_MLX_API_KEY

In Cursor Settings → Models → API Keys, paste the key, enable Use OpenAI API Key and Override OpenAI Base URL, and enter your public tunnel URL ending in /v1. Add a custom model with the exact Rapid-MLX model ID. Cursor applies the OpenAI base URL override to other models too, including Cursor-managed models. Turn it off when switching back to those models. See Cursor's BYOK guide and its custom-endpoint setup notes.

Run

With the server and tunnel up, open Cursor and pick the model from the model dropdown. Chat and composer requests then go through the tunnel to your Mac.

Gotchas

See also