A Model Control Protocol (MCP) server that allows Claude to communicate with locally running LLM models via LM Studio
LMStudio-MCP has 7 tools with clear naming conventions (verb_noun pattern: health_check, list_models, get_current_model, chat_completion, text_completion, generate_embeddings, create_response). All tools have descriptions ranging from 80-350 characters, meeting the baseline minimum. Input schemas are visible and typed for all tools. However, significant gaps exist: (1) Output schemas are NOT documented anywhere, tool descriptions describe what they return but no formal output schema is provided, violating the pattern:tool requirement. (2) Error handling is absent, no recovery guidance, no categorization of errors as retryable/user-fixable/fatal. (3) Parameter descriptions lack granularity, e.g., temperature is described as 'Controls randomness (0.0 to 1.0)' but the text_completion tool allows 0.0 to 2.0, creating inconsistency. (4) No tool annotations (readOnlyHint/destructiveHint) despite all being READ_ONLY. (5) Dependencies between tools are undocumented, generate_embeddings notes 'must have an embedding model loaded' but doesn't guide the user on how to switch models. Average tool score: 62/100.
Generate a chat completion from the current LM Studio model. Args: prompt: The user's prompt to send to the model system_prompt: Optional system instructions for the model temperature: Controls randomness (0.0 to 1.0) max_tokens: Maximum number of tokens to generate Returns: The model's response to the prompt
Create a stateful response using LM Studio's /v1/responses endpoint. Unlike chat_completion, this endpoint maintains conversation context automatically via response IDs - no manual message history needed. Pass the ID from a previous response to continue the conversation. Requires LM Studio v0.3.29 or later. Args: input_text: The user's input text previous_response_id: Optional ID from a prior response to continue conversation reasoning_effort: Level of reasoning for complex tasks ("low", "medium", "high") stream: Whether to return results as they are generated (default false) model: Optional model override; omit to use the currently loaded model Returns: JSON response with response_id, output, and metadata for continuing the conversation
Generate vector embeddings for text using LM Studio. Supports single text or batch processing. Useful for RAG systems, semantic search, and text similarity comparisons. Note: You must have an embedding model loaded in LM Studio (e.g. 'text-embedding-nomic-embed-text-v1.5'). The default chat model will not work with this endpoint. Args: text: Single text string or list of texts to embed model: Embedding model to use. Omit to use the currently loaded model, but an embedding-specific model is recommended. Returns: JSON string with embeddings data including vectors and usage info Inspired by @ahmedibrahim085 (https://github.com/ahmedibrahim085/LMStudio-MCP)
Output schemas are not documented. While tool descriptions mention return types verbally ('The model's response to the prompt', 'JSON response with response_id...'), no formal output schema with typed fields is provided. LLMs cannot plan downstream tool calls or extract structured data without knowing the exact response schema.
No error handling guidance. Tools provide no recovery hints, error categorization, or suggestions on what the LLM should do next if a call fails. For example, if LM Studio API is unavailable, the LLM has no guidance on whether to retry, check health_check first, or inform the user.
Tool annotations missing. All 7 tools are marked Risk: READ_ONLY but no readOnlyHint is present in the schemas. This requires the LLM to infer safety from the Risk field, which is not standard MCP.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 62 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 40 | - | v1 |
Get the currently loaded model in LM Studio. Returns: The name of the currently loaded model.
Check if LM Studio API is accessible. Returns: A message indicating whether the LM Studio API is running.
List all available models in LM Studio. Returns: A formatted list of available models.
Generate a raw text completion (non-chat format) from LM Studio. Simpler and faster than chat_completion for single-turn tasks like code completion or text continuation - no chat formatting overhead. Args: prompt: The text prompt to complete temperature: Controls randomness (0.0 to 2.0, default 0.7) max_tokens: Maximum number of tokens to generate (default 2048) stop_sequences: Optional list of sequences where generation will stop Returns: The completed text from the model Inspired by @ahmedibrahim085 (https://github.com/ahmedibrahim085/LMStudio-MCP)
Parameter constraint inconsistency. chat_completion describes temperature as 0.0 - 1.0, but text_completion allows 0.0 - 2.0. This inconsistency forces the LLM to reason about which range applies and risks invalid inputs.
Missing tool dependency documentation. generate_embeddings requires an embedding-specific model but doesn't guide the user on how to switch models or call list_models first. The description notes this requirement but provides no actionable next step.