ApexSpriteAI pairs the Claude Code CLI with a locally hosted LLM to give you a fast, private AI coding assistant that supports the full Model Context Protocol (MCP) tool system. This guide walks you through every step — from installing LM Studio to sending your first query — and takes about 15 minutes to complete.Documentation Index
Fetch the complete documentation index at: https://docs-apexspriteai.reliatrack.org/llms.txt
Use this file to discover all available pages before exploring further.
Install LM Studio
Download and install LM Studio on the machine that has your GPU. LM Studio provides a graphical interface for downloading models and running a local OpenAI-compatible API server.Once installed, open LM Studio and sign in (or skip sign-in). You should land on the Discover tab where you can search for models.
LM Studio 0.4.1 or later is required. Earlier versions may not support the
/v1/messages endpoint that Claude Code uses.Download the Qwen2.5-Coder-32B model
In LM Studio’s Discover tab, search for
Qwen2.5-Coder-32B-Instruct and download a quantized GGUF variant (Q4_K_M is a good balance of speed and quality).This model is the recommended choice for ApexSpriteAI because it:- Runs at low latency on 32 GB or more of GPU or unified RAM
- Matches Claude 3.5 Sonnet on many coding benchmarks
- Reliably follows the tool-calling format that MCP depends on
Start the local server on port 1234
In LM Studio, switch to the Developer tab (the You can verify the server is reachable from your Mac with a quick connectivity check:Replace
</> icon in the left sidebar). Load your downloaded model using the model selector at the top, then click Start Server.LM Studio will bind to 0.0.0.0:1234 by default, making the server reachable from other machines on your network (including over Tailscale). Confirm the server is running by checking for the green status indicator and a log entry like:100.x.x.x with your server’s Tailscale IP. You should see Connection to ... succeeded.Install Claude Code CLI
On your Mac (or local workstation), install the Claude Code CLI globally using npm:Confirm the installation succeeded:
Node.js 18 or later is required. Run
node --version to check. If you need to upgrade, use nvm or download the latest LTS release from nodejs.org.Configure Claude Code to use your local LM Studio server
Create (or edit) the Claude Code configuration file at Replace
~/.claude/config.json. This tells Claude Code to send requests to your LM Studio server instead of Anthropic’s cloud API.~/.claude/config.json
100.x.x.x with the actual Tailscale IP of your LM Studio server. The ANTHROPIC_API_KEY value is arbitrary — LM Studio does not validate it — but the field must be present.If you are running LM Studio on the same machine as Claude Code, use
http://localhost:1234 as the base URL instead.Run your first query
Open a terminal in any project directory and run:Claude Code reads your local files, formats the request with available MCP tools, and sends it to LM Studio. You should see a response stream back within a few seconds.For an interactive session where you can ask follow-up questions, run
claude with no arguments:If you see a response, your setup is complete. Claude Code is now running fully locally with MCP tool support.
Troubleshooting
Claude Code returns an authentication error
Claude Code returns an authentication error
Check that
ANTHROPIC_API_KEY is present in ~/.claude/config.json. The value can be anything — LM Studio ignores it — but omitting the key causes Claude Code to reject the configuration.Connection refused or timeout on port 1234
Connection refused or timeout on port 1234
Confirm LM Studio’s server is running (green indicator in the Developer tab). If you are connecting over Tailscale, verify both machines appear as connected peers with
tailscale status and that you are using the correct 100.x.x.x IP.Responses are very slow
Responses are very slow
Switch to a smaller model. The 32B Qwen model is the recommended starting point. If you loaded a 70B or 120B model, latency will be significantly higher. See the model selection guide for a detailed comparison.
MCP tools are not executing
MCP tools are not executing
MCP tools run locally on your Mac through the Claude Code CLI, regardless of where the LLM is hosted. Run
claude mcp list to see which tools are registered. If the list is empty, add tools with claude mcp add <name> <command>.