
crydevok/vastai-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
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
- Install uv (Python package manager):
brew install uv
Install the Vast.ai MCP Server
-
Clone the repository:
git clone https://github.com/your-repo/vastai-mcp.git cd vastai-mcp -
Install dependencies using uv:
uv sync -
Install the server as a tool:
uv tool install -e . # Install from current directory
Configuration
-
Get your Vast.ai API key:
- Log in to console.vast.ai
- Go to Account > API Keys
- Create or copy your API key
-
Configure MCP client (for Claude Desktop or other MCP clients):
Update your MCP configuration file (
~/.cursor/mcp.jsonfor 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
- Test the server directly:
uv tool run vast-mcp-server --help
SSH Key Setup (Recommended)
For full functionality, ensure you have SSH keys set up:
-
Generate SSH key pair (if you don’t have one):
ssh-keygen -t rsa -b 4096 -C "[email protected]" -
Verify key files exist:
ls -la ~/.ssh/id_rsa*You should see both
id_rsa(private) andid_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.aifrom 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-”)
インストール
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"
}
}
}
}