obsidian/wiki/claude-code/lmstudio-server-settings.md
2026-04-30 14:42:43 +01:00

3.1 KiB

title aliases tags sources created updated
LM Studio Server Settings
lmstudio-server-config
lm-studio-api-server-settings
lmstudio
api-server
configuration
mcp
jit
cors
auth
raw/Server Settings.md
2026-04-30 2026-04-30

LM Studio Server Settings

Configuration options for the LM Studio API server — accessible from the LM Studio UI or lms CLI. Controls port, auth, network access, MCP permissions, CORS, and JIT model memory management.

Network & Access

Setting Type Description
Server Port Integer Port the API server listens on (default 1234)
Serve on Local Network Switch Binds server to LAN IP so other devices can reach it — see wiki/claude-code/lmstudio-serve-on-network
Enable CORS Switch Allow cross-origin requests (needed for browser-based clients hitting a local server)

Authentication

Setting Type Description
Require Authentication Switch Clients must pass a valid token in Authorization header — see wiki/claude-code/lmstudio-anthropic-compat

Authentication is a prerequisite for enabling MCP server access from mcp.json.

MCP (Model Context Protocol)

Setting Type Description
Allow per-request MCPs Switch Clients may specify ephemeral remote MCP servers in individual requests (not in mcp.json). Only remote MCPs supported.
Allow calling servers from mcp.json Switch Clients may use MCP servers defined in your LM Studio mcp.json. Requires Auth enabled. Security risk if those servers have filesystem/data access.

Related: wiki/claude-code/mcp-integration

JIT (Just-in-Time) Model Loading

Saves RAM by loading models on demand rather than pre-loading them.

Setting Type Description
Just in Time Model Loading Switch Load a model at request time if not already loaded
Auto Unload Unused JIT Models Switch Automatically evict JIT models when idle
Only Keep Last JIT Loaded Model Switch Evict all but the most recently used JIT model — minimizes RAM usage

For deeper JIT / TTL / eviction behavior, see wiki/claude-code/lmstudio-idle-ttl-auto-evict.

Key Takeaways

  • Port is the only integer setting; all others are on/off switches.
  • Auth is a gatemcp.json server access won't work without it enabled.
  • Per-request MCPs are ephemeral and remote-only; they don't persist after the request.
  • CORS must be on for any browser app (web UI, local HTML tool) to call the API.
  • JIT trio (JIT LoadAuto UnloadOnly Keep Last) progressively tightens memory: enable all three on low-RAM machines.
  • LAN access via wiki/claude-code/lmstudio-serve-on-network is a separate setting from CORS — you may need both.

Sources