# Vast.ai (GPU Rental Cloud API) MCP for AI Agents AI Agent Connect

> Vast.ai (GPU Rental Cloud API) MCP lets you rent high-performance GPUs for deep learning and AI model training directly through your AI client. You can search for specific hardware like H100s or RTX 4090s, deploy Docker containers for PyTorch or TensorFlow, and manage your entire cloud compute fleet without leaving your workspace.

## Overview
- **Category:** cloud-infrastructure
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_FDhKvj0GzXpDt4zTlC7GXQudBJQAnkTGnbdwdCBo/ai-agent-connect
- **Tags:** gpu-rental, deep-learning, docker-deployment, cloud-computing, ai-infrastructure

## Description

The Vast.ai (GPU Rental Cloud API) MCP lets you connect your account to any AI agent so you can rent high-performance GPUs using natural language. Instead of hunting through a web console to find the best price-to-performance hardware, you can just ask your agent to find specific chips like A100s or H100s. You can spin up instances with specific Docker images for PyTorch or TensorFlow and manage your entire fleet from your workspace. It removes the friction of manual dashboard navigation, making cloud infrastructure feel like a conversation. Since Vinkius hosts this tool, you can plug it into your existing workflow and start orchestrating heavy compute tasks without leaving your IDE. You get to focus on your models while the agent handles the hardware lifecycle.

## Tools

### delete_instance
Delete or terminate a rented instance on Vast.ai. This is the fastest way to stop billing once your training task finishes.

### list_instances
List your active rented instances on Vast.ai. Use this to check your current fleet status and connection details.

### rent_instance
Rent a specific GPU instance on Vast.ai. Use this to launch a new node with your preferred Docker image and disk size.

### search_offers
Search for available GPUs on Vast.ai using JSON queries. Use this to find the best price for specific hardware like H100s.

## Prompt Examples

**Prompt:** 
```
Find me an RTX 4090 that costs less than $0.60 an hour.
```

**Response:** 
```
I've searched the marketplace. Here are the best options:

| Offer ID | Price/Hr | VRAM | Location |
| :--- | :--- | :--- | :--- |
| 728391 | $0.42 | 24GB | US East |
| 992104 | $0.55 | 24GB | US West |

Would you like to see more details or rent one of these?
```

**Prompt:** 
```
Rent offer 882391 with the 'nvidia/cuda:12.0-base' image and 100GB of space.
```

**Response:** 
```
Done. I've started the rental for Offer 882391. Your new instance is spinning up with the CUDA 12.0 image and 100GB of disk. I'll let you know when it's ready.
```

**Prompt:** 
```
Show me what's currently running in my Vast.ai account.
```

**Response:** 
```
You have 3 active instances:

* **ID: 1029384** | RTX 4090 | Running | IP: 123.45.67.89 | $0.42/hr
* **ID: 1029385** | A100 | Running | IP: 123.45.68.0 | $1.10/hr
* **ID: 1029386** | H100 | Running | IP: 123.45.69.1 | $2.50/hr
```

## Capabilities

### Search for specific GPU hardware
Find specific chips like RTX 4090s or H100s across the marketplace using hardware filters.

### Rent new compute instances
Launch a new GPU node with a specific Docker image and disk size in one command.

### View your active fleet
Get a real-time list of all your rented instances including status and connection details.

### Terminate instances instantly
Shut down finished compute tasks immediately to stop ongoing hourly costs.

### Query marketplace offers
Filter the marketplace for specific price points and hardware requirements.

## Use Cases

### Training a large model
An AI researcher asks the agent to find an H100 and rent it with 100GB of disk to start a training run.

### Batch processing
A data scientist lists all active instances to check which ones are finished and deletes the old ones to save costs.

### Quick testing
A dev rents a cheap RTX 4090 to test a Docker container for an hour then terminates it immediately.

### Cost auditing
A DevOps engineer asks for a list of all running instances to monitor the daily cloud spend across the team.

## Benefits

- Stop hunting for hardware manually. Use `search_offers` to find the best price-to-performance ratio for your specific needs.
- Launch environments faster. Use `rent_instance` to deploy Docker images like PyTorch or TensorFlow in seconds.
- Control your spending. Use `delete_instance` to shut down nodes the moment your training task finishes.
- Keep your fleet organized. Use `list_instances` to see every active node, its IP, and its current cost at a glance.
- Stay in your flow. You don't have to switch to a web browser to manage your cloud infrastructure.

## How It Works

The bottom line is you get to manage your cloud GPU fleet through natural language instead of manual web forms.

1. Add your Vast.ai API key to your Connector configuration.
2. Ask your agent to find a specific GPU or rent a new instance.
3. Get the new instance ID and connection details immediately.

## Frequently Asked Questions

**Can I use the Vast.ai MCP to find specific GPUs like H100s?**
Yes, you can ask your agent to search for specific hardware. It will filter the marketplace for you and present the best available options based on your requirements.

**How do I rent a GPU with a specific Docker image using this Connector?**
Just tell your agent which offer ID you want to use along with the Docker image name. It will handle the deployment for you automatically.

**Will this Connector help me save money on cloud compute?**
It helps you avoid unnecessary costs by making it easy to list active instances and terminate them the moment your work is finished.

**Can I manage multiple GPU instances at once with the Vast.ai MCP?**
Yes, you can view your entire fleet of active rented instances in one list, making it much easier to track multiple tasks at once.

**Does the Vast.ai MCP work with my existing API key?**
Yes, you just need to provide your Vast.ai API key in the Connector configuration to get started.

**Can I delete instances automatically to stop being charged?**
You can tell your agent to delete or terminate any instance. This ensures you aren't billed for compute time after your task is complete.

**How can I find a specific GPU model like an RTX 4090?**
Use the `search_offers` tool with a query like `{"gpu_name": {"eq": "RTX 4090"}}`. The agent will return a list of available offers matching that hardware.

**What information do I need to rent a new GPU instance?**
You need an `offer_id` (from search results) and a Docker `image` name (e.g., 'pytorch/pytorch'). You can also optionally specify the `disk` size in GB using the `rent_instance` tool.

**How do I stop an instance to avoid further charges?**
Simply use the `delete_instance` tool with the specific `instance_id`. This will terminate the instance and release the GPU back to the marketplace.