Enables seamless communication between Claude and locally running LLM models via LM Studio using Model Context Protocol, offering health checks, model listing, current model retrieval, and local model text generation capabilities.
Unlock the full potential of LMStudio-MCP through LangDB's AI Gateway. Get enterprise-grade security, analytics, and seamless integration with zero configuration.
Free tier available • No credit card required
A Model Control Protocol (MCP) server that allows Claude to communicate with locally running LLM models via LM Studio.
LMStudio-MCP creates a bridge between Claude (with MCP capabilities) and your locally running LM Studio instance. This allows Claude to:
This enables you to leverage your own locally running models through Claude's interface, combining Claude's capabilities with your private models.
Clone this repository:
git clone https://github.com/infinitimeless/LMStudio-MCP.git cd LMStudio-MCP
Install the required packages:
pip install requests "mcp[cli]" openai
For Claude to connect to this bridge, you need to configure the MCP settings properly. You can either:
Use directly from GitHub:
{ "lmstudio-mcp": { "command": "uvx", "args": [ "https://github.com/infinitimeless/LMStudio-MCP" ] } }
Use local installation:
{ "lmstudio-mcp": { "command": "/bin/bash", "args": [ "-c", "cd /path/to/LMStudio-MCP && source venv/bin/activate && python lmstudio_bridge.py" ] } }
For detailed MCP configuration instructions, see MCP_CONFIGURATION.md.
Start your LM Studio application and ensure it's running on port 1234 (the default)
Load a model in LM Studio
If running locally (not using uvx
), run the LMStudio-MCP server:
python lmstudio_bridge.py
In Claude, connect to the MCP server when prompted by selecting "lmstudio-mcp"
The bridge provides the following functions:
health_check()
: Verify if LM Studio API is accessiblelist_models()
: Get a list of all available models in LM Studioget_current_model()
: Identify which model is currently loadedchat_completion(prompt, system_prompt, temperature, max_tokens)
: Generate text from your local modelIf Claude reports 404 errors when trying to connect to LM Studio:
If certain models don't work correctly:
For more detailed troubleshooting help, see TROUBLESHOOTING.md.
MIT
This project was originally developed as "Claude-LMStudio-Bridge_V2" and has been renamed and open-sourced as "LMStudio-MCP".
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!