Skip to content
Sparecycle

MCP server

Agents that speak the Model Context Protocol can use Sparecycle with the same API keys and the same rules as the OpenAI-compatible API: the key's daily cap, the off switch, and results only for the key that submitted the job.

Connect

SettingValue
Endpointhttps://sparecycle.tech/v1/mcp
Also athttps://sparecycle.tech/api/v1/mcp
TransportStreamable HTTP, stateless: one POST per message, JSON answers, no session, no SSE stream (GET answers 405)
AuthAuthorization: Bearer sck_… on every request; no key, or a disabled or deleted key, answers 401
Protocol versions2026-07-28 (no handshake; server/discover) and 2025-11-25, 2025-06-18, 2025-03-26 (with initialize)

Most clients take a server URL and request headers. A typical configuration:

mcp.json
{
  "mcpServers": {
    "sparecycle": {
      "url": "https://sparecycle.tech/v1/mcp",
      "headers": { "Authorization": "Bearer sck_…" }
    }
  }
}
Claude Code
claude mcp add --transport http sparecycle https://sparecycle.tech/v1/mcp --header "Authorization: Bearer $SPARECYCLE_API_KEY"
MCP Inspector (command line)
npx @modelcontextprotocol/inspector@2.16.0 --cli https://sparecycle.tech/v1/mcp --transport http \
  --header "Authorization: Bearer $SPARECYCLE_API_KEY" --method tools/list

Keep the key out of shared config files: use your client's secret or environment-variable support where it has one.

Tools

Exactly four tools. There is no tool to withdraw funds and none to create or change keys. A12: default, not yet confirmed

ToolInputOutput
submit_jobkind (text | image), model (qwen2.5-1.5b | sd15), prompt; text: system, max_tokens; image: size, negative_prompt, steps, guidance, seedjob_id, status (queued), price_wei, receipt_url
get_job_statusjob_idstatus, settled_at, charge_status, price_wei, receipt_url (this key's jobs only)
get_job_resultjob_idtext content, or image content (PNG, base64), then a second text block { "sparecycle": { "job_id", "status", "receipt_url" } }; before agreement, a note that it is not ready
get_balancenonethe key's wallet: balance_wei, held_wei, available_wei, spend_limit_per_epoch_wei, pending_withdrawal; and the key: daily_cap_wei, spent_today_wei, next_reset_at

Jobs are asynchronous: call submit_job, then get_job_status until it says agreed, then get_job_result. Limits and prices are the same as on the OpenAI-compatible API.

receipt_url is the job's receipt (GET /api/v1/jobs/<job_id>/receipt, read with the same key): both nodes' signed results, and once the epoch's charge is on-chain, the proof that ties the job to that charge. See Billing.

Errors

Problems with a job are tool errors (isError: true) whose text is JSON: { "error": { "code", "type", "message" } }, with the same codes as the OpenAI-compatible API. A job the two nodes did not agree on comes back from get_job_result as results_did_not_match, job_expired or content_rejected with type not_charged: nothing was charged for it. Another key's job is forbidden; a job over the key's cap for today is key_daily_cap_reached. When no two nodes with different owners can take the model now, submit_job fails with no_node_pair and nothing is queued, held or charged; try again later (Models shows live capacity).

A missing or bad key is an HTTP 401 with a JSON-RPC error. An unknown tool is JSON-RPC error -32602; the protocol's own errors (-32020 header mismatch, -32022 unsupported protocol version) follow the MCP specification.