Skip to main content

Vast.ai MCP Server

An MCP (Model Context Protocol) server that exposes Vast.ai cloud operations as tools: list GPUs, search offers, create volumes, create instances, and view billing.

Setup

Installed as a package via pip (recommended):

pip install vastai-mcp
export VAST_API_KEY=your_api_key_here

Or from source, for local development:

pip install -e .

Get an API key at https://cloud.vast.ai (Settings -> API Keys).

Run (stdio, for MCP clients)

Installing the package puts a vastai-mcp command on your PATH:

vastai-mcp

Claude Desktop config example

{
  "mcpServers": {
    "vastai": {
      "command": "vastai-mcp",
      "env": { "VAST_API_KEY": "your_api_key" }
    }
  }
}

(See mcp.json.example in this repo for a copy-pasteable template — copy it to mcp.json and fill in your key; mcp.json itself is gitignored since it holds a real secret.)

Tools

Tool Description
search_offers Search rentable machine offers (filter by GPU, price, disk, country).
create_volume Rent a new persistent volume (searches a matching volume offer and rents it).
list_volumes List your rented volumes.
create_instance Rent a machine by offer id (requires max_hourly_price as a spend cap), optionally creating/attaching a volume.
billing_summary Per-instance hourly cost breakdown (GPU, disk, storage, total) plus recent charges.

Typical workflow

  1. search_offers(gpu_name="RTX 4090", max_price=1.0, limit=10) to find a machine.
  2. billing_summary to check current spend.
  3. create_instance(offer_id=123, max_hourly_price=1.0, volume={"size_gb": 100, "mount_path": "/data"}) to launch (refuses if the offer's live price exceeds max_hourly_price).

Release files for vastai-mcp 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vastai-mcp 0.1.2
File Size Uploaded
vastai_mcp-0.1.2.tar.gz 22.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for vastai-mcp 0.1.2
File Interpreter ABI Platform
vastai_mcp-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 22.9 MB

Release files / vastai_mcp-0.1.2.tar.gz

Download URL vastai_mcp-0.1.2.tar.gz
Size 22.9 MB
Tags Source
SHA-256 checksum
How to use checksums
79f999ffb62623280df35215480f8ba07d0bfa3b73ce40c111e11e8874c16600
BLAKE2b-256 checksum
How to use checksums
49bbda242e60944e86e022e35dd77f3017326f2254012d81eec4c03e2997af4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / vastai_mcp-0.1.2-py3-none-any.whl

Download URL vastai_mcp-0.1.2-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f88fc57595266f6474787d137290387a5466fb48936d0361e4d7fc1517a45356
BLAKE2b-256 checksum
How to use checksums
bba0eb76757a22c982620ae3bd9f9fa85fe92579c5022e7f3e8d83aa31a16092
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

0.1.3

2 release files

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page