Skip to content
Comparison · Updated 2026-11-06

The best local backend for Claude Code.

Claude Code runs against any HTTP endpoint that speaks the Anthropic Messages API. Four serious options: ToolPiper, Ollama, vLLM, LM Studio. They are not equivalent. Here is what is actually different.

The short version

  • Pick Ollama / vLLM / LM Studio if you want a single local model server and nothing else. They speak the protocol; that is the feature.
  • Pick ToolPiper if you want Claude Code to move across local + cloud providers in the same conversation, with over 450 MCP tools, voice, browser automation, and Keychain-locked BYOK, from two switches: Tools and Engine.
  • ToolPiper is the only backend that runs in your normal claude with one switch, leaves open sessions where they are, and states each model's own compaction window. A local model needs a trained window of at least 98,304 tokens and enough memory, and a compaction on a large one takes minutes.

Feature matrix

FeatureToolPiperOllamavLLMLM Studio
Zero-config Claude Code setupOne switch on Home: new sessions of your normal claude run on your modelManual env varsManual env vars + DEFAULT_*_MODEL danceManual env vars + DEFAULT_*_MODEL dance
Conversational provider switching"Run Claude Code on my local Qwen" works in chat (`claude_code_engine_set`)NoNoNo
Speak to Claude (STT + TTS + voice clone)YesNoNoDictation only (Bionic voice keyboard)
Anthropic Messages API (`POST /v1/messages`)Native, with provider switchingNoYes (since v0.7)Yes (since 0.4.1)
OpenAI Chat Completions (`/v1/chat/completions`)YesYesYesYes
Streaming with cancellation<200 ms upstream abort on EscYesYesYes
Tool use round-tripAnthropic + OpenAI shapesOpenAI onlyOpenAI onlyAnthropic + OpenAI shapes
Inference backends9 (llama.cpp, Apple Intelligence, FluidAudio, MLX Audio, Apple Vision, …)1 (llama.cpp)1 (vLLM engine)2 (llama.cpp, MLX)
Apple Intelligence (Neural Engine) backendYes, first to ship itNoNoNo
BYOK cloud proxy (OpenAI / Anthropic / Gemini / etc.)Yes (Keychain-locked, server-side injection)NoNoNo
Cross-provider routing in one base URLYes (local and cloud in one `/model` list)NoNoNo
Each model compacts at its own windowYes, stated per `/model` row in Claude Code's settingsBy handBy handBy hand
Open Claude Code sessions left where they areYes, only new sessions start on the engineEnv vars reach one shellEnv vars reach one shellEnv vars reach one shell
Native /model picker integrationYes (writes `modelPicker` to Claude Code's user settings, and puts the file back on Off)NoNoNo
MCP server bundledover 450 tools: browser, files, system, video, voiceNoNoNo
MCP toolbelt injection (when client has no tools)Header-gated, PiperMatch-retrievedNoNoNo
Browser automation (CDP)17 AX-native toolsNoNoNo
OCR (Apple Vision)YesNoNoNo
Image / video upscale on Neural EnginePiperSR (44 fps real-time 2× video)NoNoNo
Resource intelligence (auto model eviction)Real-time RAM monitoring + evictionReads RAM once at startupManualNot compared here
DistributionNative macOS DMGHomebrew + CLIPython wheel + GPU containerInstallers for macOS, Windows and Linux
SandboxingNative, signedNoNoNot documented

Performance baselines

Performance numbers depend heavily on your Mac, your model, and your prompt mix. ToolPiper ships scripts/anthropic-perf-baseline.ts: a harness that captures p50 / p95 TTFT and tokens/sec across every provider you have configured, including Ollama / vLLM / LM Studio if you wire them as endpoints. The output lives at docs/features/anthropic-perf-baseline.md and updates on every run. The numbers below are workload definitions; the live comparison is in the repo.

WorkloadToolPiperDefinition
Single-turn 2K prompt (TTFT, p50)See live numbersCaptured per `EndpointConfig` by `scripts/anthropic-perf-baseline.ts`. Runs across every provider you have configured.
Multi-turn 20K with tools (tokens/sec, p50)See live numbersSame harness (Phase 7 deliverable), populated on every fresh ToolPiper run.
Tool-heavy 50K (TTFT, p95)See live numbersSkipped automatically on backends whose context window is below 50K; annotated `context_overflow` in the output.

Pick a recipe

Try it

Download ToolPiper, choose a language model on Home, turn on Engine in the Claude Code row, and start a new claude.