Repository avatar
AI Tools
v0.12.6
active

mcp

run.tensorgrid/mcp

GPU prices and pay-per-output AI in USDG over x402 on Robinhood Chain, plus a token holder check.

Documentation

TensorGrid: GPU prices across clouds. AI outputs, paid per call.

Website · App · Docs · Status · OpenAPI · X

TensorGrid

TensorGrid compares GPU prices across clouds and sells AI outputs (images, video, speech, text) priced per output. You pay in USDG, the dollar stablecoin, on Robinhood Chain (chain 4663), over the x402 HTTP payment protocol. There is no account and no API key: ask for a price, your own wallet pays, and the output comes back with a receipt.

This repository has what you need to use TensorGrid from your code or your AI agent: the MCP server, examples, docs and the OpenAPI spec.

$TGRD contract (Robinhood Chain): 0x9aa68a205954083361669187e79809b459658c14

WhatAddress
Websitetensorgrid.run
Web appapp.tensorgrid.run
REST APIhttps://api.tensorgrid.run
MCP server (Streamable HTTP)https://mcp.tensorgrid.run/mcp
Docsdocs.tensorgrid.run
Status pagestatus.tensorgrid.run

Quickstart

No wallet needed:

# What is live right now
curl -s https://api.tensorgrid.run/api/v1/status

# H100 hourly price range across clouds
curl -s "https://api.tensorgrid.run/api/v1/gpus?q=h100&limit=1"

# Exact USDG price for one FLUX image
curl -s -X POST https://api.tensorgrid.run/api/v1/price \
  -H "content-type: application/json" \
  -d '{"model":"flux-schnell","prompt":"a GPU on a desk"}'

Add TensorGrid to your agent

Cursor, in .cursor/mcp.json:

{
  "mcpServers": {
    "tensorgrid": { "url": "https://mcp.tensorgrid.run/mcp" }
  }
}

Claude Code:

claude mcp add --transport http tensorgrid https://mcp.tensorgrid.run/mcp

Claude Desktop and other clients that start a local server: see mcp/ and examples/mcp-config/. VS Code and more are in the MCP guide.

The MCP server has 22 tools, such as GPU prices, live GPU offers, the model catalog, quotes, spend checks, payments and prepaid credits. It never holds or asks for a private key: your wallet signs x402 payments, and an optional API key pays from your credits.

It is listed in the official MCP Registry as run.tensorgrid/mcp. A skill file for agents is in skills/tensorgrid/SKILL.md, and the same text is served at api.tensorgrid.run/skill.md.

Examples

git clone https://github.com/runtensorgrid/tensorgrid.git && cd tensorgrid
npm install
npm run example:quickstart    # status, GPU prices, models, a price and a quote
npm run example:mcp-tools     # list the hosted MCP tools and call one

Every example in TypeScript, curl and Python is listed in examples/, including payment clients for both x402 schemes.

How paying works

  1. POST /api/v1/x402/{model} with your wallet address answers 402 Payment Required with the price in USDG, who to pay and a quote that expires.
  2. Your wallet signs an EIP-3009 authorization (exact) and our relayer pays the gas, or you pay from prepaid credits with an API key. A plain USDG transfer tx hash is not accepted as payment for a run (transfer_proof_not_accepted); transfers are used only to add credits.
  3. Send the same request again with the X-PAYMENT header. TensorGrid checks the payment on chain, runs the job once and returns the output with a receipt.

The payment examples read your own wallet key from the PRIVATE_KEY environment variable. It stays on your machine, is used only to sign, and is never printed or sent to TensorGrid. Use a wallet that holds only what you want to spend. The full flow is in the x402 guide.

Prepaid credits and API keys

Sign in with your wallet (one signed message, no gas), send USDG once, and pay from the balance. Every run is held, charged when the output is ready and released if it fails. An API key spends your credits within a daily cap, with an off switch:

curl https://api.tensorgrid.run/api/v1/account/runs \
  -H "authorization: Bearer $TENSORGRID_API_KEY" \
  -H "content-type: application/json" \
  -d '{"model":"flux-schnell","prompt":"a red cube on a white table"}'

