Skip to main content
Glama

inferva-mcp

Model Context Protocol (MCP) server for INFERVA. It lets AI agents buy inference through INFERVA and read the network's public state, including the settlement log they can verify themselves.

What is INFERVA

INFERVA is one inference endpoint that AI agents pay through. Agents send standard chat-completion requests to a single URL. Each request is routed to a provider, metered, paid in USDG and written to a hash-chained settlement log. A protocol fee on every request is split between the capacity sponsor whose prepaid capacity served it and the treasury, which takes the rest. Sponsor earnings come only from fees agents actually paid. INFERVA is launching on Robinhood Chain.

Related MCP server: alexa-pay-mcp

Tools

chat is the only tool that spends money: it charges the agent key owner's USDG balance. Every other tool is a free public read and needs no key.

Tool

What it does

INFERVA route

chat

Paid chat completion. Returns the reply, cost_usdg, the fee breakdown (provider cost, protocol fee and its split between the capacity sponsor and the treasury), the settlement hash and a public receipt URL. Needs INFERVA_API_KEY.

POST /v1/chat/completions

list_models

Models served by active providers, with list price per 1k tokens. auto routes to the cheapest provider.

GET /v1/models

get_model_catalog

Per model: list and all-in price per 1M tokens, usage, latency, success rate, and the endpoint limits.

GET /api/agents/catalog

get_stats

Requests, volume, fees, the treasury and sponsor fee shares, sponsored capacity, providers, current epoch and a 24-epoch series.

GET /api/stats

get_params

Live protocol parameters with readable values and whether governance can change them.

GET /api/params

list_requests

Most recent settled requests with cost, fee split, hashes and receipt URLs.

GET /api/requests

get_receipt

One request's receipt, with its hash and links re-checked locally.

GET /api/receipts/:id

verify_settlement_chain

Downloads the whole settlement log from the genesis value and recomputes every SHA-256 hash locally. Reports records checked and the first broken record, if any.

GET /api/chain (paged)

list_providers

Providers: status, routability, routing weight, INFER bond, slashed amount, usage and per-model prices.

GET /api/providers

get_provider

One provider in detail: billed USDG, success rate, uptime, slashes, events, recent requests.

GET /api/providers/:id

list_slashes

Executed slashes and the INFER the treasury holds from them.

GET /api/slashes

list_proposals

Governance proposals (parameter, slash, routing weight) with votes weighted by INFER held.

GET /api/proposals

get_proposal

One proposal with every vote.

GET /api/proposals/:id

get_network

Live gateway load and congestion state (one lane for every caller).

GET /api/network

list_epochs

Fee epochs with volume, fees and the sponsor / treasury split.

GET /api/earn/epochs

get_leaderboard

Top capacity sponsors and providers.

GET /api/earn/leaderboard

get_capacity_market

Open listings of sponsored capacity positions and recent sales.

GET /api/market

Where a tool converts amounts it names the unit (_usdg, _infer). Where it passes the API's data through, it says so in a units field: amounts there are integers in micro units (1 USDG or 1 INFER = 1,000,000).

How chain verification works

Every settlement record stores the hash of the record before it. A record's hash is

sha256(prev_hash | id | payer | provider | model | tokens | base | discount | fee | capacity_id | epoch | created_at)

with the fields joined by | and the first record chained to the published genesis value. discount is 0 on current records; it stays in the hash so older records still verify. verify_settlement_chain rebuilds every hash from the record contents and never trusts the stored hash column, so an edited, dropped or reordered record shows up as the first broken record.

Setup

You need Node.js 20 or newer. Build from source:

git clone https://github.com/inferva/inferva-mcp.git
cd inferva-mcp
pnpm install
pnpm build

The server is node /path/to/inferva-mcp/dist/cli.js (bin name inferva-mcp). For the chat tool, create an agent key in the app under Endpoint & keys. Read tools work without a key.

Claude Code

claude mcp add inferva \
  --env INFERVA_API_KEY=inf_sk_your_key \
  -- node /path/to/inferva-mcp/dist/cli.js

Leave out --env INFERVA_API_KEY=... to use the read tools only.

Claude Desktop

Add this to claude_desktop_config.json:

{
  "mcpServers": {
    "inferva": {
      "command": "node",
      "args": ["/path/to/inferva-mcp/dist/cli.js"],
      "env": { "INFERVA_API_KEY": "inf_sk_your_key" }
    }
  }
}

Cursor

Add this to ~/.cursor/mcp.json (or .cursor/mcp.json in a project):

{
  "mcpServers": {
    "inferva": {
      "command": "node",
      "args": ["/path/to/inferva-mcp/dist/cli.js"],
      "env": { "INFERVA_API_KEY": "inf_sk_your_key" }
    }
  }
}

Environment variables

Variable

Default

Purpose

INFERVA_API_KEY

none

Agent key (inf_sk_...). Needed only for chat. Keep it out of version control.

INFERVA_BASE_URL

https://dapp.inferva.xyz

App and endpoint origin.

INFERVA_TIMEOUT_MS

60000

Per-request timeout.

INFERVA_DEBUG

unset

Set to 1 to log tool errors to stderr.

Errors

Tool errors come back as { "error": <code>, "status": <http>, "message": <from INFERVA>, "hint": <what to do> }. Codes from the endpoint include invalid_api_key, insufficient_funds, spend_cap_reached, model_not_allowed, model_not_found, rate_limit_exceeded, congestion_deferred, capacity_exhausted and provider_error. A request that fails at the provider is not charged.

Development

pnpm install
pnpm test       # vitest, mocked fetch
pnpm typecheck
pnpm build      # tsup -> dist/

License

MIT © INFERVA

Available Tools

17 tools
chatChat completion (paid)A

Send a chat completion through INFERVA's one endpoint. Requires INFERVA_API_KEY (an inf_sk_... agent key). The request is routed to a provider, metered, charged in USDG to the key owner's balance and written to the settlement log. Returns the reply plus cost_usdg, the fee breakdown (provider cost, protocol fee and its split between the capacity sponsor and the treasury), the settlement hash and a public receipt URL. Pass either prompt or messages.

Inputs: model, prompt, messages, max_tokens.

get_capacity_marketCapacity marketB
Read-onlyIdempotent

Open listings of sponsored capacity positions for sale and recent sales, with each position's deposit, remaining capacity, amount drawn and earnings.

Inputs: no named parameters.

get_leaderboardLeaderboardsB
Read-onlyIdempotent

Top capacity sponsors (USDG earned, live capacity, draws) and top providers by volume.

Inputs: no named parameters.

get_model_catalogModel catalogA
Read-onlyIdempotent

Model catalog with usage over the recent window: per model and provider the list price and the all-in price (list price plus protocol fee, the same for every account) in USDG per 1M tokens, request and token counts, average latency, routing success rate, and which model auto routes to. Also returns the endpoint limits (messages, characters per message, max output tokens).

Inputs: no named parameters.

get_networkNetwork loadA
Read-onlyIdempotent

Live gateway load: requests admitted in the last minute against capacity, whether the network is congested (every caller shares the same lane; above capacity requests are deferred with a 429), admitted and deferred counts, the last 30 minutes, and active/routable provider counts.

Inputs: no named parameters.

get_paramsProtocol parametersA
Read-onlyIdempotent

Current protocol parameters (protocol fee rate, the capacity sponsor share of the fee (the treasury takes the rest), epoch length, provider bond, voting window, quorum, INFER needed to open a proposal, gateway capacity), each with a readable value and whether governance can change it. These are live values and can change through governance.

Inputs: no named parameters.

get_proposalGovernance proposalA
Read-onlyIdempotent

One governance proposal with every vote (address, side, weight, delegate used) and the current value of what it would change.

Inputs: id (required).

get_providerProvider detailA
Read-onlyIdempotent

One provider in detail: everything in list_providers plus USDG billed, success rate on real calls, uptime, why it is not routable (if so), slashes, lifecycle events, the last 24 epochs and its most recent requests.

Inputs: id (required).

get_receiptRequest receiptA
Read-onlyIdempotent

Public receipt for one settled request (id like req_...), as returned by chat. Includes the full cost breakdown and checks the record locally: its hash is recomputed from its contents, and its link to the previous record (or the genesis value) and from the next record are verified.

Inputs: id (required).

