VPS_getProjectListV1
Lists all Docker Compose projects deployed on a VPS, including project names, statuses, file paths, and container information. Use this to get an overview of your Docker projects.
Instructions
Retrieves a list of all Docker Compose projects currently deployed on the virtual machine.
This endpoint returns basic information about each project including name,
status, file path and list of containers with details about their names,
image, status, health and ports. Container stats are omitted in this
endpoint. If you need to get detailed information about container with
stats included, use the Get project containers endpoint.
Use this to get an overview of all Docker projects on your VPS instance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| virtualMachineId | Yes | Virtual Machine ID |
Implementation Reference
- src/core/tools/vps.ts:117-140 (schema)Tool definition/schema for VPS_getProjectListV1: name, description, method (GET), path (/api/vps/v1/virtual-machines/{virtualMachineId}/docker), inputSchema with virtualMachineId parameter, and security configuration.
{ "name": "VPS_getProjectListV1", "description": "Retrieves a list of all Docker Compose projects currently deployed on the virtual machine. \n\nThis endpoint returns basic information about each project including name,\nstatus, file path and list of containers with details about their names,\nimage, status, health and ports. Container stats are omitted in this\nendpoint. If you need to get detailed information about container with\nstats included, use the `Get project containers` endpoint.\n\nUse this to get an overview of all Docker projects on your VPS instance.", "method": "GET", "path": "/api/vps/v1/virtual-machines/{virtualMachineId}/docker", "inputSchema": { "type": "object", "properties": { "virtualMachineId": { "type": "integer", "description": "Virtual Machine ID" } }, "required": [ "virtualMachineId" ] }, "security": [ { "apiToken": [] } ], "group": "vps" }, - src/core/tools/vps.ts:1827-1828 (registration)The tool is registered (exported) as part of the tools array in the vps module, which is imported by the server entry point.
export default tools; - src/core/runtime.ts:1909-1966 (handler)The executeApiCall method handles VPS_getProjectListV1 at runtime. Since this tool has no 'custom' flag, it goes through executeApiCall which makes a GET request with path parameters substituted from input params (virtualMachineId) and remaining params sent as query string.
private async executeApiCall(tool: OpenApiTool, params: Record<string, any>): Promise<any> { // Get method and path from tool const method = tool.method; let path = tool.path; // Clone params to avoid modifying the original const requestParams = { ...params }; // Replace path parameters with values from params Object.entries(requestParams).forEach(([key, value]) => { const placeholder = `{${key}}`; if (path.includes(placeholder)) { path = path.replace(placeholder, encodeURIComponent(String(value))); delete requestParams[key]; // Remove used parameter } }); // Build the full URL const baseUrl = this.baseUrl.endsWith("/") ? this.baseUrl : `${this.baseUrl}/`; const cleanPath = path.startsWith("/") ? path.slice(1) : path; const url = new URL(cleanPath, baseUrl).toString(); this.log('debug', `API Request: ${method} ${url}`); try { // Configure the request const config: AxiosRequestConfig = { method: method.toLowerCase(), url, headers: { ...this.headers }, timeout: 60000, // 60s validateStatus: function (status: number): boolean { return status < 500; // Resolve only if the status code is less than 500 } }; const bearerToken = process.env['API_TOKEN'] || process.env['APITOKEN']; // APITOKEN for backwards compatibility if (bearerToken && config.headers) { config.headers['Authorization'] = `Bearer ${bearerToken}`; } else { this.log('error', `Bearer Token environment variable not found: API_TOKEN`); } // Add parameters based on request method if (["GET", "DELETE"].includes(method)) { // For GET/DELETE, send params as query string config.params = { ...(config.params || {}), ...requestParams }; } else { // For POST/PUT/PATCH, send params as JSON body config.data = requestParams; if (config.headers) { config.headers["Content-Type"] = "application/json"; } } this.log('debug', "Request config:", { url: config.url, method: config.method, - src/servers/vps.ts:1-6 (registration)Entry point that imports the tools array from src/core/tools/vps.js and starts the MCP server with them.
#!/usr/bin/env node // Auto-generated entry for group: vps import { startServer } from '../core/runtime.js'; import tools from '../core/tools/vps.js'; startServer({ name: 'hostinger-vps-mcp', version: '0.1.41', tools });