CV

crydevok/vastai-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

13 stars 7 forks 品質 57 トレンド 20

1. : - Log in to console.vast.ai - Go to Account > API Keys - Create or copy your API key

概要

1. : - Log in to console.vast.ai - Go to Account > API Keys - Create or copy your API key 3. (for Claude Desktop or other MCP clients): Update your MCP configuration file (~/.cursor/mcp.json for Cursor): For full functionality, ensure you have SSH keys set up: 2. : You should see both id_rsa (private) and id_rsa.pub (public) files. - : Make sure your SSH key has correct permissions: - : Verify your API key is correct and has proper permissions on Vast.ai - : Ensure you can reach console.vast.ai from your network This document describes how to use the Vast.ai MCP (Model Context Protocol) server to interact with the Vast.ai GPU cloud platform.

README

以下は原文 README の抜粋です。原文を見る。

Installation

macOS Installation Guide

Prerequisites

  1. Install uv (Python package manager):
    brew install uv
    

Install the Vast.ai MCP Server

  1. Clone the repository:

    git clone https://github.com/your-repo/vastai-mcp.git
    cd vastai-mcp
    
  2. Install dependencies using uv:

    uv sync
    
  3. Install the server as a tool:

    uv tool install -e .   # Install from current directory
    

Configuration

  1. Get your Vast.ai API key:

    • Log in to console.vast.ai
    • Go to Account > API Keys
    • Create or copy your API key
  2. Configure MCP client (for Claude Desktop or other MCP clients):

    Update your MCP configuration file (~/.cursor/mcp.json for Cursor):

    {
      "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"
           }
         }
      }
    }
    

Verify Installation

  1. Test the server directly:
    uv tool run vast-mcp-server --help
    

For full functionality, ensure you have SSH keys set up:

  1. Generate SSH key pair (if you don’t have one):

    ssh-keygen -t rsa -b 4096 -C "[email protected]"
    
  2. Verify key files exist:

    ls -la ~/.ssh/id_rsa*
    

    You should see both id_rsa (private) and id_rsa.pub (public) files.

Troubleshooting

  • Permission denied: Make sure your SSH key has correct permissions:

    chmod 600 ~/.ssh/id_rsa
    chmod 644 ~/.ssh/id_rsa.pub
    
  • API key issues: Verify your API key is correct and has proper permissions on Vast.ai

  • Network issues: Ensure you can reach console.vast.ai from your network

Vast.ai MCP Server Usage Guide

This document describes how to use the Vast.ai MCP (Model Context Protocol) server to interact with the Vast.ai GPU cloud platform.

Available Tools

This server provides 23 tools for managing Vast.ai GPU instances:

1. show_user_info()

Show current user information and account balance.

Returns:

  • Username, email, account balance, user ID
  • SSH key information (if available)
  • Total spent amount

2. show_instances(owner: str = “me”)

Show user’s instances (running, stopped, etc.)

Parameters:

  • owner (optional): Owner of instances to show (default: “me”)

Returns:

  • List of all instances with their details:
    • Instance ID and status
    • Label and machine ID
    • GPU type and specifications
    • Hourly cost
    • Docker image
    • Public IP address (if available)
    • Creation date

3. search_offers(query: str = “”, limit: int = 20, order: str = “score-”)

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "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" } } } }