Run Local Coding Agents on Mac with MLX Models

A local MLX server and agent-specific setup commands for coding on your Mac.

Run rapid-mlx serve qwen3.5-9b-4bit on your Mac. In another terminal, choose a command from the coding agent setup guides, such as rapid-mlx agents codex --setup. The served model runs behind local OpenAI and Anthropic API routes.

brew install rapid-mlx codex
rapid-mlx serve qwen3.5-9b-4bit  # keep this terminal running
# In another terminal:
rapid-mlx agents codex --setup
codex

The 9B model is the Codex guide's practical floor for a 16 GB Mac. A larger model needs more unified memory. Use rapid-mlx recipe to see a model suggestion for your machine, and check the hardware tiers before serving larger weights.

Pick the agent you use

Agent Local API route Setup guide
Claude Code /v1/messages Claude Code on Mac
Codex CLI /v1/responses Codex CLI on Mac
OpenCode /v1/chat/completions OpenCode on Mac
Cline /v1/chat/completions Cline on Mac
Aider /v1/chat/completions Aider on Mac

Each guide shows the setup command, the client command, the file or environment variables changed, and how to test the connection. Cline also has a VS Code extension path. Aider's setup prints exports that you paste into the shell before running Aider.

Use the right base URL

OpenAI-compatible clients use http://localhost:8000/v1. Claude Code uses http://localhost:8000, because its client adds /v1/messages. The server prints its actual port on startup; if port 8000 is busy, use the printed address. The local MLX server guide has a curl request and the available routes.

The integration matrix records agent-specific verification and known failures. Model capability still matters for code edits and tool use, so start with a model suited to your Mac's memory.


Run this yourself. Rapid-MLX is an open-source, OpenAI- and Anthropic-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.