MCP Servers

模型上下文协议服务器、框架、SDK 和模板的综合目录。

GPU Cloud Provisioning for Claude Code

创建于 2/25/2026
更新于 about 4 hours ago
Repository documentation and setup instructions

Terradev MCP Server v1.1.0

GPU Cloud Provisioning for Claude Code - Terraform-powered parallel GPU provisioning across 11+ cloud providers.

🚀 What's New in v1.1.0

  • Terraform Core Engine: All GPU provisioning now uses Terraform for optimal parallel efficiency
  • Infrastructure as Code: State management and reproducible deployments
  • Bug Fixes Applied: Fixed proxy settings, dependency issues, and API compatibility
  • Enhanced Tools: Added terraform_plan, terraform_apply, terraform_destroy for full IaC control

Architecture

Terraform is the fundamental engine - not just a feature. This provides:

  • True Parallel Provisioning across multiple providers simultaneously
  • State Management for infrastructure tracking
  • Infrastructure as Code with reproducible deployments
  • Cost Optimization through provider arbitrage
  • Bug-Free Operation with all known issues resolved

Installation

Prerequisites

  1. Install Terradev CLI:
pip install terradev-cli
# For all providers + HF Spaces:
pip install "terradev-cli[all]"
  1. Set up minimum credentials (RunPod only):
export TERRADEV_RUNPOD_KEY=your_runpod_api_key
  1. Install the MCP server:
npm install -g terradev-mcp

Claude Code Setup

Add to your Claude Code MCP configuration:

{
  "mcpServers": {
    "terradev": {
      "command": "terradev-mcp"
    }
  }
}

Available MCP Tools

The Terradev MCP server provides 17 tools for complete GPU cloud management:

GPU Operations

  • quote_gpu - Get real-time GPU prices across all cloud providers
  • provision_gpu - Terraform-powered GPU provisioning with parallel efficiency

Terraform Infrastructure Management

  • terraform_plan - Generate Terraform execution plans
  • terraform_apply - Apply Terraform configurations
  • terraform_destroy - Destroy Terraform-managed infrastructure

Kubernetes Management

  • k8s_create - Create Kubernetes clusters with GPU nodes
  • k8s_list - List all Kubernetes clusters
  • k8s_info - Get detailed cluster information
  • k8s_destroy - Destroy Kubernetes clusters

Inference & Model Deployment

  • inferx_deploy - Deploy models to InferX serverless platform
  • inferx_status - Check inference endpoint status
  • inferx_list - List deployed inference models
  • inferx_optimize - Get cost analysis for inference endpoints
  • hf_space_deploy - Deploy models to HuggingFace Spaces

Instance & Cost Management

  • status - View all instances and costs
  • manage_instance - Stop/start/terminate GPU instances
  • analytics - Get cost analytics and spending trends
  • optimize - Find cheaper alternatives for running instances

Provider Configuration

  • setup_provider - Get setup instructions for any cloud provider
  • configure_provider - Configure provider credentials locally

Complete Command Reference

GPU Price Quotes

# Get prices for specific GPU type
terradev quote -g H100

# Filter by specific providers
terradev quote -g A100 -p runpod,vastai,lambda

# Quick-provision cheapest option
terradev quote -g H100 --quick

GPU Provisioning (Terraform-Powered)

# Provision single GPU via Terraform
terradev provision -g A100

# Provision multiple GPUs in parallel across providers
terradev provision -g H100 -n 4 --providers ["runpod", "vastai", "lambda", "aws"]

# Plan without applying
terradev provision -g A100 -n 2 --plan-only

# Set maximum price ceiling
terradev provision -g A100 --max-price 2.50

# Terraform state is automatically managed

Terraform Infrastructure Management

# Generate execution plan
terraform plan -config-dir ./my-gpu-infrastructure

# Apply infrastructure
terraform apply -config-dir ./my-gpu-infrastructure -auto-approve

# Destroy infrastructure  
terraform destroy -config-dir ./my-gpu-infrastructure -auto-approve

Kubernetes Clusters

# Create multi-cloud K8s cluster
terradev k8s create my-cluster --gpu H100 --count 4 --multi-cloud --prefer-spot

# List all clusters
terradev k8s list

# Get cluster details
terradev k8s info my-cluster

# Destroy cluster
terradev k8s destroy my-cluster

Inference Deployment

# Deploy model to InferX
terradev inferx deploy --model meta-llama/Llama-2-7b-hf --gpu-type a10g

