@inferra-trade/mcp-server
Official# @inferra-trade/mcp-server
[](https://github.com/InferraTrade/inferra-mcp-server/actions/workflows/ci.yml)
GPU rental prices for AI agents, over the [Model Context Protocol](https://modelcontextprotocol.io).
The Inferra GPU Index publishes what an hour of an A100, H100, H200 or B200 rents for, aggregated
from public rental markets, outlier-filtered, and attested on Solana mainnet through a Chainlink
DON every five minutes. This server puts that number one tool call away from any MCP host: a
desktop assistant, an IDE, an agent framework of your own.
```json
{
"mcpServers": {
"inferra": {
"command": "npx",
"args": ["-y", "@inferra-trade/mcp-server"],
"env": { "INFERRA_API_KEY": "ink_your_key" }
}
}
}
```
The key is free: sign in with a wallet at <https://api.inferra.trade>, no card, no email. Node 20
or newer.
## Tools
| Tool | What the agent gets |
|---|---|
| `get_gpu_price` | one model: USD per GPU-hour, when it is from, whether it is delayed, the state (live / warming / halt), the sources behind it, whether it is attested on chain |
| `compare_gpu_prices` | every model, or a subset, cheapest first, each as a multiple of the cheapest |
| `get_gpu_market_summary` | prices, 7-day change and weekly range per model, index health (computation, on-chain feeds, Chainlink delivery, API), the biggest mover |
| `get_gpu_price_history` | first, last, low, high and change over a range (1d to all), plus a thinned list of points |
Every answer comes as readable text and as structured content, and every answer carries the
attribution the API's licence asks for: *Inferra GPU Index, https://index.inferra.trade*.
## What an agent needs to know, and is told
**A halted model has no price.** When fewer than three independent sources agree, the index
freezes that model rather than printing a number one source could move on its own. This server
answers `usdPerGpuHour: null` with the reason, never the last value. The state is also never
delayed, on any tier.
**The Free tier is 15 minutes behind.** Deliberately: the board at index.inferra.trade is live,
and so is the chain, but a service pricing its own product off the API gets the value 15 minutes
late unless it pays. Every answer says `delayed: true` and gives the instant it is reporting.
**It is a benchmark of offers, not a trade print.** The number is a weighted quantile of what
on-demand rental is being offered at, per canonical SKU (H100 80GB SXM is not H100 PCIe). Method
in full: <https://index.inferra.trade/methodology>. Uptime and every incident:
<https://index.inferra.trade/status>.
## Configuration
| Variable | Default | |
|---|---|---|
| `INFERRA_API_KEY` | | required for every tool; `ink_…` from <https://api.inferra.trade> |
| `INFERRA_API_URL` | `https://api.inferra.trade` | a self-hosted index, or a test stub |
| `INFERRA_TIMEOUT_MS` | `10000` | per request |
Without a key the server still starts, and each tool answers with instructions for getting one.
An MCP host shows a server that exits at once as an opaque failure; a readable tool error is
something the user can act on.
The server makes one API call per tool call, except `get_gpu_market_summary`, which makes two plus
one per live model, one at a time. A Free key allows 60 calls a minute, which is a lot of
questions about GPU prices.
## Programmatic use
```ts
import { InferraApi, createInferraMcpServer } from '@inferra-trade/mcp-server'
const api = new InferraApi({ apiKey: process.env.INFERRA_API_KEY })
const server = createInferraMcpServer({ api })
// connect it to any transport the MCP SDK provides
```
The answer builders (`priceAnswer`, `compareAnswer`, `summaryAnswer`, `historyAnswer`) are
exported too, for anyone who wants the same text and structure inside a different tool surface.
## Without this server
Nothing here is privileged. The same numbers are on <https://index.inferra.trade> with no key, on
<https://api.inferra.trade> as plain JSON, and in four Solana accounts anyone can read with
[`@inferra-trade/gpu-index`](https://www.npmjs.com/package/@inferra-trade/gpu-index) or a bare
RPC call. This package exists so that an agent does not have to be taught any of that first.
## Licence
MIT. If you publish a number from the index, attribute it to the Inferra GPU Index and link
<https://index.inferra.trade> so a reader can check it.
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: single-model current price, cross-model price comparison, full market overview, and historical price trends. No two tools overlap in what they return, making misselection unlikely.
Three of four tools follow the 'get_gpu_*' pattern, while 'compare_gpu_prices' uses a verb-object form without 'get'. This is a minor deviation, but the naming is otherwise predictable and readable.
Four tools is well-scoped for a GPU price index server: current price, comparison, summary, and history cover the main use cases without unnecessary redundancy.
The tool surface covers the core lifecycle of price queries (individual, comparative, overview, history). A minor gap is the lack of a dedicated endpoint to list available models, though the summary and comparison tools implicitly provide this information.