Purpose
claude-code-local aims to let Claude Code run local AI models on a Mac, so you can continue using the Claude Code coding experience without using cloud models or configuring an API Key. The official description is "no internet, no API Key, no waiting," and it says "your Mac chip runs the AI, Claude Code works as usual, and nothing leaves your computer." The project is aimed at workflows such as NDA, legal, and medical work, emphasizing private, offline use in air-gapped environments.
Main capabilities
- MLX-native Anthropic API server:
proxy/server.pyUses Apple MLX to run open models on the local chip, responding to Claude Code directly in the Anthropic Messages API format and supporting streaming output. - Tool-call adaptation: Converts the tool-call formats of different models (Gemma 4, Qwen, Llama JSON, etc.) into Claude Code tool calls, and repairs broken tool JSON.
- Prompt cache reuse: Reuses the prompt cache between turns to avoid repeatedly reading the full context in long sessions.
- Test scripts:
scripts/test_parse_tool_calls.py(tests the tool-call parser without a model) andscripts/test_mlx_server.py(tests multi-step tool calls against a running server). - Native terminal coding agent:
agent/agent.pyis a single-file terminal coding agent that uses a short fixed system prompt to maintain the cache each turn;bench/agent_bench.pycan reproduce its cache data. - Session continuation:
bin/keepgoingandbin/keepgoing.pycan find the previous Claude Code conversation in that folder and continue it with a free cloud or local model. - Installation and detection scripts:
install.sh、setup.shandscripts/doctor.shcheck the Mac, select a model matching the memory, install all components, and create a desktop launcher. - Multiple startup modes:
launchers/and the shared librarylaunchers/lib/claude-local-common.shprovide a double-click-to-run mode.
How to use
Requirements:
- Apple Silicon Mac (M1 or newer)
- Python 3.12 (setup will install it for you)
- Claude Code:
npm install -g @anthropic-ai/claude-code
Installation process: Run setup.sh, and the script will check the Mac memory and select a model that can fit, download the model, install the server, and place Claude Local.commandon the desktop. Double-click to start local coding.setup.sh installs the server as a symbolic link pointing to this repository's proxy/server.py , so after changes you only need to restart the server.
Common issue tip: If you are asked to log in to a Claude account, it means the claude version is too old; the update command is npm install -g @anthropic-ai/claude-code.
Continuation after usage limits: When Claude shows that the usage limit has been reached, enter in Claude Code exit, then run keep going, and a short menu will appear, allowing you to choose a free cloud model (from OpenRouter, requires adding a free key) or a model on this machine to continue the same conversation. You can also point the status bar to scripts/statusline-keepgoing.sh to display a reminder at the bottom of the window.
Privacy verification: the launcher disables Claude Code's own background network traffic according to Anthropic's documentation; during a session you can use lsof -a -i -p "$(pgrep -d, -f claude)" to view the network connections of each Claude process, and the official statement says the only connection is localhost:4000. The only exception is when the user actively chooses a free cloud model, in which case that conversation is sent to OpenRouter.
Auxiliary terminal: Trinidad Head is recommended for running local models (supported on both Mac and PC), offering features such as a glass-textured window, a different color for each window, larger and more readable text, highlighted question bubbles, and copy-paste support.
Runnable models
Officially there are said to be 6 selectable models, including Muse-Glimmer 30B (multimodal, can read images, abliterated), Gemma 4 31B, Qwen 3.5 122B (65 tok/s), DeepSeek V4 Flash (1M context), and others. The numbers in the table are said to be measured on an M5 Max (128 GB), with other rows marked as vendor-reported. The project also lists the original releases and MLX builds of several third-party models (Qwen, Gemma, Hermes, Muse Glimmer, Nemotron, etc.), as well as its own abliterated builds (huggingface.co/divinetribe). The official note states that the built-in refusals of abliterated models are tuned down, which is not a general upgrade, that the licenses of the respective models still apply, and that they must be used responsibly.
Applicable scenarios
- You have hit Claude's usage limit but still need to continue working on the same project;
- Local coding that is sensitive about data egress and requires NDA/legal/medical compliance;
- Offline or air-gapped environments;
- It can also run on a 16 GB MacBook, and the more memory the better.
Limitations and notes
- Only Apple Silicon Macs (M1 or newer) are supported.
- Details on specific model sizes, speeds, and memory requirements are in the full guide (the complete table values are not provided on this page).
- The official Agent-12 leaderboard scores come from its own streamlined testing tool Anvil, and were not measured within Claude Code; Claude Code sends more content per turn, so the same model's score and time within it may differ.
- Due to supply chain concerns, the project has removed LiteLLM and rechecked all dependencies.
- In the startup modes, the parts other than Code and Native Engine require additional components not installed by setup.sh.
Related alternatives
Officially, other ways to run Claude Code on a model of your choice are listed: Ollama (native support for the Anthropic Messages API since v0.14, and not limited to Mac), claude-code-router (routes requests among multiple providers and models), claude-code-proxy (converts Claude Code requests into an OpenAI-style API). What this project additionally provides is an MLX-native server tuned for Apple Silicon and targeting the tool-call format actually output by local models.
License and other information
The project uses the MIT License. The author is Matt Macosko (Humboldt, California), contact email matt@ineedhemp.com. The project also mentions Nice Dreamz software, a YouTube demo and Discord, as well as a list of contributors.