Mcp Llm Gateway

io.github.daedalus由 GitHub 帳號 daedalus 發布v0.1.0更新於 Oct 24, 2026

MCP-compatible LLM gateway that proxies completion requests.

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

本機 MCP 閘道,讓助理列出模型並向相容 OpenAI 的 LLM 供應商送出補全請求。

可以做什麼
從設定的遠端端點或預設模型目錄列出可用模型,並以資源形式讀取同一份清單。向相容 OpenAI 的下游供應商送出補全請求,可指定模型、最大 token 數與溫度。以資源形式讀取目前的閘道設定。
適用情境
適合想讓助理透過自有的相容 OpenAI 端點或模型閘道轉送補全請求,或在該端點提供的多個模型之間選擇與比較的情境。
執行需求
以本機 Python 程序執行,從 PyPI 安裝(pip install mcp-llm-gateway),使用 stdio 傳輸。需要設定 DOWNSTREAM_URL 與 DEFAULT_MODEL 環境變數;MODEL_LIST_URL、API_KEY 與 TIMEOUT 為選用。需要能連線至下游供應商的網路。
安裝前請注意
API_KEY 環境變數會透傳給下游供應商,應視為機密。補全請求會送往設定的下游 URL,提示內容會離開本機交給該第三方。config://info 資源會揭露目前的閘道設定,可能包含端點資訊。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp Llm Gateway,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

MCP LLM Gateway

MCP-compatible LLM gateway that proxies completion requests to downstream OpenAI-compatible providers.

[PyPI] [Python] [Ruff]

mcp-name: io.github.daedalus/mcp-llm-gateway

Install

bash
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:

bash
mcp-llm-gateway

MCP Tools

The server exposes the following tools:

  • list_models(): List all available models from the remote endpoint
  • complete(prompt, model, max_tokens, temperature): Send a completion request to the downstream LLM provider

MCP Resources

  • models://list: Returns the list of available models
  • config://info: Returns current gateway configuration

Development

bash
git clone https://github.com/daedalus/mcp-llm-gateway.gitcd mcp-llm-gatewaypip install -e ".[test]"
# run testspytest
# formatruff format src/ tests/
# lintruff check src/ tests/
# type checkmypy src/

API

core.models

  • Model: Dataclass representing an available LLM model
  • CompletionRequest: Dataclass for completion request payloads
  • GatewayConfig: Dataclass for gateway configuration

adapters.http

  • HTTPAdapter: HTTP client for downstream API communication
  • ModelListAdapter: Adapter for fetching model list from remote endpoints

services.gateway

  • ModelService: Service for managing model discovery and caching
  • CompletionService: Service for handling completion requests
  • ConfigService: Service for managing gateway configuration

來源:README.md,提交 eef35d0

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分