Gammainfra

com.gammainfra由 gammainfra.com 發布v0.1.1更新於 Nov 3, 2026

Smart LLM routing across every major provider via one OpenAI-shape API.

已驗證STDIO僅桌面金融AI 與機器學習

概覽

AI 產生的概覽

讓助理透過 GammaInfra 的智慧路由閘道送出對話補全請求,並列出模型價格、查詢餘額與各供應商健康狀態。

可以做什麼
  • 向任何支援的模型或智慧路由別名送出對話補全請求,可控制成本、延遲與品質,並回傳所用供應商、美元成本等路由中繼資料
  • 列出完整模型目錄,含每 token 價格與能力標記
  • 查詢託管餘額及選用的 BYOK 餘額
  • 查詢整體與各供應商健康狀態、即時延遲及 24 小時請求量
適用情境
適合想讓代理透過單一 OpenAI 相容介面呼叫多家大型語言模型供應商,並了解每次請求由誰服務、花費多少,或在選型前比較模型與價格的情境。
執行需求
透過 npx(Node.js)以 stdio 方式在本機執行。需要 GAMMAINFRA_API_KEY 中的 GammaInfra API 金鑰;可選用 GAMMAINFRA_BASE_URL 覆寫預設端點。需要能連線至 GammaInfra API 的網路。
安裝前請注意
API 金鑰是可計費憑證,透過環境變數傳入;請求會消耗帳戶額度,需留意成本控制與餘額。提示詞與訊息會傳送給 GammaInfra 及其上游供應商。回應不支援串流,且覆寫基礎網址會把流量導向其他端點。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

@gammainfra/mcp-server

Model Context Protocol (MCP) server for GammaInfra — intelligent LLM routing across every major provider via one OpenAI-shape API.

Drop this server into Claude Code, Claude Desktop, Cursor, Cline, Continue, or any MCP-compatible host, and your agent gets direct tool access to:

  • chat_completions — call any supported model (or gammainfra/auto for smart routing) with cost, latency, and quality controls. Routing metadata (which provider served, exact cost in USD, fallback chain) is returned as a structured routing_meta field.
  • list_models — full model catalog with pricing and capability flags.
  • get_balance — managed + BYOK balances.
  • get_status — overall + per-provider health, 24h request count.

Quickstart

  1. Get a GammaInfra API key — sign up free at https://gammainfra.com/signup ($3 trial credit, no credit card).
  2. Add the server to your MCP client config (instructions per client below).
  3. Restart the client. The four tools become available to your agent immediately.

Installation

The server runs via npx — no manual install needed. The first invocation downloads and caches the package.

Claude Code

claude mcp add gammainfra \
  --env GAMMAINFRA_API_KEY=sk-gammainfra-... \
  -- npx -y @gammainfra/mcp-server

Or edit ~/.claude.json and add to the mcpServers block:

{
  "mcpServers": {
    "gammainfra": {
      "command": "npx",
      "args": ["-y", "@gammainfra/mcp-server"],
      "env": { "GAMMAINFRA_API_KEY": "sk-gammainfra-..." }
    }
  }
}

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "gammainfra": {
      "command": "npx",
      "args": ["-y", "@gammainfra/mcp-server"],
      "env": { "GAMMAINFRA_API_KEY": "sk-gammainfra-..." }
    }
  }
}

Restart Claude Desktop. The "GammaInfra" server should appear in the tools menu.

Cursor

Edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "gammainfra": {
      "command": "npx",
      "args": ["-y", "@gammainfra/mcp-server"],
      "env": { "GAMMAINFRA_API_KEY": "sk-gammainfra-..." }
    }
  }
}

Cline (VS Code)

Open Cline's settings (gear icon → MCP Servers tab) and add:

{
  "gammainfra": {
    "command": "npx",
    "args": ["-y", "@gammainfra/mcp-server"],
    "env": { "GAMMAINFRA_API_KEY": "sk-gammainfra-..." },
    "disabled": false
  }
}

Environment variables

VarRequiredDefaultDescription
GAMMAINFRA_API_KEYyes—Your GammaInfra API key, format sk-gammainfra-{32_chars}.
GAMMAINFRA_BASE_URLnohttps://api.gammainfra.com/v1Override for staging/dev.

Tool reference

chat_completions

Send a chat completion request and receive the model response plus routing metadata.

Parameters:

NameTypeRequiredDescription
modelstringyesgammainfra/auto for smart routing, gammainfra/fast/gammainfra/cheap for tier shortcuts, or pin a specific model like openai/gpt-5-mini.
messagesarrayyesOpenAI-shape conversation messages.
temperaturenumberno0..2.
max_tokensintno
max_completion_tokensintnoGPT-5 family requires this instead of max_tokens.
cost_qualityfloatno0.0..1.0 continuous dial. Sent as X-GammaInfra-Cost-Quality.
max_latency_msintno60..600000. Caps total wall-clock incl. fallback retries. Also enforced client-side as a hard request abort.
preferencestringnoquality, cost, or latency.
regionstringnous, eu, apac, or specific AWS region.
tools, tool_choice, response_format, top_p, frequency_penalty, presence_penaltyvariousnoStandard OpenAI fields, forwarded as-is.

Returns: { response: <OpenAI response>, routing_meta: { provider, endpoint, cost_usd, input_cost_usd, output_cost_usd, router_version, logical_model, fallback_chain, attempted_count, request_id, ... } }

Timeout note: Every request has a 10-minute client-side hard timeout (via AbortController) so a hung upstream can't wedge the MCP process. For chat_completions, a supplied max_latency_ms replaces that default as the hard abort bound.

Streaming note: MCP tool responses are non-streaming. The server always sends stream: false to the upstream and does not accept a stream parameter on the tool input (it's rejected by schema validation). For streaming, use the GammaInfra HTTP API directly.

list_models

No parameters. Returns the full model catalog including direct-pin slugs, per-token pricing, and capability flags (supports_tools, supports_vision).

get_balance

NameTypeRequiredDescription
include_byokbooleannoDefault false. Also fetch the BYOK balance. Off by default to avoid an extra request — and a guaranteed 404 — for customers without BYOK enrollment.

Returns { managed_balance_usd, byok_balance_usd, currency }. With include_byok omitted/false, byok_balance_usd is null and no BYOK request is made (no byok_error). With include_byok: true, if BYOK isn't enrolled, byok_balance_usd is null and a byok_error field describes the cause.

get_status

No parameters. Returns GammaInfra's current overall health, per-provider state and live p50 latency, and 24h request count.

Development

git clone https://github.com/yuz0101/gammainfra-mcp-server.git
cd gammainfra-mcp-server
npm install
npm run test          # 30 tests, ~1s
npm run build         # tsc → dist/
npm run typecheck

License

MIT — see LICENSE.

來源:README.md,提交 a626196

工具

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

版本歷史

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

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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