SCALE API Helper MCP

SCALE API Helper MCP

Enables secure VM lifecycle management on SCALE HyperCore clusters, including snapshot, clone, export, and state changes, through a Bearer-authenticated FastAPI proxy and MCP tools.

Category
Visit Server

README

SCALE API Helper + MCP

A secure, LLM-ready bridge between your local AI environment and the SCALE Computing HyperCore REST API. Exposes VM management operations as authenticated FastAPI routes and MCP tools — usable from OpenWebUI, Claude Desktop, or cURL.

Built to go beyond API exploration: this is a functional operator tool for taking real actions against a SCALE HyperCore cluster.

Tested against SCALE HyperCore v9.4.30.217736 & v9.6.19.223352


Features

  • FastAPI proxy server with Bearer Auth securing all routes
  • MCP tool integration for OpenWebUI and Claude Desktop
  • Session-based auth against SCALE HyperCore (stored locally in .p file)
  • VM lifecycle management: snapshot, clone, export, state changes
  • Swagger UI at /docs with full OpenAPI schema
  • RAG-compatible schema querying for LLM-assisted API exploration

File Overview

File Purpose
03_mcpserver_agent+auth.py Route definitions, Bearer auth, OpenAPI schema, MCP forwarding
scale_tools.py All SCALE API logic: session lifecycle, VM operations, query forwarding
models.py Pydantic models for use with Swagger UI
config_alt.py Bearer token and cluster host configuration
scale_api_full_schema.json Full HyperCore OpenAPI schema (used for RAG/exploration)
api_schema.db SQLite schema store for LLM-aided endpoint discovery
01_*.py / 02_*.py / 03_flaskapi.py / 03_llmRAG.py Setup and exploration scripts

Requirements

  • Python 3.10+
  • MCP runtime via uvx mcpo
  • Dependencies: fastapi, httpx, pydantic, uvicorn
  • any OpenAI API Compat. Server — tested with nvidia/NVIDIA-Nemotron-3-Nano-4B-FP8 on vLLM (0.18.1)

Setup

1. Clone & Install

git clone https://github.com/Nels2/SCALE-API-Helper-MCP
cd SCALE-API-Helper-MCP
uv pip install -r requirements.txt

2. Configure

Edit config_alt.py:

MCP_BEARER_TOKEN = "your-secret-token"
SCALE_HOST = "your-cluster-ip"

3. Run

uvx mcpo --port 5075 -- uvicorn 03_mcpserver_agent+auth:app --host 0.0.0.0 --port 5075

Optionally, add --reload if you plan to make changes and dont wan't to kill the server.

Swagger UI: http://localhost:5075/docs


MCP Usage

OpenWebUI

uvx mcpo --port 5075 -- uv run fastapi_server.py

Add connection in OpenWebUI:

URL:  http://<your-ip>:5075/openapi.json
Auth: Bearer <your-token>

Note: After adding new tools to the MCP server, restart the server process and reconnect in OpenWebUI — tool lists are cached at connection time.

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "scale-agent": {
      "url": "http://<your-ip>:5075",
      "headers": {
        "Authorization": "Bearer <your-token>"
      }
    }
  }
}

Available Tools

Session Management

Tool Description
generate_session Authenticate against SCALE and store session
get_session Retrieve current session info (validates 12hr window)
kill_session Invalidate active session

Read Operations

Tool Description
ping_read Check connectivity and session validity
cluster_read Retrieve cluster node information
clusterSpec_read Retrieve cluster spec/configuration
condition_read List all active conditions/alerts
user_read List all users on the system
iso_read List all ISOs
drive_read List all physical drives
virtualDisk_read List all virtual disks
vmNetDevices_read List all virtual network devices
vmSnapshots_read List all VM snapshots
taskTagStatus_read List all task/status tags
taskTagStatusFilter Get status for a specific task tag by ID

VM Operations

Tool Description
fetch_vm Search VMs by name or user (via NMAPX Dash)
getVM_details Fetch full VM configuration by UUID
getVM_sysStats Retrieve live CPU, memory, disk, and network stats
changeVM_state Take action on a VM: START, SHUTDOWN, STOP, PAUSE, REBOOT, RESET, LIVEMIGRATE, NMI
snapshotVM Take a named snapshot of a VM
delete_snapshotVM Delete a snapshot by UUID
cloneVM Clone a VM
exportVM Export a VM to the configured SMB archive target

Raw Access

Tool Description
run_api Direct proxy call — any endpoint, method, and payload
query_api Search the local schema DB for matching endpoints

Architecture

OpenWebUI / Claude Desktop
        │
        ▼
  fastapi_server.py  ←── Bearer Auth
        │
        ▼
  scale_tools.py  ←── Session (.p file)
        │
        ▼
  SCALE HyperCore REST API

Notes

  • This is a personal developer tool but it IS technically production-hardened since it is secured by Bearer Auth.
  • The SCALE API uses session cookies, not per-request tokens; the .p file persists this between calls, it is only valid based on the SCALE Permissions, but the script sets a hard time of 12 hours to auto refresh token.
  • run_api gives you a raw escape hatch for any endpoint not yet wrapped as a named tool... but your model has to be smart enough to handle embedded JSON within JSON.

License

MIT. Use and adapt freely.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured