@gammainfra/mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@gammainfra/mcp-server Ask gammainfra/auto what is the capital of France?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@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 (orgammainfra/autofor smart routing) with cost, latency, and quality controls. Routing metadata (which provider served, exact cost in USD, fallback chain) is returned as a structuredrouting_metafield.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
Get a GammaInfra API key — sign up free at https://gammainfra.com/signup ($3 trial credit, no credit card).
Add the server to your MCP client config (instructions per client below).
Restart the client. The four tools become available to your agent immediately.
Related MCP server: TianGong-AI-MCP
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-serverOr 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
Var | Required | Default | Description |
| yes | — | Your GammaInfra API key, format |
| no |
| Override for staging/dev. |
Tool reference
chat_completions
Send a chat completion request and receive the model response plus routing metadata.
Parameters:
Name | Type | Required | Description |
| string | yes |
|
| array | yes | OpenAI-shape conversation messages. |
| number | no | 0..2. |
| int | no | |
| int | no | GPT-5 family requires this instead of |
| float | no | 0.0..1.0 continuous dial. Sent as |
| int | no | 60..600000. Caps total wall-clock incl. fallback retries. Also enforced client-side as a hard request abort. |
| string | no |
|
| string | no |
|
| various | no | Standard 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
Name | Type | Required | Description |
| boolean | no | Default |
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 typecheckLicense
MIT — see LICENSE.
Available Tools
4 toolschat_completionsA
Send a chat completion request to GammaInfra and receive the model response plus routing metadata. Smart routing picks the best-fit model when model='gammainfra/auto'; pin a specific model like 'openai/gpt-5-mini' for direct dispatch. Returns the OpenAI-shape response in a 'response' field and routing decisions (provider, endpoint, cost in USD, router version, fallback chain) in a 'routing_meta' field. Streaming is not supported via MCP; the request always uses stream=false.
Inputs: model (required), messages (required), tools, top_p, +11 more.
get_balanceA
Return the authenticated customer's GammaInfra balances: managed (USD) and currency. Pass include_byok=true to also fetch the BYOK (USD if enrolled) balance; when omitted, byok_balance_usd is null and no BYOK request is made. With include_byok=true, BYOK is reported inline as a byok_error string if the BYOK endpoint fails (e.g., customer has no BYOK enrollment).
Inputs: include_byok.
get_statusA
Return GammaInfra's current health: overall state, per-provider health (latency p50 + state), and 24-hour request count. Useful before kicking off a long agent loop. No parameters.
Inputs: no named parameters.
list_modelsA
List every model available on GammaInfra with pricing and capability flags. Covers OpenAI, Anthropic, Google, Mistral, Groq, DeepSeek, xAI, and Amazon Bedrock today; plus the meta-models gammainfra/auto, gammainfra/fast, and gammainfra/cheap. No parameters.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: health status, chat completions, model listing, and balance checking. No overlap.
Names follow a verb_noun pattern (get_status, list_models, get_balance) except chat_completions which is a noun phrase, but still readable and consistent in style.
Four tools is well-scoped for the server's purpose—covering health, chat, models, and balance without bloat or deficiency.
Covers core operations (chat, model discovery, status, balance), but lacks features like usage history or streaming support, which are minor gaps.
Maintenance
Related MCP Connectors
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
LLM cost optimization gateway, repo token-waste auditor & model arbitrage MCP server.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseBqualityDmaintenanceAn educational implementation of a Model Context Protocol server that demonstrates how to build a functional MCP server integrating with various LLM clients.2MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that supports STDIO, SSE and Streamable HTTP protocols for AI model interactions.1MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that bridges MCP clients with local LLM services, enabling seamless integration with MCP-compatible applications through standard tools like chat completion, model listing, and health checks.-
- FlicenseNot gradedqualityNot gradedmaintenanceHigh-performance Model Context Protocol server supporting multiple LLM providers (OpenRouter, OpenAI, Groq) with WebSocket API and conversation history persistence.-