show_user_infoLABSCO SUMMARY
The rented GPU box, answerable from the window where the code is.
Vast.ai's whole failure mode is the instance you forgot was running. What it costs you and what is still up become questions you ask, rather than a browser tab you remember to open.
What it is
An MCP server for the Vast.ai GPU cloud. It authenticates with your Vast.ai API key and, for anything that needs a shell on the box, your SSH key pair. Its tools cover the account, a search of GPU offers, the instance lifecycle — create, start, stop, reboot and destroy — and shell commands on a running box over SSH.
What you get
- Your account as the API sees it — username, email, user ID, current balance and total spent
- The SSH key information Vast.ai holds for you
- Your instances listed by state, so you can see what is still burning credit
- Instances rented and run from the conversation — offers searched, instances created, started, stopped, rebooted and destroyed, and commands run on them over SSH
Requirements
A Vast.ai API key from Account → API Keys at console.vast.ai, set as VAST_API_KEY. Install with uv: uv sync, then uv tool install -e .. For anything that needs a shell on the instance, point SSH_KEY_FILE and SSH_KEY_PUBLIC_FILE at your key pair and tighten the private key's file permissions — the README describes SSH keys as needed for full functionality.
Setup effort
Build from source — git clone https://github.com/CryDevOk/vastai-mcp.git
USE CASES
Checking what you have spent before renting more
Read the account back: balance, total spent, and which user the key belongs to.
Finding the box you left running
List your instances and their states, so nothing sits idle on the meter.
Reconciling spend against what is actually up
Read the balance and the instance list together, so the number has something to explain it.
Looking at another account's instances
Pass the owner explicitly rather than defaulting to your own.
24 tools
Listed in project docs. Your client may show a different list.
show_instancessearch_offerscreate_instancedestroy_instancestart_instancestop_instancesearch_volumeslabel_instancelaunch_instance_workflowprepay_instancereboot_instancerecycle_instanceshow_instancelogsattach_sshsearch_templatesexecute_commandssh_execute_commandssh_execute_background_commandssh_check_background_taskssh_kill_background_taskdisable_sudo_passwordconfigure_mcp_rulesBEFORE YOU INSTALL
What to know first
Tools you get
24 tools named in the project's documentation.
Requires
- uv on PATH
- VAST_API_KEY in your environment
Where it runs
Both documented clients run the server on your machine.
INSTALLATION
Connect your client
This one is built from source rather than installed with a single command.
Server setup
git clone https://github.com/CryDevOk/vastai-mcp.git
cd vastai-mcp
uv sync
uv tool install -e .MCP Clients
Cursor, Claude Desktop
{
"mcpServers": {
"vast-ai": {
"command": "uv",
"args": [
"run",
"vast-mcp-server"
],
"env": {
"VAST_API_KEY": "<YOUR_VAST_API_KEY>",
"SSH_KEY_FILE": "~/.ssh/id_rsa",
"SSH_KEY_PUBLIC_FILE": "~/.ssh/id_rsa.pub"
}
}
}
}