Skip to main content
A local stdio MCP server — not a hosted HTTP MCP URL. It exposes 15 tools covering the whole lifecycle: sign up, fund, rent, reveal credentials, terminate. An account-balance rental is charged at the listed hourly price multiplied by the time the instance is ACTIVE, rounded down to the cent. Data transfer is included. Nothing accrues after termination. A rental that never delivers costs $0.00.
python3 and python run PyTorch. On the instance, python3, python, pip and pip3 all use the image’s PyTorch environment (torch 2.14.1 with CUDA 13), in an interactive shell and over non-interactive SSH alike: ssh host python3 -c "import torch; print(torch.cuda.is_available())" prints True. The interpreter itself is /venv/main/bin/python, also returned as pythonPath in the rental status. Do not build a new environment to get PyTorch, and do not call /usr/bin/python3 or /opt/miniforge3 directly: they have no torch.

1. Install

Current version 0.2.2, MIT licensed. Requires Node.js 24 or newer, plus native OpenSSH if you use SSH-based tools.
Not root, or npm install -g fails with EACCES? Either use a user-owned prefix:
or skip installing entirely and let your client fetch it each start:

Test the connection before you spend anything

You should see {"name":"ukiyo","version":"0.2.2"} and a list of 15 tools. If that works, call list_compute_offers — it needs no token — before adding your key. Point your MCP client at the ukiyo-mcp binary:
list_compute_offers works with no token. Every account tool needs UKIYO_API_TOKEN. Free pre-flight calls: list_compute_offers and get_account_balance cost nothing and change nothing — call both before any spend to confirm the connection, the catalogue and your balance.

Headless client example

For an agent with no UI, spawn the server over stdio yourself:
Read the Terms and Privacy notice, then call signup_account with that exact version and hash, plus your spending caps. The returned agent key is shown once. Store it in UKIYO_API_TOKEN and restart the server so the account tools light up. Never place an owner token here.

4. Fund with USDC on Base (x402)

Call topup_account_with_wallet with the amount in cents — minimum 500 ($5.00), maximum `50000` ($500.00) — and the current Terms acceptance. The tool uses the locally configured wallet from UKIYO_MACHINE_CONFIG, which must point at a private local file holding the origin, method, network, asset, recipient, perPaymentMinor, totalMinor, an absolute wallet-key path and an absolute state directory. Never pass wallet keys as tool arguments. If it reports settlement pending, do not pay again — call get_topup_status, then get_account_balance.

5. Choose a GPU type and rent

Call list_compute_offers. Each entry is a GPU type: gpuModel, gpuCount, pricePerHourMinor (cents per hour; for example, 84 would mean $0.84/h), minimumCreditMinor (ten minutes at that price — the balance you need to start) and availableOffers. You pick the type; Ukiyo picks the machine. Call rent_gpu with gpuModel, optional gpuCount (1, 2, 4 or 8), optional maxHourlyPriceMinor, and a stable idempotencyKey. Reuse that same key on any retry — a repeat returns the original rental instead of renting twice. Keep rentalId and deploymentId. Poll get_rental_status until ACTIVE, usually 1 to 4 minutes and at most 15: Ukiyo tries up to three hosts. If none delivers within 15 minutes, Ukiyo fails the rental itself and charges $0.00 — keep polling; there is no need to cancel. ACTIVE means the GPU is verified working and SSH is authenticated. FAILED means nothing was delivered and nothing was charged; rent again. If the first host fails, Ukiyo tries up to two more of the same type, including hosts listed at up to 160% of your price; you still pay the listed price you were quoted.

6. Get SSH credentials

get_deployment_credentials returns host, port, username and privateKey. When ACTIVE, get_rental_status and get_deployment_status also carry ssh with host, port and username; the private key comes only from this tool. The private key is a secret. Every reveal is audited server-side. Do not echo it into a shared transcript, a log, or a file the user has not asked for. Tell the user it is available and ask where they want it.

7. Confirm the GPU works

Over SSH, PyTorch lives in the image’s virtual environment. python3 works too; the full path is shown here:
Expect 2.14.1+cu130 13.0 True.

8. Terminate

terminate_deployment is irreversible: it destroys everything on the instance and forfeits remaining runtime. Confirm with the user first, quoting the deployment id and the GPU. Never terminate as a cleanup step the user did not ask for. Billing stops at termination and the figure you then see is final.

How billing works

  • Unit: usage accrues continuously while the instance is ACTIVE (millisecond precision) at the listed hourly price. The charge is floor(hourly cents × active seconds ÷ 3600) — whole cents, always rounded down. Example only: 109 seconds at 92¢/h is 2.79¢, charged as 2¢.
  • Hold versus charge: starting a rental needs ten minutes of credit at that GPU’s price (minimumCreditMinor). That amount is held, not charged; the hold extends as you run and is released at termination. You pay only the charge above.
  • Final: the charge is fixed at termination (chargeFinal: true). Nothing accrues afterwards, data transfer is included, and a rental that never reaches ACTIVE costs $0.00.
  • On the x402 no-account path the payment is a cap you authorize; the unused remainder returns to the paying wallet in USDC automatically, usually 7 to 12 minutes after termination (allow up to 30).

What is preinstalled

The image is vastai/pytorch:cuda-13.0.3-auto. python3 and python run PyTorch; the interpreter is /venv/main/bin/python. It ships CUDA 13, PyTorch 2.14.1+cu130, torchvision, numpy, pillow, requests and Jupyter. Run /venv/main/bin/pip list for the exact set. For model work, install what you need first:

Copying files off the machine

Use the same host and port as your SSH session, before you terminate:

GPU names

Use the spaced form in requests: RTX 4090, RTX 6000 Ada, A100 PCIe, A100 SXM4. The catalogue also echoes a compact gpuModel such as RTX4090 — that is a display value, not an input.

Where the price is

The rental create response carries it: data.deployment.unitPriceMinor is the hourly rate in cents for the machine you were given (84 = $0.84/h). GET /api/v1/rentals/<rentalId> returns the same field, and chargedMinor with chargeFinal: true once the rental ends. Other connectors: x402 with no account · HTTP API · CLI · Agent Skill