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 | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dam2452/vastai-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server