vastai-mcp
This server exposes Vast.ai cloud operations as MCP tools for managing GPU rentals, storage, and billing.
List GPUs: View supply, availability, and per-model price percentiles, optionally filtered by verification or hosting type.
Search offers: Find rentable GPU machines by GPU model, price cap, disk, GPUs, country, and more.
Create volumes: Rent standalone persistent storage volumes.
List/delete volumes: View and remove your rented volumes to stop billing.
Create instances: Rent a machine by offer ID with a required hourly price cap, optionally attaching or creating a volume, with Docker image/env and run type options.
Destroy instances: Terminate rented instances to stop billing.
Billing summary: Get per-instance hourly cost breakdowns (GPU, disk, storage, total) and recent charges.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@vastai-mcp Find an RTX 4090 for under $1 per hour"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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_hereOr from source, for local development:
pip install -e .Get an API key at https://cloud.vast.ai (Settings -> API Keys).
Related MCP server: Massed Compute MCP Server
Run (stdio, for MCP clients)
Installing the package puts a vastai-mcp command on your PATH:
vastai-mcpClaude 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 rentable machine offers (filter by GPU, price, disk, country). |
| Rent a new standalone persistent volume (finds a GPU offer's free volume slot and rents it). |
| List your rented volumes. |
| Delete a rented volume by id, stopping its billing. |
| Rent a machine by offer id (requires |
| Terminate a rented instance by id, stopping its billing. |
| Per-instance hourly cost breakdown (GPU, disk, storage, total) plus recent charges. |
Typical workflow
search_offers(gpu_name="RTX 4090", max_price=1.0, limit=10)to find a machine.billing_summaryto check current spend.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 exceedsmax_hourly_price).destroy_instance(instance_id=...)/delete_volume(volume_id=...)to tear down when done.
Available Tools
6 toolsbilling_summaryA
Overall billing: per-instance hourly cost breakdown (GPU, disk, storage, total $/hr) plus the most recent charges. days limits the charge lookback window.
Inputs: days, limit.
create_instanceA
Create (rent) a new instance on a specific machine offer (ask id from search_offers), optionally creating and attaching a new volume. Returns the new contract/instance id. Requires max_hourly_price as a spend guardrail: the offer's live price is checked against it and the rental is refused if the price exceeds the cap or can't be verified.
Inputs: offer_id (required), max_hourly_price (required), env, image, +5 more.
create_volumeA
Rent a new persistent volume on Vast.ai. The volume is billed separately from instances. Returns the new volume name/id.
Inputs: size_gb (required).
list_gpusA
Show the current snapshot of all available GPUs on Vast.ai: total supply, available count, and 10th/median/90th percentile pricing per GPU model.
Inputs: verified, hosting_type.
list_volumesA
List all volumes currently rented by you.
Inputs: no named parameters.
search_offersA
Search rentable GPU machine offers on Vast.ai. Returns offers with id (ask_id), gpu_name, num_gpus, price per hour (dph_total), disk, region, bandwidth, verification and reliability. Use the returned offer id with create_instance.
Inputs: sort, limit, country, gpu_name, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct resource or action: GPU pricing snapshots, rentable offers, volume creation, volume listing, instance creation, and billing. list_gpus and search_offers are related but clearly differ in granularity, and the descriptions prevent confusion.
Most tool names follow a clear verb_noun pattern such as list_gpus, create_volume, and create_instance. billing_summary is the only real outlier, being a noun phrase rather than a verb-led action, but the overall convention remains predictable.
Six tools is well within the ideal scope for a focused rental-management server. Each tool serves a necessary step in the core workflow, and there is no obvious bloat or redundancy.
The tool set covers discovery, creation, volume listing, and billing, but it lacks essential lifecycle operations such as listing instances, terminating instances, and deleting volumes. This creates significant dead ends: resources can be created but not managed or cleaned up.
Related MCP Connectors
Massed Compute MCP — GPU inventory, VM lifecycle, billing, SSH keys, and setup recipes.
MCP commerce surface for compute credits, API keys, GPU instances, and cloud storage.
Hosted MCP for Celesto cloud computers: create, exec, ports, start/stop/delete.
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables comprehensive management of Vast.ai GPU cloud instances, including searching for GPU offers, creating and managing instances, executing remote commands via SSH, and monitoring background tasks for ML training workflows.13MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to manage Massed Compute GPU instances, including browsing inventory, launching and managing VMs, and auditing billing.1MIT

paraloncloud-rentalsofficial
AlicenseAqualityBmaintenanceEnables MCP clients to rent GPUs from ParalonCloud using natural language, including browsing available GPUs, starting and stopping rentals, and retrieving connection URLs.17129 npm2MIT- FlicenseAqualityDmaintenanceMCP server that wraps the Vast.ai REST API to enable LLM agents to search GPU marketplace, rent machines, manage instance lifecycle, run commands, and inspect billing.201-