
mcp
run.tensorgrid/mcp
GPU prices and pay-per-output AI in USDG over x402 on Robinhood Chain, plus a token holder check.
Documentation
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
| What | Address |
|---|---|
| Website | tensorgrid.run |
| Web app | app.tensorgrid.run |
| REST API | https://api.tensorgrid.run |
| MCP server (Streamable HTTP) | https://mcp.tensorgrid.run/mcp |
| Docs | docs.tensorgrid.run |
| Status page | status.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
POST /api/v1/x402/{model}with your wallet address answers402 Payment Requiredwith the price in USDG, who to pay and a quote that expires.- 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. - Send the same request again with the
X-PAYMENTheader. 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:
| Part | State |
|---|---|
| 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 quotes | Operational |
| Spend cap checked before any payment | Operational |
| x402 payment requirements and EIP-3009 signature check | Operational |
| Hosted MCP server, 22 tools | Operational |
Paid AI runs (images, video, speech, text), paid with exact or prepaid credits | Operational |
exact (EIP-3009) settlement, our relayer pays the gas | Operational while the relayer holds gas |
| 2-of-3 policy checks before payment | Operational |
| On-chain receipt anchoring | Operational |
| Accounts: wallet sign-in, prepaid USDG credits, API keys, invoices | Operational |
| GPU rental (from credits, billed per second; unused time refunded to credits) | Operational |
| Refunds to credits when a paid run or GPU fails | Operational |
Plain usdg-transfer proof as payment for a run | Disabled (use exact or credits) |
tensorgrid-mcp on npm | Scheduled |
| 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
| Guide | Read it for |
|---|---|
| API reference | Every endpoint, errors, rate limits, idempotency, pagination |
| x402 payments | How a wallet pays (signed exact), retries |
| MCP guide | Cursor, Claude, VS Code and other MCP clients |
| Models and pricing | The model catalog and how prices are set |
| FAQ | Short answers |
| OpenAPI spec | The 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.
| Item | Status |
|---|---|
| Fee ledger (net fee recorded for every paid job) | Live, internal for now |
| On-chain receipts | Live |
| x402 payments | Live |
| 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% off | Planned |
| 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.2x | Planned |
| Operator bond for GPU operators | Planned |
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.
| Phase | Name | Status |
|---|---|---|
| 1 to 2 | Ignition: price index, exact USDG quotes, public API, hosted MCP with 22 tools, x402 discovery | Live |
| 3 | Settlement: gasless x402 USDG payments, payment guard, GPU rentals from credits | Live |
| 4 | The Burn: public receipts list, live fee dashboard, weekly buyback and burn, each burn linked on chain | Planned |
| 5 | Holder Tiers: Bronze, Silver and Gold locks, up to 30% off compute, pay with tokenized stocks | Planned |
| 6 | Compute Cashback: weekly USDG share, claim as USDG or 1.2x compute credits, via an on-chain contract | Planned |
| 7 | The Open Grid: anyone with a GPU joins and puts up $TGRD as a bond | Planned |
| 8 | Proof of Compute: on-chain proof of model, GPU and price per job | Planned |
| 9 | The GPU Oracle: the price index on chain, aiming to be a price feed for AI compute | Planned |
| 10 | Compute Credits: reserve GPU hours at today's price as tokenized credits | Planned |
| 11 | The Agent Economy: agents with wallets find work, rent GPUs, run jobs, pay and get paid in USDG | Planned |
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.