# Check endpoint status
terradev inferx status

# List deployed models
terradev inferx list

# Get cost analysis
terradev inferx optimize

HuggingFace Spaces

# Deploy LLM template
terradev hf-space my-llama --model-id meta-llama/Llama-2-7b-hf --template llm

# Deploy with custom hardware
terradev hf-space my-model --model-id microsoft/DialoGPT-medium --hardware a10g-large --sdk gradio

# Deploy embedding model
terradev hf-space my-embeddings --model-id sentence-transformers/all-MiniLM-L6-v2 --template embedding

Instance Management

# View all running instances and costs
terradev status --live

# Stop instance
terradev manage -i <instance-id> -a stop

# Start instance
terradev manage -i <instance-id> -a start

# Terminate instance
terradev manage -i <instance-id> -a terminate

Analytics & Optimization

# Get 30-day cost analytics
terradev analytics --days 30

# Find cheaper alternatives
terradev optimize

Provider Setup

# Get quick setup instructions
terradev setup runpod --quick
terradev setup aws --quick
terradev setup vastai --quick

# Configure credentials (stored locally)
terradev configure --provider runpod
terradev configure --provider aws
terradev configure --provider vastai

Supported GPU Types

  • H100 - NVIDIA H100 80GB (premium training)
  • A100 - NVIDIA A100 80GB (training/inference)
  • A10G - NVIDIA A10G 24GB (inference)
  • L40S - NVIDIA L40S 48GB (rendering/inference)
  • L4 - NVIDIA L4 24GB (inference)
  • T4 - NVIDIA T4 16GB (light inference)
  • RTX4090 - NVIDIA RTX 4090 24GB (consumer)
  • RTX3090 - NVIDIA RTX 3090 24GB (consumer)
  • V100 - NVIDIA V100 32GB (legacy)

Bug Fixes Applied

This release includes fixes for all known production issues:

| Bug | Fix | Impact | |-----|-----|---------| | Wrong import path (terradev_cli.providers) | Changed to providers.provider_factory | ✅ API calls now work | | list builtin shadowed by Click command | Used type([]) instead of isinstance(r, list) | ✅ No more crashes | | aiohttp.ClientSession(trust_env=False) | Set trust_env=True for proxy support | ✅ Proxy environments work | | boto3 not in dependencies | Added boto3>=1.26.0 to requirements | ✅ AWS provider functional | | Vast.ai GPU name filter exact match | Switched to client-side filtering with "in" | ✅ Vast.ai provider works |

All bugs are now resolved in v1.1.0

Terraform Integration

The MCP now includes a terraform.tf template for custom infrastructure:

terraform {
  required_providers {
    terradev = {
      source  = "theoddden/terradev"
      version = "~> 3.0"
    }
  }
}

resource "terradev_instance" "gpu" {
  gpu_type = var.gpu_type
  spot     = true
  count    = var.gpu_count
  
  tags = {
    Name        = "terradev-mcp-gpu"
    Provisioned = "terraform"
    GPU_Type    = var.gpu_type
  }
}

Supported Cloud Providers

RunPod, Vast.ai, AWS, GCP, Azure, Lambda Labs, CoreWeave, TensorDock, Oracle Cloud, Crusoe Cloud, DigitalOcean, HyperStack

Environment Variables

Minimum setup:

  • TERRADEV_RUNPOD_KEY: RunPod API key

Full multi-cloud setup:

  • TERRADEV_AWS_ACCESS_KEY_ID, TERRADEV_AWS_SECRET_ACCESS_KEY, TERRADEV_AWS_DEFAULT_REGION
  • TERRADEV_GCP_PROJECT_ID, TERRADEV_GCP_CREDENTIALS_PATH
  • TERRADEV_AZURE_SUBSCRIPTION_ID, TERRADEV_AZURE_CLIENT_ID, TERRADEV_AZURE_CLIENT_SECRET, TERRADEV_AZURE_TENANT_ID
  • Additional provider keys (VastAI, Oracle, Lambda, CoreWeave, Crusoe, TensorDock)
  • HF_TOKEN: For HuggingFace Spaces deployment

Security

BYOAPI: All API keys stay on your machine. Terradev never proxies credentials through third parties.

Links

快速设置
此服务器的安装指南

安装包 (如果需要)

uvx terradev-mcp

Cursor 配置 (mcp.json)

{ "mcpServers": { "theoddden-terradev-mcp": { "command": "uvx", "args": [ "terradev-mcp" ] } } }