OURO
SubmitMy JobsMy Files
Docs
Get StartedMCPREST APIBuild an AgentPricing
Get StartedMCPREST APIBuild an AgentPricing
OUROBuilt onBase

MCP Setup & Tools

Install the MCP server and explore available tools.

Setup

Add the Ouro MCP server to your client. Set WALLET_PRIVATE_KEY to your wallet's hex private key (starts with 0x). Your key never leaves your machine.

.cursor/mcp.json
{
  "mcpServers": {
    "ouro": {
      "command": "npx",
      "args": ["-y", "ouro-mcp"],
      "env": { "WALLET_PRIVATE_KEY": "0x..." }
    }
  }
}

Then just say: "Run echo hello world on Ouro"

Tools Reference

run_job

Submit a compute job and pay automatically. Signs USDC payment via x402 from your wallet. Returns job_id when accepted.

Parameters

ParameterTypeDescription
scriptstringShell script to execute (can combine with files)
filesarrayArray of {path, content} file objects. Combine with script to create files + run a command
imagestringContainer image (default: ouro-ubuntu)
cpusintCPU cores, 1-8 (default 1)
time_limit_minintMax runtime in minutes (default 1)
webhook_urlstringURL to receive POST notification on job completion/failure (optional)
setup_commandsstring[]Shell commands to run during build (WITH network). Use for pip/npm/apt install, git clone. Auto-generates Dockerfile. Cannot combine with Dockerfile in files.
mount_storagebooleanMount persistent /scratch volume for this job (default: false). Limits: 1 GB, max 10,000 files.

Example Response

response.json
{
  "job_id": "a1b2c3d4-...",
  "status": "pending",
  "price": "$0.0100",
  "paid_with_credit": false,
  "credit_applied": 0,
  "webhook_configured": false,
  "mount_storage": false,
  "profitability": { "guaranteed": true, "estimated_profit_pct": 50.0 }
}

get_job_status

Check the status of a job. Uses SSE streaming to wait for completion — call once and it returns when the job finishes. Returns full details including output.

Parameters

ParameterTypeDescription
job_id*stringJob ID to check

Example Response

response.json
{
  "id": "a1b2c3d4-...",
  "status": "completed",
  "price_usdc": 0.01,
  "submitted_at": "2025-01-01T00:00:00+00:00",
  "completed_at": "2025-01-01T00:00:04+00:00",
  "output": "Hello world\n",
  "error_output": "",
  "failure_reason": null,
  "compute_duration_s": 2.4
}

get_price_quote

Get a price quote without submitting or paying. Use this to check pricing before committing.

Parameters

ParameterTypeDescription
cpusintNumber of CPU cores (default 1, max 8)
time_limit_minintMax runtime in minutes (default 1)
submission_modestringSubmission mode: script, multi_file (default: script)

Example Response

response.json
{
  "price": "$0.0100",
  "breakdown": {
    "gas_upper_bound": 0.0025,
    "llm_upper_bound": 0.01,
    "compute_cost": 0.0002,
    "setup_cost": 0.0,
    "cost_floor": 0.0127,
    "margin_multiplier": 1.5,
    "demand_multiplier": 1.0,
    "phase": "OPTIMAL",
    "min_profit_pct": 20.0,
    "safety_factor": 1.25
  }
}

get_allowed_images

Returns the list of available container images for compute jobs. Each image is pre-built with common tools for its ecosystem.

Example Response

response.json
{
  "payment_protocol": "x402",
  "prebuilt_images": {
    "ouro-ubuntu": "Ubuntu 22.04 base image",
    "ouro-python": "Python 3.12 with pip",
    "ouro-nodejs": "Node.js 20 LTS"
  },
  "custom_images": "Any Docker Hub image via Dockerfile",
  "max_cpus": 8,
  "max_time_limit_min": 60,
  ...
}

list_storage

List files in your persistent storage volume. Shows quota usage, file count, and max file limit. No parameters — uses the wallet from your WALLET_PRIVATE_KEY.

Example Response

response.json
{
  "wallet": "0x1234...abcd",
  "tier": "free",
  "quota_bytes": 1073741824,
  "used_bytes": 524288,
  "file_count": 3,
  "max_files": 10000,
  "files": [
    { "path": "model.pt", "size": 524288, "modified": "2025-01-01T00:00:00Z" }
  ]
}

delete_storage_file

Delete a file or directory from your persistent storage. Automatically signs an EIP-191 message to prove wallet ownership.

Parameters

ParameterTypeDescription
path*stringFile path relative to /scratch (e.g. 'models/checkpoint.pt')

Example Response

response.json
{
  "deleted": "models/checkpoint.pt"
}

Storage Limits

Each wallet gets 1 GB of persistent storage with a maximum of 10,000 files.

Exceeding the file limit causes Disk quota exceeded errors inside the container. Use list_storage to check usage and delete_storage_file to free space.

Payment Flow

Payment is fully automatic. When you call run_job, the MCP server signs a USDC payment from your wallet via x402 and submits the job in one step. Your private key never leaves your machine.

If your wallet has credits from a previous failed job, they're applied automatically — reducing or eliminating the payment. See the full payment flow with curl examples on the API page.

← Get StartedREST API →