Claude Code reads a JSON configuration file at startup to decide where to send API requests and how to behave. By default it connects to Anthropic’s cloud API, which requires an active Anthropic subscription. ApexSpriteAI overrides this default by pointing Claude Code at your local LM Studio server instead. This page explains the configuration file, the environment variable alternative, and where MCP settings are stored.Documentation Index
Fetch the complete documentation index at: https://reliatrack.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The ~/.claude/config.json file
Claude Code stores its configuration in ~/.claude/config.json on your Mac. If the file does not exist yet, create it — Claude Code reads it automatically on each invocation.
The most important field is ANTHROPIC_BASE_URL. When this field is present, Claude Code bypasses Anthropic’s OAuth flow entirely and routes all /v1/messages requests to the URL you specify. This is how ApexSpriteAI directs traffic to LM Studio.
Example configuration for remote GPU (Tailscale)
100.82.56.40 with your GPU server’s Tailscale IP address.
Example configuration for local-only mode
Do not include a trailing slash or the
/v1/messages path in ANTHROPIC_BASE_URL. Claude Code appends the path automatically.Full config.json with MCP settings
If you have MCP servers configured, your file will contain an additionalmcpServers key alongside the env block:
Setting ANTHROPIC_BASE_URL as a shell environment variable
As an alternative to config.json, you can export ANTHROPIC_BASE_URL in your shell profile. This is useful when you want to switch between local and cloud mode without editing a file, or when running Claude Code in CI pipelines.
Add one of the following to your ~/.zshrc or ~/.bash_profile:
When both
config.json and a shell environment variable are present, the shell environment variable takes precedence.MCP configuration
MCP (Model Context Protocol) servers are registered with theclaude mcp add command. Claude Code writes the resulting configuration into ~/.claude/config.json under the mcpServers key automatically — you do not need to edit the file by hand when adding a new MCP server.
mcpServers block should contain a new entry for filesystem.
Validating your configuration
Run the following test to confirm that Claude Code is reaching LM Studio and not Anthropic’s cloud:Check the environment variable is set
source ~/.zshrc and check again, or verify that config.json contains the correct value.Confirm LM Studio is reachable
0.0.0.0.