Skip to main content
Glama
dam2452

vastai-mcp

by dam2452

vastai-mcp

Polski

Vast.ai GPU cloud marketplace and instance management MCP server.

Wraps the Vast.ai REST API (https://console.vast.ai/api/v0) so an LLM agent can search the GPU marketplace, rent machines, manage lifecycle, run commands, and inspect billing.

Table of contents

Related MCP server: cashpilot-mcp

Tools

Tool

Parameters

Description

search_offers

query: Dict[str, Any]

Search the GPU marketplace (POST /bundles/)

search_benchmarks

gpu_name: Optional[str] = None

GPU benchmark data (GET /benchmarks/)

search_templates

select_filters: Optional[Dict] = None

Search user and public templates (GET /template/)

get_gpu_metrics

gpu_name, verified, datacenter

Current supply/demand/pricing snapshot

get_gpu_trends

gpu_names, window_hours=24, step

Historical price/supply time-series

list_instances

label: Optional[str] = None

List user's instances (GET /instances/)

get_instance

instance_id: int

Instance details (GET /instances/{id}/)

create_instance

offer_id, image/template_hash_id, disk, runtype, env, onstart, price, ...

Rent a GPU (PUT /asks/{offer_id}/)

manage_instance

instance_id, action: Literal[...], label?

start/stop/label/reboot/recycle

destroy_instance

instance_id: int

Permanently destroy (DELETE /instances/{id}/)

change_bid

instance_id, price: float

Change spot bid price

show_instance_logs

instance_id, tail=1000

Request instance logs

execute_command

instance_id, command: str

Run a remote command

get_current_user

none

Current account + credit balance

raw_request

method, path, params?, body?

Escape hatch for any other endpoint

register_ssh_key

name, public_key_path

Register a local public key on the Vast.ai account (POST /ssh/)

list_ssh_keys

none

List registered SSH keys (GET /ssh/)

get_instance_ssh_info

instance_id

Resolve ssh_host/ssh_port + ready-to-run ssh command

ssh_exec

instance_id, command, key_path?, user="root", timeout=30

Run a command over SSH (paramiko)

ssh_transfer

direction: Literal["upload","download"], instance_id, local_path, remote_path, key_path?, user="root"

SFTP upload/download between local disk and instance

The query body for search_offers follows the Vast.ai filter operator convention: each field maps to {eq, neq, gt, lt, gte, lte, in, notin}. Example:

{
  "gpu_name": {"in": ["RTX 4090"]},
  "num_gpus": {"gte": 1},
  "reliability": {"gte": 0.99},
  "verified": {"eq": true},
  "rentable": {"eq": true},
  "type": "ondemand",
  "limit": 5
}

Environment variables

Variable

Required

Description

VASTAI_MCP_API_KEY

yes

Vast.ai API key (https://cloud.vast.ai/manage-keys/)

VASTAI_MCP_SSH_KEY_PATH

no

Default path to your SSH private key, used by ssh_exec and ssh_transfer when key_path is not passed per-call

Wiring it up

Only requirement: uv (https://docs.astral.sh/uv/). Nothing else to install.

Claude Code

claude mcp add vastai-mcp -e VASTAI_MCP_API_KEY=<value> -- uvx --from git+https://github.com/dam2452/vastai-mcp.git vastai-mcp

Claude Desktop / other MCP client

{
  "mcpServers": {
    "vastai-mcp": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/dam2452/vastai-mcp.git", "vastai-mcp"],
      "env": { "VASTAI_MCP_API_KEY": "<value>" }
    }
  }
}

After pushing a new version: uv cache clean and restart the client.

Local run

uv run --directory . vastai-mcp

Tests (manual):

uv run --directory . --with pytest pytest test/
Install Server
F
license - not found
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    An MCP server that enables AI agents to interact with the SpaceTraders API, managing agents, fleets, contracts, and trading operations in the SpaceTraders universe.
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    MCP server that exposes any CashPilot instance to LLMs, enabling monitoring of passive income earnings, managing bandwidth-sharing services, and controlling fleet workers
    10
    65
    3
    GPL 3.0
  • F
    license
    A
    quality
    F
    maintenance
    MCP server that exposes 300+ AI agents as tools via a single API key. Supports listing agents, invoking any agent with chat-completion style messages, checking agent health, and retrieving platform statistics.
    5
    3
  • A
    license
    -
    quality
    D
    maintenance
    MCP server for interacting with QUADS infrastructure systems via API, enabling resource management and automation through LLM applications.
    MIT

View all related MCP servers

Related MCP Connectors

  • Provision and manage a VPS for AI agents over MCP: register, order, get root, control the server.

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

View all MCP Connectors

Latest Blog Posts

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