io.github.daedalus/mcp-llm-gateway
MCP-compatible LLM gateway that proxies completion requests.
ماذا يمكنك أن تفعل مع io.github.daedalus/mcp-llm-gateway؟
list_models(): List all available models from the remote endpointcomplete(prompt, model, max_tokens, temperature): Send a completion request to the downstream LLM provider
التثبيت
أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: .cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).
mcp-llm-gatewayclaude mcp add mcp-llm-gateway -- uvx mcp-llm-gateway==0.1.0
{
"mcpServers": {
"mcp-llm-gateway": {
"command": "uvx",
"args": [
"mcp-llm-gateway==0.1.0"
]
}
}
}
التوثيق
مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.
MCP LLM Gateway
MCP-compatible LLM gateway that proxies completion requests to downstream OpenAI-compatible providers.
mcp-name: io.github.daedalus/mcp-llm-gateway
Install
pip install mcp-llm-gateway
Usage
Configuration
Set the following environment variables:
DOWNSTREAM_URL: Base URL for the OpenAI-compatible downstream API (required)DEFAULT_MODEL: Default model to use for completions (required)MODEL_LIST_URL: URL to fetch available models from (optional, defaults to models.dev)API_KEY: Optional API key for downstream (passthrough)TIMEOUT: Request timeout in seconds (optional, default: 60)
MCP Server
Run the MCP server with stdio transport:
mcp-llm-gateway
MCP Tools
The server exposes the following tools:
list_models(): List all available models from the remote endpointcomplete(prompt, model, max_tokens, temperature): Send a completion request to the downstream LLM provider
MCP Resources
models://list: Returns the list of available modelsconfig://info: Returns current gateway configuration
Development
git clone https://github.com/daedalus/mcp-llm-gateway.git
cd mcp-llm-gateway
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mypy src/
API
core.models
Model: Dataclass representing an available LLM modelCompletionRequest: Dataclass for completion request payloadsGatewayConfig: Dataclass for gateway configuration
adapters.http
HTTPAdapter: HTTP client for downstream API communicationModelListAdapter: Adapter for fetching model list from remote endpoints
services.gateway
ModelService: Service for managing model discovery and cachingCompletionService: Service for handling completion requestsConfigService: Service for managing gateway configuration
الأسئلة الشائعة
ما هو io.github.daedalus/mcp-llm-gateway؟
MCP-compatible LLM gateway that proxies completion requests.
كيف أثبّت io.github.daedalus/mcp-llm-gateway؟
يعمل على جهازك. في Claude Code: claude mcp add mcp-llm-gateway -- uvx mcp-llm-gateway==0.1.0. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.
هل يحتاج io.github.daedalus/mcp-llm-gateway إلى مفتاح API؟
لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.
هل io.github.daedalus/mcp-llm-gateway مفتوح المصدر؟
نعم. شيفرته متاحة على GitHub بترخيص MIT.
من يصون io.github.daedalus/mcp-llm-gateway؟
ينشره daedalus. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.
من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.