get_statsNetwork statsB
Read-onlyIdempotent

Protocol totals: settled requests, volume and fees in USDG, the fee shares paid to the treasury and to capacity sponsors, sponsored capacity (total and remaining, USDG) and sponsor count, active providers, the current epoch with its fees and requests, and the last 24 epochs as a series.

Inputs: no named parameters.

list_epochsEpochsB
Read-onlyIdempotent

Fee epochs, newest first: requests, tokens, volume, fees and how fees split between capacity sponsors and the treasury per epoch.

Inputs: limit.

list_modelsList modelsA
Read-onlyIdempotent

Every model an active INFERVA provider serves, with the provider and its list price in USDG per 1k tokens. "auto" routes each request to the cheapest active provider. Use a model id from here as model in chat.

Inputs: no named parameters.

list_proposalsGovernance proposalsA
Read-onlyIdempotent

Governance proposals, newest first (up to 100): parameter changes, provider slashes and routing-weight changes, with yes/no totals weighted by INFER held, quorum, status and voting deadline.

Inputs: status.

list_providersProvidersA
Read-onlyIdempotent

Inference providers on INFERVA: status, whether they are routable, routing weight, INFER bond and amount slashed, requests and tokens served, and per-model input/output prices in USDG per 1M tokens.

Inputs: no named parameters.

list_requestsRecent settled requestsA
Read-onlyIdempotent

Most recent settled requests from the public settlement log, newest first: payer, provider, model, tokens, cost in USDG with the fee split between sponsor and treasury, capacity position drawn, epoch, the chained hashes and a receipt URL.

Inputs: limit.

list_slashesSlashesB
Read-onlyIdempotent

Every executed provider slash, newest first, and the INFER the treasury holds from slashing.

Inputs: no named parameters.

verify_settlement_chainVerify the settlement chainA
Read-onlyIdempotent

Download the settlement log in order from the genesis value and recompute every SHA-256 hash locally, exactly as the INFERVA app does. Nothing trusts the server's hash column. Reports how many records were checked, whether the chain is intact, and the first broken record (wrong link or hash that does not match its contents) if any.

Inputs: max_records.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 17 tools

    Disambiguation4/5

    Most tools have clear resource/action boundaries: list_ vs get_ for proposals, providers, and receipts, plus distinct stats, network, epoch, and settlement tools. The main ambiguity is between list_models and get_model_catalog, which both expose model/provider pricing and could be confused despite differing usage/limits detail.

    Naming Consistency5/5

    Names use consistent snake_case and a predictable verb-based pattern: list_* for collections, get_* for single resources, plus verify_settlement_chain and chat for specific actions. The convention is easy to scan and apply.

    Tool Count4/5

    17 tools is slightly above the comfortable 3–15 range, but the breadth reflects a complex protocol with chat, governance, providers, models, capacity, receipts, and settlement verification. Each tool has a plausible role, though list_models and get_model_catalog could potentially be merged.

    Completeness4/5

    The surface covers core query workflows: chat, models, providers, governance proposals, epochs, stats, requests, receipts, and full settlement-chain verification. Minor gaps remain around account/balance lookup, governance voting/creation, and capacity-market actions, but most read workflows are covered.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to access verifiable DePIN supply-side telemetry, browse and purchase data products using credits, query datasets, and verify data provenance with cryptographic and zero-knowledge tools.
      10
      31 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables an AI agent to settle HTTP 402-gated resources end-to-end: quote conversions, choose from the seller's accepted rails, sign gasless EIP-712 authorizations under enforced per-call and lifetime caps, and verify settlement receipts while tracking wallet balance. Runs self-hosted over stdio or Streamable HTTP, defaulting to testnet with mainnet requiring explicit confirmation.
      Apache 2.0
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI agents to access pay-per-call web unlocking, structured extraction, clean scraping, Python sandbox execution, persistent key-value memory, and clearinghouse task bounties, with settlement via Bitcoin Lightning L402 or Base/Solana USDC x402.
      15
      149 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to place and verify provably fair dice bets, manage shared bankroll vault liquidity positions, inspect incentives and positions, and read or send verified chat messages over HTTP or Stdio, including website-independent on-chain memo workflows.
      1
      MIT