Details: Accounts and credits.

Status

GET /api/v1/status always shows the current state. As of version 0.12.0:

PartState
GPU price ranges across clouds (weekly market price data, CC BY 4.0)Operational
Live on-demand GPU offers, with our rate (cloud price plus 10%)Operational
Model catalog, price previews and quotesOperational
Spend cap checked before any paymentOperational
x402 payment requirements and EIP-3009 signature checkOperational
Hosted MCP server, 22 toolsOperational
Paid AI runs (images, video, speech, text), paid with exact or prepaid creditsOperational
exact (EIP-3009) settlement, our relayer pays the gasOperational while the relayer holds gas
2-of-3 policy checks before paymentOperational
On-chain receipt anchoringOperational
Accounts: wallet sign-in, prepaid USDG credits, API keys, invoicesOperational
GPU rental (from credits, billed per second; unused time refunded to credits)Operational
Refunds to credits when a paid run or GPU failsOperational
Plain usdg-transfer proof as payment for a runDisabled (use exact or credits)
tensorgrid-mcp on npmScheduled
Web app (app.tensorgrid.run)Operational

The spend cap is checked before any payment is asked for. Output files are served from https://api.tensorgrid.run/api/v1/outputs/{job_id}/{n}. Live state of every part: status.tensorgrid.run.

Docs

GuideRead it for
API referenceEvery endpoint, errors, rate limits, idempotency, pagination
x402 paymentsHow a wallet pays (signed exact), retries
MCP guideCursor, Claude, VS Code and other MCP clients
Models and pricingThe model catalog and how prices are set
FAQShort answers
OpenAPI specThe machine-readable API

Token

$TGRD is the TensorGrid token. It has zero emissions: nothing is minted to pay for rewards. Its utility is tied to real compute fees. Details, tiers and status are on tensorgrid.run/token. The official contract address is listed above and on that page.

ItemStatus
Fee ledger (net fee recorded for every paid job)Live, internal for now
On-chain receiptsLive
x402 paymentsLive
Weekly buyback and burn (up to 10% of net fees)Planned
Holder tiers: Bronze 30 days 15% off, Silver 90 days 20% off, Gold 180 days 30% offPlanned
USDG rewards share (up to 10% of net fees, for lockers, operators and builders)Planned
Compute Cashback, claimable as USDG or as compute credits at 1.2xPlanned
Operator bond for GPU operatorsPlanned

The flywheel is capped: at most 20% of net fees (what users pay minus the provider cost) goes to the token side. Token features from Phase 4 onward are planned, not live. No dates promised. Nothing here is a promise of returns or price.

Roadmap

Eleven phases. The live roadmap, with each phase switched on only when it runs, is at tensorgrid.run/roadmap.

PhaseNameStatus
1 to 2Ignition: price index, exact USDG quotes, public API, hosted MCP with 22 tools, x402 discoveryLive
3Settlement: gasless x402 USDG payments, payment guard, GPU rentals from creditsLive
4The Burn: public receipts list, live fee dashboard, weekly buyback and burn, each burn linked on chainPlanned
5Holder Tiers: Bronze, Silver and Gold locks, up to 30% off compute, pay with tokenized stocksPlanned
6Compute Cashback: weekly USDG share, claim as USDG or 1.2x compute credits, via an on-chain contractPlanned
7The Open Grid: anyone with a GPU joins and puts up $TGRD as a bondPlanned
8Proof of Compute: on-chain proof of model, GPU and price per jobPlanned
9The GPU Oracle: the price index on chain, aiming to be a price feed for AI computePlanned
10Compute Credits: reserve GPU hours at today's price as tokenized creditsPlanned
11The Agent Economy: agents with wallets find work, rent GPUs, run jobs, pay and get paid in USDGPlanned

Phase 4 onward is planned. No dates promised. Follow @runtensorgrid for news. Changes are in the changelog.

Security

Found a security problem? Please report it privately, see SECURITY.md. TensorGrid will never ask for your private key or seed phrase.

License

MIT. GPU price data comes from weekly market price data under CC BY 4.0 (full attribution is on the legal page).

No installation packages available.

Remote