{"id":49418349,"url":"https://github.com/groupthink-dev/vastai-blade-mcp","last_synced_at":"2026-04-29T04:12:28.216Z","repository":{"id":352846541,"uuid":"1215230110","full_name":"Groupthink-dev/vastai-blade-mcp","owner":"Groupthink-dev","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-21T11:18:13.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-21T12:38:35.057Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Groupthink-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-19T16:45:48.000Z","updated_at":"2026-04-21T11:18:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Groupthink-dev/vastai-blade-mcp","commit_stats":null,"previous_names":["groupthink-dev/vastai-blade-mcp"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Groupthink-dev/vastai-blade-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Groupthink-dev%2Fvastai-blade-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Groupthink-dev%2Fvastai-blade-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Groupthink-dev%2Fvastai-blade-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Groupthink-dev%2Fvastai-blade-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Groupthink-dev","download_url":"https://codeload.github.com/Groupthink-dev/vastai-blade-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Groupthink-dev%2Fvastai-blade-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32410080,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T03:46:11.172Z","status":"ssl_error","status_checked_at":"2026-04-29T03:37:55.317Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-29T04:12:22.048Z","updated_at":"2026-04-29T04:12:28.210Z","avatar_url":"https://github.com/Groupthink-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vast.ai Blade MCP\n\nA GPU marketplace MCP server for Vast.ai. 16 tools for searching GPU offers, provisioning instances, managing bids, and billing — with token-efficient defaults and dual safety gates on every write operation.\n\nImplements the [`virtualisation-v1`](https://github.com/Groupthink-dev/stallari-pack-spec) service contract.\n\n## Why Blade MCP?\n\nThe `-blade-mcp` suffix identifies this as part of the [Blade MCP](https://github.com/Groupthink-dev) family — purpose-built MCP servers with:\n\n- **Service contracts** — implements `virtualisation-v1` so agentic platforms can swap between GPU providers (Vultr, Vast.ai, RunPod) without rewriting prompts.\n- **Token efficiency** — formatters strip ~60% of raw API response. An offer summary shows GPU model, VRAM, price/hr, and reliability — not 50+ fields of metadata.\n- **Dual write gates** — environment variable + per-call confirmation on all destructive operations. Accepting GPU offers incurs charges immediately; accidental invocations are expensive.\n- **Dual transport** — stdio for local use, Streamable HTTP for remote and always-on deployment.\n\nOther blades: [vultr-blade-mcp](https://github.com/Groupthink-dev/vultr-blade-mcp) (50 tools), [cloudflare-blade-mcp](https://github.com/Groupthink-dev/cloudflare-blade-mcp) (53 tools), [fastmail-blade-mcp](https://github.com/Groupthink-dev/fastmail-blade-mcp) (20 tools), and more.\n\n## Quick Start\n\n### Install\n\n```bash\ngit clone https://github.com/Groupthink-dev/vastai-blade-mcp.git\ncd vastai-blade-mcp\nnpm install \u0026\u0026 npm run build\n```\n\n### Configure\n\n```bash\n# Required — get your API key at https://cloud.vast.ai/cli/\nexport VASTAI_API_KEY=\"your-api-key\"\n\n# Required for write operations (create, delete, start, stop, reboot, change bid)\nexport VASTAI_WRITE_ENABLED=\"true\"\n```\n\n### Run\n\n```bash\n# stdio (default — for Claude Code, Claude Desktop)\nnode dist/index.js\n\n# HTTP (for remote access, tunnels, always-on deployment)\nTRANSPORT=http PORT=8783 node dist/index.js\n```\n\n### Claude Desktop config\n\n```json\n{\n  \"mcpServers\": {\n    \"vastai\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/vastai-blade-mcp/dist/index.js\"],\n      \"env\": {\n        \"VASTAI_API_KEY\": \"your-api-key\",\n        \"VASTAI_WRITE_ENABLED\": \"true\"\n      }\n    }\n  }\n}\n```\n\n## Tools (16)\n\n### Offers (2)\n\n| Tool | Description |\n|------|-------------|\n| `vastai_search_offers` | Search the GPU marketplace. Filter by GPU model, VRAM, price, location, reliability |\n| `vastai_search_templates` | Browse pre-built Docker image templates |\n\n### Instances (7)\n\n| Tool | Description |\n|------|-------------|\n| `vastai_instance_list` | List your GPU instances with status, GPU spec, pricing, SSH connectivity |\n| `vastai_instance_get` | Get detailed instance info including GPU utilisation and temperature |\n| `vastai_instance_create` | Accept a GPU offer to create an instance (write-gated) |\n| `vastai_instance_delete` | Permanently destroy an instance (write-gated, irreversible) |\n| `vastai_instance_start` | Start a stopped instance (write-gated) |\n| `vastai_instance_stop` | Stop a running instance, retaining GPU reservation (write-gated) |\n| `vastai_instance_reboot` | Reboot without losing GPU priority (write-gated) |\n\n### Instance Extras (3)\n\n| Tool | Description |\n|------|-------------|\n| `vastai_instance_logs` | Fetch container or daemon logs |\n| `vastai_instance_label` | Set a descriptive label on an instance |\n| `vastai_instance_change_bid` | Change bid price for interruptible instances (write-gated) |\n\n### SSH Keys (2)\n\n| Tool | Description |\n|------|-------------|\n| `vastai_ssh_key_list` | List SSH keys on your account |\n| `vastai_ssh_key_create` | Add a new SSH public key (write-gated) |\n\n### Account (2)\n\n| Tool | Description |\n|------|-------------|\n| `vastai_account_info` | Account details and balance |\n| `vastai_billing_invoices` | Billing history with date range and service filters |\n\n## Architecture\n\n```\nsrc/\n├── index.ts              # Entry point (stdio/HTTP dual transport)\n├── server.ts             # McpServer creation, registers all 16 tools\n├── constants.ts          # API base URL, defaults, env var names\n├── services/\n│   ├── vastai.ts         # API client, key validation\n│   └── auth.ts           # Bearer token middleware for HTTP transport\n├── schemas/\n│   ├── common.ts         # Pagination, ConfirmSchema\n│   ├── offers.ts         # Search offers/templates schemas\n│   ├── instances.ts      # Instance CRUD + extras schemas\n│   └── account.ts        # SSH keys, account, billing schemas\n├── formatters/\n│   ├── offer.ts          # GPU offer → token-efficient summary\n│   ├── instance.ts       # Instance → token-efficient summary\n│   └── account.ts        # Account, SSH key, invoice formatters\n├── tools/\n│   ├── offers.ts         # Marketplace search tools\n│   ├── instances-read.ts # List, get instance\n│   ├── instances-write.ts # Create, delete, start, stop, reboot\n│   ├── instances-extras.ts # Logs, label, change bid\n│   ├── ssh-keys.ts       # SSH key management\n│   └── account.ts        # Account info, billing\n└── utils/\n    ├── errors.ts         # API error → actionable message\n    ├── write-gate.ts     # Dual write gate (env var + confirm)\n    └── pagination.ts     # Response truncation\n```\n\n## Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `VASTAI_API_KEY` | Yes | Vast.ai API key |\n| `VASTAI_WRITE_ENABLED` | For writes | Set to `true` to enable write operations |\n| `MCP_API_TOKEN` | No | Bearer token for HTTP transport auth |\n| `TRANSPORT` | No | `stdio` (default) or `http` |\n| `PORT` | No | HTTP port (default: 8783) |\n\n## Write Safety\n\nEvery destructive operation is double-gated:\n\n1. **Environment gate**: `VASTAI_WRITE_ENABLED=true` must be set\n2. **Per-call gate**: `confirm: true` must be passed in the tool input\n\nBoth gates must pass. This prevents accidental GPU provisioning (which incurs charges immediately) while keeping read operations frictionless.\n\n## Vast.ai Concepts\n\nUnlike traditional IaaS (Vultr, DigitalOcean), Vast.ai is a **GPU marketplace**:\n\n- **Offers** are available GPU machines from P2P hosts. You search offers with filters (GPU model, VRAM, price).\n- **Instances** are created by accepting an offer (`vastai_instance_create` with an `offer_id`).\n- **Bid pricing** — interruptible instances can be cheaper with bid-based pricing. Change bids dynamically with `vastai_instance_change_bid`.\n- **Container-native** — instances run Docker images. No cloud-init. Use `onstart` for shell commands and `image` for the Docker image.\n- **Templates** are pre-configured Docker images (PyTorch, TensorFlow, etc.) that can be used as base configurations.\n\n## Development\n\n```bash\nnpm run dev          # tsx watch (stdio)\nnpm run dev:http     # tsx watch (HTTP on port 8783)\nnpm run typecheck    # tsc --noEmit\nnpm test             # vitest (33 tests)\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroupthink-dev%2Fvastai-blade-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgroupthink-dev%2Fvastai-blade-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroupthink-dev%2Fvastai-blade-mcp/lists"}