Running Claude Code fully offline on a MacBook — no API key, no cloud, 17s per task
TL;DR Highlight
A post sharing how to run Claude Code fully offline on a MacBook by connecting it to a local LLM without an API key or cloud, useful for developers who want to use an AI coding assistant at no cost.
Who Should Read
Developers who want to use AI coding assistants like Claude Code locally without API costs, or developers who need to leverage AI tools in internet-restricted environments (offline, secure networks, etc.).
Core Mechanics
- Failed to retrieve the original content. The post body was inaccessible due to Reddit's network security blocking.
- Key information inferred from the title: the author successfully ran Claude Code fully offline on a MacBook, reportedly achieving a processing speed of approximately 17 seconds per task.
- Given that it operates without an API key or Anthropic cloud servers, it is likely that a local LLM (e.g., an Ollama-based model) was connected as the backend for Claude Code.
- Fully offline execution offers several practical benefits, including data privacy, reduced API costs, and usability in network-free environments.
Community Reactions
- Author built ~200-line Python server so Claude Code talks directly to local MLX model via Anthropic Messages API — no proxy or middleware
- M5 Max (128GB) benchmark: ~2.2s for 100 tokens (45 tok/s), ~11s for 500 tokens — slower than API but fully offline at zero cost
- Counter in comments: already possible by just swapping API key with local endpoint, this adds unnecessary complexity / Ollama launch claude does the same
- Positive responses: one user ran Qwen3.5 30B 4-bit and built Conway's Game of Life on first try / 'will be essential as prices rise'
How to Apply
- "The original content was inaccessible, so specific application instructions cannot be provided. Visit the original Reddit URL directly (https://www.reddit.com/r/ClaudeAI/comments/1s43b8w/) or log in to view the full content. | A similar approach involves connecting Ollama with a local model (e.g., Qwen, Llama family) to Claude Code as a custom API endpoint. Start by exploring how to change Claude Code's ANTHROPIC_BASE_URL environment variable to point to a local server address. | If you need an offline AI coding assistant, the Continue.dev + Ollama combination is also worth considering as an alternative."
Terminology
Related Papers
A Beginner's Guide to Local AI with Inkling, Qwen, and Unsloth
Install Unsloth Desktop, load a quantized Qwen model, and share a private ChatGPT-like AI on your home LAN.
Muru – AI-assisted Rust server for Python apps by mod_WSGI's creator
mod_wsgi's creator is building Muru, an AI-assisted Rust ASGI/WSGI server, documenting it in public
87% of the Anthropic power will come from gas and 11% from coal in 2028
Analysis of Anthropic's contracted data centers: 87% gas, 11% coal power in 2028
Anthropic’s Nasdaq debut
Anthropic listed on Nasdaq and closed its first day below its opening price.
OpenAI still has a WebRTC Problem
WebRTC drops late audio, hurting voice AI; MoQ retransmits and buffers instead
Gemini 4 Neon
Gemini 4 Neon cuts cost per task 32% versus Carbon, at $3 input and $15 output per million tokens
AI is killing All About Berlin
After Google AI Overviews, a Berlin guide site lost 70-75% of its traffic.
Not Everything Needs an LLM
PostHog used small decision models to skip 98.7% of expensive LLM calls