L

LM Studio Local Provider Settings

Connect Claude Code to a local LM Studio server for fully offline, private AI coding assistance. Run open-source models like Qwen3-Coder or DeepSeek locally with zero data leaving your machine - ideal for air-gapped environments and sensitive codebases.

SettingCommunityinfrastructurev1.0.0MIT
0 views0 copies

Provider Configuration

# Required: LM Studio local server settings export ANTHROPIC_BASE_URL=http://localhost:1234/v1 export ANTHROPIC_API_KEY=not-needed

Settings File

{ "env": { "ANTHROPIC_BASE_URL": "http://localhost:1234/v1", "ANTHROPIC_API_KEY": "not-needed" }, "preferences": { "model": "qwen3-coder" } }

LM Studio Setup

1. Install LM Studio

Download from https://lmstudio.ai for macOS, Windows, or Linux.

2. Download a Coding Model

Recommended models for coding tasks:

ModelVRAM RequiredQuality
Qwen3-Coder 32B (Q4)~20 GBExcellent
DeepSeek Coder V2 16B (Q4)~10 GBVery Good
CodeLlama 34B (Q4)~20 GBGood
Qwen2.5 Coder 7B (Q4)~5 GBDecent

3. Start the Local Server

  1. Open LM Studio
  2. Load your chosen model
  3. Go to "Local Server" tab
  4. Click "Start Server" (default port: 1234)
  5. Verify: curl http://localhost:1234/v1/models

Hardware Requirements

SetupMinimumRecommended
7B model8 GB RAM, 6 GB VRAM16 GB RAM, 8 GB VRAM
14B model16 GB RAM, 10 GB VRAM32 GB RAM, 12 GB VRAM
32B model32 GB RAM, 20 GB VRAM64 GB RAM, 24 GB VRAM

Apple Silicon Macs can use unified memory for both RAM and VRAM.

Limitations

  • Slower than cloud APIs (depends on your GPU)
  • Smaller context windows (4K-32K vs Claude's 200K)
  • Lower quality for complex multi-step reasoning
  • Tool use may not work reliably with all models
  • Extended thinking and advanced features not supported

When to Use Local Models

  • Air-gapped or classified environments
  • Sensitive codebases that cannot use cloud APIs
  • Offline development (travel, no internet)
  • Learning and experimentation
  • Reducing API costs for simple tasks
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates