# Vast.ai — how to use (mcp.ai)

Connect your Vast.ai account and use 3 tools for artificial intelligence straight from your AI agent. Connect with your own API key. Search Vast.ai GPU compute offers, storage volume offers, and launch templates using a durable API key.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_vast_ai?ms=1787293560000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `vast_ai_search_gpu_offers`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/vast_ai`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/vast_ai/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/vast_ai/search/gpu/offers` — Find currently rentable Vast.ai GPU compute offers using verified marketplace filters. Returns compact offer identifiers, GPU capacity, and hourly pricing for comparison; it does not rent an offer. Th
  - body: { limit?: integer, gpu_names?: string[], locations?: string[], gpu_counts?: integer[], rentable_only?: boolean, verified_only?: boolean }
- `POST https://api.mcp.ai/api/vast_ai/search/templates` — Search Vast.ai launch templates by safe identifying metadata. The tool filters and pages locally because the provider returns a large unpaginated payload.
  - body: { limit?: integer, offset?: integer, hash_id?: string, template_id?: integer, name_contains?: string, recommended_only?: boolean }
- `POST https://api.mcp.ai/api/vast_ai/search/volume/offers` — Find Vast.ai storage volume offers available in the marketplace. Returns compact location, capacity, and storage-cost details; it does not rent or modify a volume.
  - body: { limit?: integer }

## Example prompts
- "What can I do in Vast.ai?"
- "Show me a summary of my Vast.ai account"

## More
- Page: https://mcp.ai/vast_ai
- Agent spec (llms.txt): https://mcp.ai/vast_ai/llms.txt
- Postman collection: https://mcp.ai/vast_ai/postman.json
