infinitimeless/LMStudio-MCP
A Model Control Protocol (MCP) server that allows Claude to communicate with locally running LLM models via LM Studio.
fb33671e20b6Paths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
Top risks in plain words
- INFONo published risk: no tool declared to run commands, files, addresses or queries of the caller's choice, no known vulnerability in a production package, no advisory. Code findings appear here only after a person has verified them.
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 9 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
chat_completion, continue_conversation, create_response, generate_embeddings, get_current_model, health_check and 3 moreNo tool was seen to: start other programs on the machine; read or write files; read passwords, tokens or keys; read environment variables; touch sensitive locations.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
LMSTUDIO_API_BASE· chat_completion, continue_conversation, create_response +6
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.
- web or API responses9 tools · chat_completion, continue_conversation, create_response +6
Not all three are present in the tools the scanner traced.
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (9: 9 tools)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
chat_completiontool Generate a chat completion from the current LM Studio model.Networkoutside text
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 promptcontinue_conversationtool Continue a stateful conversation started with start_conversation.Networkoutside text
Continue a stateful conversation started with start_conversation.
Sends the next message in a conversation, automatically chaining
context via the response_id. The system prompt from the original
start_conversation call is preserved throughout — you never need
to re-send it.
Args:
response_id: The 'response_id' returned by start_conversation
or a previous continue_conversation call
message: Your next message in the conversation
temperature: Controls randomness (0.0 to 1.0, default 0.7)
max_tokens: Maximum tokens per response (default 2048)
model: Model to use. Auto-detected if omitted.
Returns:
JSON string with keys:
- response_id: pass this to the next continue_conversation call
- message: the model's response
- model: the model that was usedcreate_responsetool Create a stateful response using LM Studio's /v1/responses endpoint.Networkoutside text
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: ID from a previous create_response call to
continue the conversation
reasoning_effort: Reasoning depth - "low", "medium", or "high"
(default "medium")
stream: Whether to stream the response (default False)
model: Model to use. If omitted, the currently loaded model is
detected automatically.
Returns:
JSON string with the response, including an 'id' field you can
pass as previous_response_id in the next call.
Inspired by @ahmedibrahim085 (https://github.com/ahmedibrahim085/LMStudio-MCP)generate_embeddingstool Generate vector embeddings for text using LM Studio.Networkoutside text
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)get_current_modeltool Get the currently loaded model in LM Studio.Networkoutside text
Get the currently loaded model in LM Studio.
Returns:
The name of the currently loaded model.health_checktool Check if LM Studio API is accessible.Networkoutside text
Check if LM Studio API is accessible.
Returns:
A message indicating whether the LM Studio API is running.list_modelstool List all available models in LM Studio.Networkoutside text
List all available models in LM Studio.
Returns:
A formatted list of available models.start_conversationtool Start a stateful conversation with a persistent system prompt.Networkoutside text
Start a stateful conversation with a persistent system prompt.
This is the recommended way to begin a multi-turn conversation with
your local model. It locks in a system prompt for the entire session
and returns a response_id you can pass to continue_conversation for
all subsequent turns — no need to re-send the system prompt or
manage message history manually.
Typical workflow:
1. Call start_conversation(system_prompt=..., first_message=...)
2. Note the 'response_id' in the returned JSON
3. Call continue_conversation(response_id=..., message=...) for
each subsequent turn
Args:
system_prompt: The persona or instructions to apply for the whole
conversation (e.g. "You are a friend at a bar,
keep it casual and fun")
first_message: The opening message to send to the model
temperature: Controls randomness (0.0 to 1.0, default 0.7)
max_tokens: Maximum tokens per response (default 2048)
model: Model to use. Auto-detected if omitted.
Returns:
JSON string with keys:
- response_id: pass this to continue_conversation
- message: the model's first response
- model: the model that was usedtext_completiontool Generate a raw text completion (non-chat format) from LM Studio.Networkoutside text
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)Text the model reads (9)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
health_check tool
Check if LM Studio API is accessible.
Returns:
A message indicating whether the LM Studio API is running.list_models tool
List all available models in LM Studio.
Returns:
A formatted list of available models.get_current_model tool
Get the currently loaded model in LM Studio.
Returns:
The name of the currently loaded model.chat_completion tool
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 prompttext_completion tool
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)generate_embeddings tool
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)create_response tool
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: ID from a previous create_response call to
continue the conversation
reasoning_effort: Reasoning depth - "low", "medium", or "high"
(default "medium")
stream: Whether to stream the response (default False)
model: Model to use. If omitted, the currently loaded model is
detected automatically.
Returns:
JSON string with the response, including an 'id' field you can
pass as previous_response_id in the next call.
Inspired by @ahmedibrahim085 (https://github.com/ahmedibrahim085/LMStudio-MCP)start_conversation tool
Start a stateful conversation with a persistent system prompt.
This is the recommended way to begin a multi-turn conversation with
your local model. It locks in a system prompt for the entire session
and returns a response_id you can pass to continue_conversation for
all subsequent turns — no need to re-send the system prompt or
manage message history manually.
Typical workflow:
1. Call start_conversation(system_prompt=..., first_message=...)
2. Note the 'response_id' in the returned JSON
3. Call continue_conversation(response_id=..., message=...) for
each subsequent turn
Args:
system_prompt: The persona or instructions to apply for the whole
conversation (e.g. "You are a friend at a bar,
keep it casual and fun")
first_message: The opening message to send to the model
temperature: Controls randomness (0.0 to 1.0, default 0.7)
max_tokens: Maximum tokens per response (default 2048)
model: Model to use. Auto-detected if omitted.
Returns:
JSON string with keys:
- response_id: pass this to continue_conversation
- message: the model's first response
- model: the model that was usedcontinue_conversation tool
Continue a stateful conversation started with start_conversation.
Sends the next message in a conversation, automatically chaining
context via the response_id. The system prompt from the original
start_conversation call is preserved throughout — you never need
to re-send it.
Args:
response_id: The 'response_id' returned by start_conversation
or a previous continue_conversation call
message: Your next message in the conversation
temperature: Controls randomness (0.0 to 1.0, default 0.7)
max_tokens: Maximum tokens per response (default 2048)
model: Model to use. Auto-detected if omitted.
Returns:
JSON string with keys:
- response_id: pass this to the next continue_conversation call
- message: the model's response
- model: the model that was usedWhat we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 9 tool handlers traced
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 9 tool handlers traced
- Reads or writes any file pathNo tool works on a file path the caller supplies without a root check — 9 tool handlers traced
- Requests any addressNo tool sends a request to an address the caller supplies — 9 tool handlers traced
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 9 tool handlers traced
- Tools that start processesNot seen in the traced code of 9 capabilities; 9 more call code the scanner could not follow, where it may happen
- Tools that touch filesNot seen in the traced code of 9 capabilities; 9 more call code the scanner could not follow, where it may happen
- Tools that call the network9 of 9 capabilities call the network
Where the code is: 9 handlers in 1 file at commit fb33671e20b6
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests1 manifest: requirements.txt
- Lockfiles checked against OSV1 file resolved and checked against the OSV database; 2 not resolved: requirements.txt: 3 dependency lines carry no exact version, so the installed version was not checked; pin them or add a lockfile; setup.py: dependency ranges declared here were not resolved against a lockfile and were not checked
- Known vulnerabilities in production dependenciesNo production dependency with a known advisory
- Known vulnerabilities in other dependenciesNo package used only for development, tests or examples has a known advisory
- MCP SDK versionmcp >=1.2,<2
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 9 capabilities; 9 more call code the scanner could not follow, where it may happen
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (0 in production)
Dependency ranges were not resolved against a lockfile, so the score is capped at 7.
No known vulnerabilities in the production dependencies that could be checked.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | stdio |
| Sign-in | not checked needs the live server |
| MCP SDK | mcp >=1.2,<2 |
| Servers in the code | 1 (lmstudio-bridge) |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-11-09 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 3 catalogs (github_search, glama, mcp_toplist) |
|---|---|
| License | MIT |
| Created | 2025-03-22 |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.