> ## Documentation Index
> Fetch the complete documentation index at: https://docs.u-kiyo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP

> Run the local stdio server in a compatible MCP client.

Current action MCP: **0.2.0**. The compute MCP server is a public downloadable local stdio process, not a hosted HTTP MCP URL or an `npx` package. It requires Node.js 22 or newer and native OpenSSH for `run_command`. No repository access is required.

## Install

Verify the checksum before running the release; stop if verification fails. Versions and hashes are published in [latest.json](https://u-kiyo.ai/releases/latest.json). On Linux without `shasum`, use `sha256sum -c -`.

```bash theme={null}
mkdir -p ~/.ukiyo && cd ~/.ukiyo
curl -fsSLO https://u-kiyo.ai/releases/mcp/0.2.0/ukiyo-mcp-0.2.0.mjs
echo "e32c8b638856c16eb8315b9d086c8c39d88f7ac89f1b0cd311bf7a7a18de81a1  ukiyo-mcp-0.2.0.mjs" | shasum -a 256 -c -
```

## Choose your editor

After downloading and verifying the bundle, use [Cursor setup](https://docs.u-kiyo.ai/connect/mcp#cursor) or [VS Code setup](https://docs.u-kiyo.ai/connect/mcp#vs-code). The page menu links to these same instructions. These are local configurations, not remote one-click installations. Use the copy button on the JSON block for your editor.

Install Node.js and the bundle on the machine where your editor starts the MCP process. The instructions below target desktop editors; remote SSH, containers, and agent-host sessions may need their own installation and configuration.

## Cursor

Merge this into `~/.cursor/mcp.json` (global), preserving any existing servers. Cursor expands `${userHome}` to your home directory and `${env:UKIYO_API_TOKEN}` from the editor process environment. Do not replace the variable with your raw token in this file.

```json theme={null}
{
  "mcpServers": {
    "ukiyo": {
      "type": "stdio",
      "command": "node",
      "args": ["${userHome}/.ukiyo/ukiyo-mcp-0.2.0.mjs"],
      "env": {
        "UKIYO_API_TOKEN": "${env:UKIYO_API_TOKEN}"
      }
    }
  }
}
```

For account tools, use a funded scoped agent token from headless [CLI signup](/connect/cli) or an existing-account authorization flow; Telegram is not required. Fully quit Cursor first so it does not reuse a process with an old environment. On macOS/Linux, run the following in **Bash**, with the `cursor` shell command installed. Enter the scoped token only at the hidden prompt, not into the command or a shared agent transcript:

```bash theme={null}
read -r -s -p "Ukiyo API token: " UKIYO_API_TOKEN
printf '\n'
export UKIYO_API_TOKEN
cursor .
unset UKIYO_API_TOKEN
```

Enable `ukiyo` in Cursor's MCP settings. If you launch Cursor later from the Dock/start menu, it may not inherit this token; relaunch from the configured environment. On Windows, provide the variable securely to the Cursor process before starting it. For public-inventory-only use, omit the `env` object; account tools will then require a token.

See [Cursor's MCP configuration reference](https://cursor.com/docs/mcp) for environment and configuration locations.

## VS Code

Run **MCP: Open User Configuration** from the Command Palette. Merge this into that file without replacing existing servers or inputs. It uses VS Code's `servers` format, not Cursor's `mcpServers` format:

```json theme={null}
{
  "servers": {
    "ukiyo": {
      "type": "stdio",
      "command": "node",
      "args": ["${userHome}/.ukiyo/ukiyo-mcp-0.2.0.mjs"],
      "env": {
        "UKIYO_API_TOKEN": "${input:ukiyo-api-token}"
      }
    }
  },
  "inputs": [
    {
      "id": "ukiyo-api-token",
      "type": "promptString",
      "description": "Funded scoped Ukiyo agent token",
      "password": true
    }
  ]
}
```

Use **MCP: List Servers**, select `ukiyo`, and start it. Review the trust prompt and enter your token in the masked input. The JSON contains a reference, not the secret. This setup targets VS Code's local MCP support; sessions running on Agent Host do not forward servers requiring interactive `${input:...}` variables.

For public-inventory-only use, omit `env` and `inputs`. See [VS Code's MCP configuration reference](https://code.visualstudio.com/docs/agents/reference/mcp-configuration) for other supported secret inputs.

## Verify the connection

Check that `ukiyo` exposes the eight action tools below. Call `list_offers` first; it is read-only and needs no API token. To check your account token, call `get_account` (read-only). Do not use a rental or termination as an installation check.

`UKIYO_API_URL` defaults to `https://pay.u-kiyo.ai`. It is the REST API base, **not an MCP endpoint**; do not put it in a remote MCP `url` field.

* **Node not found:** ensure `node` is on the editor's PATH, or use the full path to your Node executable for `command`.
* **Bundle not found:** confirm the verified file exists at `.ukiyo/ukiyo-mcp-0.2.0.mjs` in your home directory on the host running MCP.
* **Token missing / 401:** check the editor's secret input or inherited environment and whether the token was revoked. Restart the MCP server after updating it.

Never put the token in a URL, setup button, shared transcript, or committed config. Authorize the workload and spending limits before allowing autonomous actions; a client's optional confirmation policy is separate from the backend.

## Tools

* `get_account`: account, balance and key limits.
* `list_gpus`: public GPU model pricing.
* `list_offers`: public inventory, no token required.
* `rent_gpu`: exact `offerId`, `budgetMinor`, and `idempotencyKey`; prepaid autonomous rental, no offer substitution.
* `get_rental`: exact deployment, provisioning and reversal state.
* `list_deployments`: account deployments.
* `run_command`: SSH execution; private key stays local, not in tool output.
* `terminate_gpu`: irreversible shutdown; waits for confirmed termination or a bounded timeout.

With a funded scoped token, these tools run the same autonomous backend lifecycle as CLI 0.2.2. MCP 0.2.0 uses explicit offers; the API also supports GPU/count intent.

Wait for ACTIVE before execution, terminate after the authorized workload, and verify the final state. Never include tokens or private keys in shared transcripts or logs.

## Why there is no remote install button

Mintlify's built-in **Copy MCP Server**, **Connect to Cursor**, and **Connect to VS Code** actions use a hosted server URL. Ukiyo compute currently uses a downloaded local stdio server, so those built-in actions are disabled. Ukiyo's custom **Connect to Cursor** and **Connect to VS Code** menu actions open the local setup instructions above; copy the matching JSON for your editor.

Mintlify's separate documentation-search MCP is not the Ukiyo compute server and cannot manage rentals. A future remote compute integration would require a real hosted MCP service and appropriate authentication; the REST API and bundle download URL are not substitutes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.