Claude-LMStudio-Bridge
by infinitimeless
The Claude-LMStudio-Bridge is a Model Control Protocol (MCP) server that allows Claude to communicate with locally running LLM models via LM Studio. This bridge enables Claude to send prompts to locally running models in LM Studio and receive their responses.
Last updated: N/A
What is Claude-LMStudio-Bridge?
This is a bridge that allows Anthropic's Claude to interact with locally hosted LLMs through LM Studio using the Model Control Protocol (MCP). It acts as a server that Claude can connect to and send prompts to, which are then forwarded to LM Studio and the responses are returned to Claude.
How to use Claude-LMStudio-Bridge?
- Install LM Studio and load your preferred model. 2. Clone the repository and install the required Python packages. 3. Run the bridge server using
python lmstudio_bridge.py
. 4. Configure Claude to use the MCP server and point it to the bridge's address. 5. Use MCP tools in Claude's interface to interact with the local model.
Key features of Claude-LMStudio-Bridge
Enables Claude to use local LLMs
Allows comparison of Claude's responses with other models
Provides access to specialized local models
Enables running queries with limited Claude API quota
Keeps sensitive queries entirely local
Use cases of Claude-LMStudio-Bridge
Comparing Claude's responses with different models
Accessing specialized local models for specific tasks
Running queries when Claude API quota is limited
Keeping sensitive queries entirely local
Experimenting with different LLMs without relying solely on cloud services
FAQ from Claude-LMStudio-Bridge
What is LM Studio?
What is LM Studio?
LM Studio is a software that allows you to run LLMs locally on your machine.
What is MCP?
What is MCP?
MCP stands for Model Control Protocol, a protocol that allows Claude to interact with external models.
What are the prerequisites for using this bridge?
What are the prerequisites for using this bridge?
Python 3.8+, Anthropic Claude with MCP capability, LM Studio running locally, and local LLM model(s) loaded in LM Studio.
How do I configure Claude to use the bridge?
How do I configure Claude to use the bridge?
Enable the MCP server in Claude's interface and point it to the address where the bridge is running (usually http://localhost:1234/v1).
What if LM Studio is running on a different port?
What if LM Studio is running on a different port?
Modify the LMSTUDIO_API_BASE
variable in lmstudio_bridge.py
to reflect the correct port.