Claude Desktop with a Local Model on Mac
Connect Claude Desktop to a local model on your Mac through its in-app Gateway settings.
Set up the local Gateway
Install Rapid-MLX, then run:
$ rapid-mlx launch claude-desktop --model qwen3.5-4b-4bit --port 7659
This command saves Rapid's private model-tier mapping and prints a Gateway URL and API key. It does not start the server or edit Claude Desktop. Start the matching model on that port with the saved key, and keep it running while using Claude Desktop:
$ RAPID_MLX_API_KEY="$(cat ~/.rapid-mlx/connect/api-key)" rapid-mlx serve qwen3.5-4b-4bit --port 7659
- In Claude Desktop, open Help → Troubleshooting → Enable Developer Mode.
- Open Developer → Configure Third-Party Inference → Gateway.
- Paste the URL and API key printed by Rapid, choose the default Bearer authentication scheme, and select Test.
- Select Apply Changes.
Next day: Start the same server again, then use Claude Desktop. Re-run rapid-mlx launch claude-desktop --model qwen3.5-4b-4bit --port 7659 if you need the Gateway details for this example. Use the same model and port as your server. Claude Desktop's settings change only when you apply them in its own window. rapid-mlx launch claude-desktop --remove disables Rapid's tier mapping.
| Mac unified memory | Model choices | Download and memory guidance |
|---|---|---|
| 16 GB | qwen3.5-4b-4bit fits 16 GB per the registry; not verified live on a 16 GB Mac. | About 3 GB download. |
| 18–36 GB | qwen3.5-9b-4bit default; start with qwen3.5-4b-4bit on 18–24 GB. | About 6 GB for 9B or 3 GB for 4B. |
| 48 GB+ | qwen3.5-9b-4bit responsive default; qwen3.8-27b-4bit higher-capability option. | About 6 GB for 9B or 16 GB for 27B; 27B needs roughly 20–26 GB free unified memory. |
Download size is not runtime memory use. Leave room for the client, context and other applications; keep context short when memory is tight.
First reply: The first reply can take longer than later turns: an uncached model must download, the server must load it, and the agent may send a long prompt that takes time to prefill. Wait for the model to become ready; there is no fixed first-reply time. A warm, cached model is usually quicker.
Quick answer
How do I use Claude Desktop with a local model on Mac? Run rapid-mlx launch claude-desktop --model qwen3.5-4b-4bit --port 7659, start the matching Rapid-MLX server, then paste the printed Gateway URL and key into Claude Desktop's in-app Gateway settings.
See coding agents for the one-command terminal launch flow.