llmstudio-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LMSTUDIO_MCP_API_KEY | No | API token (only if you enabled token auth in LM Studio's Developer tab) | |
| LMSTUDIO_MCP_TIMEOUT | No | HTTP timeout in seconds; raise for slow models or large generations | 60.0 |
| LMSTUDIO_MCP_BASE_URL | No | LM Studio server URL | http://localhost:1234 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_modelsA | List models available in the local LM Studio instance. Queries /api/v0/models which returns every downloaded model with rich metadata: type (llm / vlm / embeddings), publisher, arch, quantization, state (loaded / not-loaded), and max_context_length. Examples: list_models() list_models(type="llm") list_models(type="embeddings") |
| get_modelB | Get detailed info about a single model. Examples: get_model(model_key="qwen/qwen3-4b-2507") get_model(model_key="text-embedding-nomic-embed-text-v1.5") |
| get_loaded_modelsA | List models currently loaded into memory (ready for inference). Examples: get_loaded_models() |
| load_modelA | Load a model into memory so it is ready for inference. If context_length is omitted, the model's configured default is used. Only LLMs loaded via LM Studio's llama.cpp engine honor flash_attention, num_experts, eval_batch_size and offload_kv_cache_to_gpu. Examples: load_model(model_key="qwen/qwen3-4b-2507") load_model(model_key="openai/gpt-oss-20b", context_length=16384, flash_attention=True) |
| unload_modelA | Unload a model instance from memory, freeing RAM / VRAM. The instance_id is the identifier returned by load_model (usually equal to the model key, but may differ when multiple instances of the same model are loaded). Use get_loaded_models to discover currently loaded instance_ids. Examples: unload_model(instance_id="qwen/qwen3-4b-2507") |
| chatA | Send a chat completion request to a model (OpenAI-compatible /v1/chat/completions). The model is auto-loaded if not already in memory (JIT loading enabled by default in LM Studio). Set stream=True only when the MCP client supports streamed responses; most do not. Examples: chat(model="qwen/qwen3-4b-2507", messages=[{"role":"user","content":"Hello"}]) chat(model="qwen/qwen3-4b-2507", messages=[{"role":"system","content":"Be terse."},{"role":"user","content":"Hi"}], temperature=0.2, max_tokens=64) |
| completeA | Send a raw text-completion request to a model (OpenAI-compatible /v1/completions). Prefer chat() for instruction-tuned conversational models. complete() is useful for base / completion models or for prompt-template experimentation. Examples: complete(model="qwen/qwen3-4b-2507", prompt="The meaning of life is", max_tokens=20) |
| embedA | Generate an embedding vector for the given text (OpenAI-compatible /v1/embeddings). input can be a single string or a list of strings for batch embedding. Examples: embed(model="text-embedding-nomic-embed-text-v1.5", input="hello world") embed(model="text-embedding-nomic-embed-text-v1.5", input=["hello", "world"], normalize=True) |
| raw_requestA | Escape hatch: send an arbitrary request to the LM Studio REST API. Use this when you need an endpoint not covered by a dedicated tool (e.g. /api/v1/chat stateful chats, /api/v1/models/download, /v1/responses, the Anthropic-compatible /v1/messages, etc.). path must start with a slash and is appended to the configured base URL. Examples: raw_request(method="GET", path="/api/v0/models") raw_request(method="POST", path="/api/v1/chat", json_body={"model":"qwen/qwen3-4b-2507","messages":[{"role":"user","content":"hi"}]}) |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 9 tools
Each tool has a distinct purpose: chat, complete, and embed for inference; list_models, get_model, load_model, unload_model for model management; raw_request as an escape hatch. No functional overlap.
Consistent verb_noun pattern (e.g., get_loaded_models, list_models, load_model) with simple action verbs for inference (chat, complete, embed). All lowercase with underscores; clear and predictable.
9 tools cover the core server management lifecycle: model discovery, loading/unloading, inference, and a raw_request for extensibility. Neither too few nor too many for the domain.
Covers all essential operations: model listing, loading, inference (chat/complete/embed), and unloading. Missing model download/delete is a minor gap, but raw_request can handle edge cases.