vastai-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@vastai-mcpfind me a cheap GPU with at least 24GB VRAM"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
vastai-mcp
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 the GPU marketplace (POST /bundles/) |
|
| GPU benchmark data (GET /benchmarks/) |
|
| Search user and public templates (GET /template/) |
|
| Current supply/demand/pricing snapshot |
|
| Historical price/supply time-series |
|
| List user's instances (GET /instances/) |
|
| Instance details (GET /instances/{id}/) |
|
| Rent a GPU (PUT /asks/{offer_id}/) |
|
| start/stop/label/reboot/recycle |
|
| Permanently destroy (DELETE /instances/{id}/) |
|
| Change spot bid price |
|
| Request instance logs |
|
| Run a remote command |
| none | Current account + credit balance |
|
| Escape hatch for any other endpoint |
|
| Register a local public key on the Vast.ai account (POST /ssh/) |
| none | List registered SSH keys (GET /ssh/) |
|
| Resolve |
|
| Run a command over SSH (paramiko) |
|
| 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 |
| yes | Vast.ai API key (https://cloud.vast.ai/manage-keys/) |
| no | Default path to your SSH private key, used by |
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-mcpClaude 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-mcpTests (manual):
uv run --directory . --with pytest pytest test/Maintenance
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
- Alicense-qualityDmaintenanceAn MCP server that enables AI agents to interact with the SpaceTraders API, managing agents, fleets, contracts, and trading operations in the SpaceTraders universe.MIT
- AlicenseAqualityAmaintenanceMCP server that exposes any CashPilot instance to LLMs, enabling monitoring of passive income earnings, managing bandwidth-sharing services, and controlling fleet workers10653GPL 3.0
- FlicenseAqualityFmaintenanceMCP 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.53
- Alicense-qualityDmaintenanceMCP server for interacting with QUADS infrastructure systems via API, enabling resource management and automation through LLM applications.MIT
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.
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