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 |
|---|---|
list_gpus |
Current GPU supply/demand/pricing snapshot. |
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
list_gpusto see what's available.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).
Release files for vastai-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vastai_mcp-0.1.1.tar.gz | 22.9 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vastai_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.0 MB
Release files / vastai_mcp-0.1.1.tar.gz
| Download URL | vastai_mcp-0.1.1.tar.gz |
|---|---|
| Size | 22.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d722deec84a34db76b9be9b7f1c2b921a4297f8b55bc1e2ddd95e7e2fc00839f
|
|
BLAKE2b-256 checksum How to use checksums |
4f6204e674973b0d7e4c31c0ebeb7fb0f866cb5b122c914dba0158e00cc433f2
|
| 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.1-py3-none-any.whl
| Download URL | vastai_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c9db53d2b21d92c6f65c09f1b76f3810071ff3dcd0d647dbd949106719bf539
|
|
BLAKE2b-256 checksum How to use checksums |
b1d5f57487430eefc05a775e22a6a2ec7a6145f2e4b406ba6b95c14bee9549ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|