Claude-LMStudio Bridge
Claude-LMStudio Bridge
将 Claude 与在 LM Studio 中运行的本地 LLM 连接起来的 MCP 服务器。
概述
该工具允许 Claude 与在 LM Studio 中运行的本地 LLM 进行交互,提供:
访问 LM Studio 中所有可用模型的列表
使用本地法学硕士 (LLM) 生成文本的能力
通过本地模型支持聊天完成
用于验证与 LM Studio 连接的健康检查工具
Related MCP server: Claude-LMStudio-Bridge
先决条件
支持 MCP 的Claude Desktop
LM Studio在本地安装并运行,并启用 API 服务器
已安装 Python 3.8+
快速启动(推荐)
对于 macOS/Linux:
克隆存储库
git clone https://github.com/infinitimeless/claude-lmstudio-bridge.git
cd claude-lmstudio-bridge运行安装脚本
chmod +x setup.sh
./setup.sh按照安装脚本的说明配置 Claude Desktop
对于 Windows:
克隆存储库
git clone https://github.com/infinitimeless/claude-lmstudio-bridge.git
cd claude-lmstudio-bridge运行安装脚本
setup.bat按照安装脚本的说明配置 Claude Desktop
手动设置
如果您希望手动设置:
创建虚拟环境(可选但推荐)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate安装所需的软件包
pip install -r requirements.txt配置Claude桌面:
打开 Claude Desktop 偏好设置
导航至“MCP 服务器”部分
添加一个新的 MCP 服务器,配置如下:
名称:lmstudio-bridge
命令:/bin/bash(在 macOS/Linux 上)或 cmd.exe(在 Windows 上)
参数:
macOS/Linux:/path/to/claude-lmstudio-bridge/run_server.sh
Windows:/c C:\path\to\claude-lmstudio-bridge\run_server.bat
与 Claude 一起使用
设置好桥接器后,可以在Claude中使用以下命令:
检查与 LM Studio 的连接:
Can you check if my LM Studio server is running?列出可用的模型:
List the available models in my local LM Studio使用本地模型生成文本:
Generate a short poem about spring using my local LLM发送聊天完成:
Ask my local LLM: "What are the main features of transformers in machine learning?"故障排除
诊断 LM Studio 连接问题
使用附带的调试工具检查您的 LM Studio 连接:
python debug_lmstudio.py更详细的测试:
python debug_lmstudio.py --test-chat --verbose常见问题
“无法连接到 LM Studio API”
确保 LM Studio 正在运行
验证 LM Studio 中已启用 API 服务器(设置 > API 服务器)
检查端口(默认值:1234)是否与 .env 文件中的端口匹配
“未加载任何模型”
打开 LM Studio 并加载模型
验证模型是否运行成功
“未找到 MCP 包”
尝试重新安装:
pip install "mcp[cli]" httpx python-dotenv确保你使用的是 Python 3.8 或更高版本
“克劳德找不到桥”
检查 Claude Desktop 配置
确保 run_server.sh 或 run_server.bat 的路径正确且绝对
验证服务器脚本是否可执行:
chmod +x run_server.sh(在 macOS/Linux 上)
高级配置
您可以通过创建具有以下设置的.env文件来自定义桥接行为:
LMSTUDIO_HOST=127.0.0.1
LMSTUDIO_PORT=1234
DEBUG=false设置DEBUG=true以启用详细日志记录以进行故障排除。
执照
麻省理工学院
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Control Protocol (MCP) server that allows Claude to communicate with locally running LLM models via LM Studio.MIT
- AlicenseNot gradedqualityFmaintenanceA simple MCP server that enables Claude to communicate with locally running LLM models via LM Studio.9MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that lets Claude Code delegate mechanical tasks to a local LLM for summarization, classification, extraction, and drafting.1210MIT
- AlicenseAqualityDmaintenanceMCP server bridging Claude Code to local llama.cpp. Run local LLMs alongside Claude for experimentation, testing, and cost-effective inference.19131MIT
Appeared in Searches
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/infinitimeless/claude-lmstudio-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server