LLM Bridge MCP
LLM 桥梁 MCP
LLM Bridge MCP 允许 AI 代理通过标准化接口与多个大型语言模型进行交互。它利用消息控制协议 (MCP) 无缝访问不同的 LLM 提供程序,从而轻松在模型之间切换或在同一应用程序中使用多个模型。
特征
多个 LLM 提供商的统一接口:
OpenAI(GPT 模型)
人类学(克劳德模型)
谷歌(Gemini 型号)
DeepSeek
...
使用 Pydantic AI 构建,用于类型安全和验证
支持可定制的参数,如温度和最大令牌
提供使用情况跟踪和指标
Related MCP server: MindBridge MCP Server
工具
服务器实现了以下工具:
run_llm(
prompt: str,
model_name: KnownModelName = "openai:gpt-4o-mini",
temperature: float = 0.7,
max_tokens: int = 8192,
system_prompt: str = "",
) -> LLMResponseprompt:发送给 LLM 的文本提示model_name:要使用的特定模型(默认值:“openai:gpt-4o-mini”)temperature:控制随机性(0.0 到 1.0)max_tokens:要生成的最大令牌数system_prompt:可选的系统提示,用于指导模型的行为
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 llm-bridge-mcp:
npx -y @smithery/cli install @sjquant/llm-bridge-mcp --client claude手动安装
克隆存储库:
git clone https://github.com/yourusername/llm-bridge-mcp.git
cd llm-bridge-mcp安装uv (如果尚未安装):
# On macOS
brew install uv
# On Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"配置
使用您的 API 密钥在根目录中创建一个.env文件:
OPENAI_API_KEY=your_openai_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key
GOOGLE_API_KEY=your_google_api_key
DEEPSEEK_API_KEY=your_deepseek_api_key用法
与 Claude Desktop 或 Cursor 一起使用
将服务器条目添加到您的 Claude Desktop 配置文件或.cursor/mcp.json :
"mcpServers": {
"llm-bridge": {
"command": "uvx",
"args": [
"llm-bridge-mcp"
],
"env": {
"OPENAI_API_KEY": "your_openai_api_key",
"ANTHROPIC_API_KEY": "your_anthropic_api_key",
"GOOGLE_API_KEY": "your_google_api_key",
"DEEPSEEK_API_KEY": "your_deepseek_api_key"
}
}
}故障排除
常见问题
1. “spawn uvx ENOENT”错误
当系统在 PATH 中找不到uvx可执行文件时,就会发生此错误。解决方法如下:
解决方案:使用 uvx 的完整路径
找到 uvx 可执行文件的完整路径:
# On macOS/Linux
which uvx
# On Windows
where.exe uvx然后更新您的 MCP 服务器配置以使用完整路径:
"mcpServers": {
"llm-bridge": {
"command": "/full/path/to/uvx", // Replace with your actual path
"args": [
"llm-bridge-mcp"
],
"env": {
// ... your environment variables
}
}
}执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。
Available Tools
1 toolrun_llmB
Run a prompt through an LLM and return the response.
Inputs: prompt (required), model_name, temperature, max_tokens, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity. The tool's purpose is clear and distinct.
A single tool means naming is trivially consistent. 'run_llm' is descriptive and follows a clear verb_noun pattern.
One tool for an LLM bridge is far too few. Typical servers in this domain include multiple tools for model selection, streaming, or context management.
The server offers only a basic 'run' operation with no supporting tools for model listing, configuration, or advanced features, leaving significant gaps.
Maintenance
Related MCP Connectors
One API key, dozens of capabilities for your AI agent. Zero provider auth.
One MCP endpoint for Claude, GPT & Gemini: 100+ tools + no-code connectors + agent workers.
Build, validate, and deploy multi-agent AI solutions from any AI environment.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceFacilitates enhanced interaction with large language models (LLMs) by providing intelligent context management, tool integration, and multi-provider AI model coordination for efficient AI-driven workflows.MIT
- AlicenseCqualityDmaintenanceAn AI router that connects applications to multiple LLM providers (OpenAI, Anthropic, Google, DeepSeek, Ollama, etc.) with smart model orchestration capabilities, enabling dynamic switching between models for different reasoning tasks.341MIT
- AlicenseAqualityDmaintenanceEnables AI agents to connect to and chat with multiple LLM models (OpenAI, OpenRouter, custom endpoints) with conversation history management and model switching capabilities.318 npm2MIT
- AlicenseNot gradedqualityCmaintenanceEnables IDE agents to delegate coding tasks to any LLM provider — cloud APIs like NVIDIA NIM, OpenRouter, Groq, DeepSeek or local Ollama models — through a unified MCP interface.3MIT