Skip to content

MCP

GPU and ARM machines your AI agent can rent through MCP.

Add one MCP server and your agent can create a machine, run commands on it, check what it spent and stop it, from prepaid credits and inside the cap you set. Details may change.

Flocky, the CapVM mascot, typing

Set up in three steps

  • Get an agent key (ak_test_… while you build, ak_live_… in production) with a spend cap. For now, CapVM issues keys for you.
  • Point your MCP client at https://api.capvm.com/mcp (streamable HTTP, not under /v1) with the header Authorization: Bearer ak_test_….
  • Your agent calls create_machine, then exec, then stop_machine. The same caps and limits apply as on the REST API.

Full setup, key safety and errors: MCP docs. Also see the Quickstart, API reference and Billing and caps.

.cursor/mcp.json
{
  "mcpServers": {
    "capvm": {
      "url": "https://api.capvm.com/mcp",
      "headers": {
        "Authorization": "Bearer ak_test_..."
      }
    }
  }
}

Never commit a config file that contains a key. Give each client its own key with a low spend cap.

Tools

The eight MCP tools.

create_machine

Rents a machine (arm-small or gpu-l4) with a time limit. The full time limit is held before launch. Needs an idempotency_key.

get_machine

Returns one machine by id.

list_machines

Lists up to 100 machines for this key, newest first.

stop_machine

Stops a machine, charges the billed seconds and releases the rest of the hold.

exec

Runs a command on a ready machine and returns stdout, stderr and the exit code.

get_usage

Spend, open holds and spend cap for the calling key, plus recent charges.

get_balance

The organization's available and held credits.

create_checkout_session

Starts a card top-up and returns a Stripe Checkout link. A human must open the link and pay.

Tool names as listed in the MCP docs. Money is always integer micro-USD (1 USD = 1,000,000). Connecting with OAuth instead of a key is coming soon.

Machines

What your agent can rent.

ARM sandbox · $0.20/h

  • arm-small: 2 vCPU, 4 GiB memory, ARM64 Linux
  • Billed per second, 60-second minimum

NVIDIA L4 GPU · $2.00/h

  • gpu-l4: 1× NVIDIA L4, 24 GB
  • Limited GPU capacity

At most 2 hours per machine. All pricing rules.

FAQ

MCP questions.

Can an AI agent rent a GPU through MCP?

Yes. CapVM serves the Model Context Protocol over streamable HTTP at https://api.capvm.com/mcp. An agent with a CapVM key calls create_machine with sku gpu-l4 (NVIDIA L4, $2.00/h) or arm-small (ARM64, $0.20/h).

Which MCP tools does CapVM have?

create_machine, get_machine, list_machines, stop_machine, exec, get_usage, get_balance and create_checkout_session.

How do I stop an agent from overspending?

Give each agent its own API key with a low spend cap. CapVM rejects a machine that would take the key over its cap, and machines stop when the cap or your credits run out.

Can the agent pay for credits itself?

No. create_checkout_session returns a Stripe Checkout link, and a human must open it and pay.

Get started Read the docs

For business customers only. Prepaid credits never expire.