MCP and SDK
The MCP server and the SDK are two front doors to the same four actions: read the index, list seasons, plant, harvest.
MCP endpoint
{
"mcpServers": {
"gpuacres": { "url": "https://gpuacres.org/api/mcp" }
}
}The server speaks JSON-RPC over streamable HTTP with JSON responses: initialize, tools/list, tools/call.
Tools
| Tool | Arguments | Does |
|---|---|---|
get_index | crop? | Latest point, sources and hash per crop |
list_seasons | Open seasons, deadlines and pots | |
plant | crop, season, side, usdg, payment? | Without payment: returns the typed data to sign. With payment: plants and returns the tx |
harvest | owner, crop, season, index? | Settles and pays the owner; the relayer pays the gas |
JS SDK
One ES module, served from this site, built on viem:
import { GpuAcres } from "https://gpuacres.org/sdk/gpuacres.mjs"
import { privateKeyToAccount } from "viem/accounts"
const acres = new GpuAcres({ account: privateKeyToAccount(process.env.KEY) })
const { crops } = await acres.index()
const seasons = await acres.seasons()
const r = await acres.plant({ crop: "rtx-4090", season: "daily", side: "long", usdg: "2" })
console.log(r.tx)plant runs the whole x402 exchange: it asks for the requirements, signs the ReceiveWithAuthorization with your account and sends it back. Download the file from /sdk/gpuacres.mjs to pin a version.