How to Use Cursor with a Local LLM on Your Mac

Cursor, but the model's running on your own Mac. One custom base URL in Settings → Models and chat, Ctrl-K, and composer all route to a local LLM — private, offline, no per-token bill.

Cursor is where a lot of us live now, and its AI is genuinely good. But every completion, every Ctrl-K, every composer run goes to the cloud and gets billed. For a lot of day-to-day editing — refactors, explain-this, small features — you don't need a frontier model in a datacenter. You need a capable one on your Mac, wired into the editor you already use.

This is the second in a short series on pointing your favorite agent at a local model. (First up was Claude Code.) Cursor takes about five minutes.

The whole thing

  1. curl -fsSL https://rapidmlx.com/install.sh | bash
  2. rapid-mlx serve qwen3.6-35b-4bit
  3. Cursor → Settings → Models → set the OpenAI base URL to http://localhost:8000/v1

1 · Install rapid-mlx

Local, OpenAI-compatible inference for Apple Silicon:

curl -fsSL https://rapidmlx.com/install.sh | bash

Prefer Homebrew? It's in homebrew/core — brew install rapid-mlx, no tap needed.

2 · Serve a model that fits your Mac

rapid-mlx serve qwen3.6-35b-4bit

The server comes up at http://localhost:8000. First run downloads the weights; after that it's seconds.

Your Mac Model Good for
16 GB qwen3.5-4b Fast edits, Q&A
32 GB gpt-oss-20b All-round + strong tools
48 GB+ qwen3.6-35b-4bit The coding sweet spot

No tool flags needed. Since 0.10.14, serve auto-configures the tool-call parser and turns on grammar-constrained tool calling — Cursor's composer, which leans on tool calls, gets clean results with nothing to set.

3 · Point Cursor at it

Open Settings → Models → Add Model, then set:

OpenAI API Base:  http://localhost:8000/v1
API Key:          not-needed
Model name:       default        # or any served alias, e.g. qwen3.6-35b-4bit

The base URL ends in /v1 here — that's the OpenAI shape Cursor speaks. (Claude Code is the opposite: it wants the bare root. Different wires.) And if Cursor's dropdown hides an alias it doesn't recognize, pick default — it always resolves to whatever the server booted.

4 · Use it

Pick default from the model dropdown. Now chat, Ctrl-K, and composer route to http://localhost:8000/v1 — running on your Mac. Ask it to explain a function, refactor a file, or scaffold a component; it reads and edits in the editor as usual.

What this covers — and what it doesn't

Cursor's interactive surfaces — chat, Ctrl-K, and composer — honor the custom endpoint. Cursor's fully-managed background agent routes through Cursor's own backend and can't be pointed at a local server. So this covers the editing you do by hand all day; the autonomous cloud agent stays cloud. For a fully local agent loop, Claude Code or Codex is the better fit.

Honest expectations. A model on your Mac isn't a frontier cloud model. Where local shines: private and offline work, quick edits, explain-and-refactor, and never watching a bill. Where the cloud still wins: the hardest reasoning and the largest context. You don't have to pick one — switch Cursor's model back anytime.

Frequently asked questions

Can Cursor use a local LLM?

Yes. Cursor's chat, Ctrl-K, and composer all honor a custom OpenAI base URL. Serve a model locally with rapid-mlx, set Settings → Models → OpenAI API Base to http://localhost:8000/v1, and those surfaces run against your own Mac instead of the cloud. Only Cursor's fully-managed background agent is excluded — it routes through Cursor's backend by design.

What's the best local model to use with Cursor?

On a 32 GB Mac, qwen3.6-35b-4bit is the sweet spot — a mixture-of-experts coder that decodes fast enough for interactive editing. With 16 GB, use qwen3.5-9b-4bit or gpt-oss-20b; with 48 GB+, step up to qwen3.6-35b-8bit. Our Qwen-on-Mac guide maps every RAM tier.

Is using Cursor with a local model free?

The model side is: rapid-mlx is Apache 2.0, the weights are open, and local inference has no per-token cost. Cursor itself still has its own plan pricing, but requests routed to your local server don't consume paid model credits.

Does my code stay private with a local model?

Requests to a local model never leave your Mac — prompts, file contents and completions all stay on-device. Note that Cursor's separate cloud features (indexing, its managed agent) follow Cursor's own privacy policy; the local endpoint only covers the chat, Ctrl-K, and composer traffic you point at it.

Where to go next


Run this yourself. rapid-mlx is an open-source, OpenAI-compatible inference server for Apple Silicon. One command installs it, then rapid-mlx serve <alias> serves any model on localhost:8000/v1.
curl -fsSL https://rapidmlx.com/install.sh | bash

New models and speedups, in your inbox

A short note whenever rapid-mlx gets faster or adds models worth running on your Mac. No spam — unsubscribe anytime.