Vast.ai is an MCP server that integrates Vast.ai's cloud GPU rental marketplace directly into MCP-compatible clients. It connects to the Vast.ai API and local SSH utilities, allowing machine learning practitioners, data scientists, and backend developers to provision and monitor remote computational hardware from an AI interface. Users can search for hardware matching specific GPU models, system memory thresholds, geographic regions, and pricing constraints without opening a web console. Beyond searching, the server enables users to spin up containers from custom Docker images, manage system lifecycles through stopping, starting, rebooting, and destroying instances, and configure network setups like direct connections and Jupyter access. The server also supports operational maintenance by fetching container and system logs, monitoring current spending and user balances, querying persistent volume storage, and executing remote tasks on both running systems through SSH and stopped instances through native maintenance commands.
Category: Cloud & Infrastructure
Tags: cloud, compute, gpu, vast.ai
bash brew install uv 2. Clone the repository and navigate into the directory: bash git clone https://github.com/CryDevOk/vastai-mcp.git cd vastai-mcp 3. Sync project dependencies: bash uv sync 4. Install the server tool locally: bash uv tool install -e . 5. Add the server configuration to your MCP settings file (such as ~/.cursor/mcp.json): json { "mcpServers": { "vast-ai": { "command": "uv", "args": [ "run", "vast-mcp-server" ], "env": { "VAST_API_KEY": "your_vast_api_key_here", "SSH_KEY_FILE": "~/.ssh/id_rsa", "SSH_KEY_PUBLIC_FILE": "~/.ssh/id_rsa.pub" } } } }Part of MCP Servers
You install the package using the uv package manager on your system. First install uv, clone the vastai-mcp repository, run uv sync to install the required dependencies, and run uv tool install -e . to register the vast-mcp-server executable.
It provides 23 tools to manage cloud GPU instances on Vast.ai. You can view user balances, search for hardware and storage volume offers, create and label instances, monitor running instance configurations, retrieve container logs, and execute remote commands via SSH.
It functions with any client that implements the standard Model Context Protocol and executes local subprocesses with environment variables, such as Claude Desktop or Cursor configured via mcp.json.
The server requires your VAST_API_KEY generated from the Vast.ai console account settings. It also expects paths to your local SSH keys via SSH_KEY_FILE and SSH_KEY_PUBLIC_FILE to enable secure remote access.