
Mcp Llm Gateway
io.github.daedalus由 GitHub 账号 daedalus 发布v0.1.0更新于 Oct 24, 2026
MCP-compatible LLM gateway that proxies completion requests.
概览
本地 MCP 网关,让助手列出模型并向兼容 OpenAI 的 LLM 服务商发送补全请求。
- 可以做什么
- 从配置的远程端点或默认模型目录列出可用模型,并以资源形式读取同一列表。向兼容 OpenAI 的下游服务商发送补全请求,可指定模型、最大 token 数和温度。以资源形式读取当前网关配置。
- 适用场景
- 适合希望让助手通过自有的兼容 OpenAI 端点或模型网关转发补全请求,或在该端点提供的多个模型之间选择与比较的场景。
- 运行要求
- 以本地 Python 进程运行,从 PyPI 安装(pip install mcp-llm-gateway),使用 stdio 传输。需要设置 DOWNSTREAM_URL 和 DEFAULT_MODEL 环境变量;MODEL_LIST_URL、API_KEY 和 TIMEOUT 为可选。需要能访问下游服务商的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp Llm Gateway,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
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
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 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
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
来源:README.md,提交 eef35d0
工具
0版本历史
1- v0.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分