vastai-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_offersA | Search the Vast.ai GPU marketplace for rentable machine offers. The body is sent as-is to POST /bundles/. Top-level keys commonly include
Examples: search_offers({"gpu_name": {"in": ["RTX 4090"]}, "num_gpus": {"gte": 1}, "reliability": {"gte": 0.99}, "verified": {"eq": True}, "rentable": {"eq": True}, "type": "ondemand", "limit": 5}) search_offers({"type": "bid", "gpu_ram": {"gte": 24000}, "order": [["dph_total", "asc"]], "limit": 10}) |
| search_benchmarksA | Retrieve all GPU benchmark records (GET /benchmarks/). Returns a list of benchmark entries with Examples: search_benchmarks() |
| search_templatesA | Search user and public templates (GET /template/). The endpoint always requires a Examples: search_templates() search_templates(select_filters={"tag": {"eq": "pytorch"}}) |
| get_gpu_metricsB | Current snapshot of supply, demand, and pricing across GPU types (GET /metrics/gpu/current/). Examples: get_gpu_metrics() get_gpu_metrics(gpu_name=["RTX 4090", "A100"], verified=True) |
| get_gpu_trendsA | Time-series of GPU supply/demand/pricing (GET /metrics/gpu/history/). Returns ~20 sampled data points over the window by default. Examples: get_gpu_trends() get_gpu_trends(gpu_names=["RTX 4090"], window_hours=168) |
| list_instancesA | List the authenticated user's instances (GET /instances/). Examples: list_instances() list_instances(label="vllm-inference") |
| get_instanceA | Retrieve details of a specific instance (GET /instances/{id}/). Examples: get_instance(instance_id=12345) |
| create_instanceA | Rent a GPU by accepting offer_id (PUT /asks/{offer_id}/). Either
Examples: create_instance(offer_id=12345678, image="ubuntu:22.04", disk=16, runtype="ssh_direct") create_instance(offer_id=12345678, image="vllm/vllm-openai:latest", disk=50, runtype="ssh_direct", env={"MODEL_ID": "deepseek-ai/DeepSeek-R1-Distill-Llama-8B", "-p 8000:8000": "1"}, onstart="vllm serve $MODEL_ID --port 8000") create_instance(offer_id=12345678, template_hash_id="4e17788f74f075dd9aab7d0d4427968f", disk=100) create_instance(offer_id=12345678, image="ubuntu:22.04", disk=16, runtype="ssh_direct", price=0.20) |
| manage_instanceA | Control instance state: start/stop/label/reboot/recycle.
For Examples: manage_instance(instance_id=12345, action="stop") manage_instance(instance_id=12345, action="start") manage_instance(instance_id=12345, action="label", label="my-server") manage_instance(instance_id=12345, action="reboot") |
| destroy_instanceA | Permanently destroy an instance and all its data (DELETE /instances/{id}/). Irreversible. Call carefully. Examples: destroy_instance(instance_id=12345) |
| change_bidA | Change the bid price of an interruptible instance (PUT /instances/bid_price/{id}/). Examples: change_bid(instance_id=12345, price=0.25) |
| show_instance_logsA | Request instance logs (PUT /instances/request_logs/{id}). Logs are uploaded to S3; the response contains a URL to fetch them. Examples: show_instance_logs(instance_id=12345) show_instance_logs(instance_id=12345, tail=5000) |
| execute_commandA | Execute a constrained remote command on a STOPPED instance (PUT /instances/command/{id}/). Only works on instances whose The API additionally enforces a command whitelist — unknown commands return
400 "Invalid command given". Examples: execute_command(instance_id=12345, command="ls /workspace") |
| get_current_userA | Retrieve the authenticated user's account info and credit balance (GET /users/current/). Examples: get_current_user() |
| raw_requestA | Escape hatch for any Vast.ai REST endpoint not covered by other tools.
Examples: raw_request(method="GET", path="/volumes/") raw_request(method="POST", path="/ssh/", body={"ssh_key": "ssh-rsa AAA..."}) |
| register_ssh_keyA | Register a local SSH public key on the Vast.ai account (POST /ssh/). The key is applied automatically to all current instances and any new instances created afterwards. Reads the .pub file from disk — never uploads your private key. Examples: register_ssh_key(name="laptop", public_key_path="C:/Users/me/.ssh/id_ed25519.pub") register_ssh_key(name="ci", public_key_path="/home/runner/.ssh/id_ed25519.pub") |
| list_ssh_keysA | List SSH keys registered on the Vast.ai account (GET /ssh/). Examples: list_ssh_keys() |
| get_instance_ssh_infoA | Resolve an instance's direct SSH endpoint (host, port) and return a
ready-to-run Examples: get_instance_ssh_info(instance_id=12345) |
| ssh_execA | Execute a command on a running instance over SSH (paramiko). Resolves the instance's
Examples: ssh_exec(instance_id=12345, command="nvidia-smi") ssh_exec(instance_id=12345, command="ls /workspace", key_path="/home/me/.ssh/id_ed25519") ssh_exec(instance_id=12345, command="python train.py", user="root", timeout=300) |
| ssh_transferA | Transfer a single file between the local machine and an instance over SFTP.
Directories are not supported — call once per file. Resolves the instance's
Examples: ssh_transfer(direction="upload", instance_id=12345, local_path="./train.py", remote_path="/workspace/train.py") ssh_transfer(direction="download", instance_id=12345, local_path="./results.tar", remote_path="/workspace/results.tar") |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 20 tools
Each tool targets a distinct resource and action: search_offers/search_benchmarks/search_templates operate on different datasets, get_gpu_metrics vs get_gpu_trends differ by snapshot vs history, and instance tools are clearly separated (list/get/create/manage/destroy). Even potentially similar tools like execute_command and ssh_exec are explicitly differentiated by stopped vs running instance state.
All tools follow a consistent verb_noun snake_case pattern (search_offers, list_instances, create_instance, destroy_instance, ssh_exec, ssh_transfer). The naming is predictable and consistent, with no camelCase or mixed conventions.
20 tools is at the upper end of 'well-scoped' but appropriate for a full Vast.ai API surface covering marketplace search, instance CRUD, SSH operations, metrics, and user info. The count feels justified given the breadth of features, though slightly heavy compared to a typical 3-15 tool server.
The surface covers the main GPU rental workflow: search offers, create/read/delete instances, manage state, run commands, transfer files, and fetch metrics. Minor gaps like volume management exist, but the raw_request escape hatch covers any missing endpoint, preventing dead ends.