---
title: "LM Studio Server Settings"
aliases: [lmstudio-server-config, lm-studio-api-server-settings]
tags: [lmstudio, api-server, configuration, mcp, jit, cors, auth]
sources: [raw/Server Settings.md]
created: 2026-04-30
updated: 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\|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\|LM Studio Auth docs]] |

> 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\|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\|Idle TTL and Auto-Evict]].

## Key Takeaways

- **Port** is the only integer setting; all others are on/off switches.
- **Auth is a gate** — `mcp.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 Load` → `Auto Unload` → `Only Keep Last`) progressively tightens memory: enable all three on low-RAM machines.
- LAN access via [[wiki/claude-code/lmstudio-serve-on-network\|Serve on Network]] is a separate setting from CORS — you may need both.

## Sources

- `raw/Server Settings.md` — scraped from [lmstudio.ai/docs/developer/core/server/settings](https://lmstudio.ai/docs/developer/core/server/settings)
