1
API-Coverage
Prophet731 edited this page 2026-03-16 00:33:57 -04:00

API Coverage

The VirtFusion MCP server currently covers all 84 endpoints defined in the VirtFusion Admin API OpenAPI specification. This page documents the coverage status and the tooling used to track it.

Coverage Summary

API Tag Endpoints MCP Module Tools
General 1 general.ts 1
Servers 18 servers.ts 18
Servers/Power 4 servers-power.ts 4
Servers/Network 5 servers-network.ts 5
Servers/Network/Firewall 4 servers-firewall.ts 4
Servers/Network/Traffic 4 servers-traffic.ts 4
Hypervisors 2 hypervisors.ts 2
Hypervisor Groups 3 hypervisor-groups.ts 3
IP Blocks 3 ip-blocks.ts 3
Packages 2 packages.ts 2
Queue & Tasks 1 queue.ts 1
Backups 1 backups.ts 1
DNS 1 dns.ts 1
Media 2 media.ts 2
SSH Keys 4 ssh-keys.ts 4
Users / External Rel ID 7 users.ts 7
Self Service / External Relational ID 19 self-service.ts 19
Total 84 17 modules 84

Endpoint Manifest

The file endpoint-manifest.json in the repository root contains a machine-readable list of all 84 endpoints extracted from openapi.yaml. Each entry includes:

{
  "method": "POST",
  "path": "/servers/{serverId}/build",
  "summary": "Build a server",
  "tag": "Servers"
}

Drift Detection

Two mechanisms keep the MCP server in sync with the VirtFusion API:

Manual Check

npm run check-endpoint-drift

This script:

  1. Parses the current openapi.yaml to extract all endpoints
  2. Loads endpoint-manifest.json as the known baseline
  3. Compares the two sets by METHOD path key
  4. Reports any new or removed endpoints
  5. Exits with code 0 if no drift, code 1 if drift detected

Automated CI Check

The endpoint-sync Gitea Actions workflow runs:

  • Weekly on a cron schedule
  • On any push that modifies openapi.yaml

If drift is detected, it automatically creates a Gitea issue with the details of new/removed endpoints.

Updating When VirtFusion Adds New Endpoints

  1. Download the updated openapi.yaml from VirtFusion documentation
  2. Replace the existing openapi.yaml in the repo root
  3. Run drift detection to see what changed:
    npm run check-endpoint-drift
    
  4. Implement new tools in the appropriate src/tools/*.ts module (see Contributing)
  5. Update the manifest:
    npm run extract-endpoints > endpoint-manifest.json
    
  6. Update the tool count in README.md
  7. Commit all changes together

OpenAPI Specification

The full VirtFusion Admin API specification is stored at openapi.yaml in the repository root. This file is the source of truth for endpoint extraction. The extraction script (scripts/extract-endpoints.ts) parses it using the yaml package and outputs sorted JSON.

Not Yet Implemented

As of v1.0.1, there are no unimplemented endpoints -- all 84 endpoints in the OpenAPI spec have corresponding MCP tools. Future VirtFusion API releases may introduce new endpoints, which will be caught by the drift detection system.

For a detailed per-tool reference, see Tool-Reference.