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 | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dam2452/llmstudio-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server