deploy_mcp_server
Deploy MCP servers to Fly.io with state tracking, distributed locks, and health checks to ensure reliable infrastructure orchestration.
Instructions
Deploy MCP server to Fly.io with state tracking, locks, and health checks. DO NOT use ssh_exec for deployments - always use this tool instead.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_name | Yes | Fly.io app name (e.g., 'garza-home-mcp') | |
| source_dir | No | Source directory containing the MCP server code | |
| region | No | Fly.io region (default: dfw) |
Implementation Reference
- src/index.ts:194-207 (handler)Handler implementation for the deploy_mcp_server tool. Parses input arguments and executes the orchestrator.py script with the 'deploy/mcp-server' operation.case "deploy_mcp_server": { const { app_name, source_dir, region } = args as { app_name: string; source_dir?: string; region?: string; }; result = executeOrchestrator("deploy/mcp-server", { app_name, source_dir: source_dir || `/Users/customer/${app_name}`, region: region || "dfw" }); break; }
- src/index.ts:50-67 (schema)Input schema for the deploy_mcp_server tool, defining required app_name and optional source_dir, region parameters.inputSchema: { type: "object", properties: { app_name: { type: "string", description: "Fly.io app name (e.g., 'garza-home-mcp')" }, source_dir: { type: "string", description: "Source directory containing the MCP server code" }, region: { type: "string", description: "Fly.io region (default: dfw)" } }, required: ["app_name"] }
- src/index.ts:47-68 (registration)Tool registration object added to the tools array, which is returned by the ListToolsRequestSchema handler.{ name: "deploy_mcp_server", description: "Deploy MCP server to Fly.io with state tracking, locks, and health checks. DO NOT use ssh_exec for deployments - always use this tool instead.", inputSchema: { type: "object", properties: { app_name: { type: "string", description: "Fly.io app name (e.g., 'garza-home-mcp')" }, source_dir: { type: "string", description: "Source directory containing the MCP server code" }, region: { type: "string", description: "Fly.io region (default: dfw)" } }, required: ["app_name"] } },
- src/index.ts:16-43 (helper)Shared helper function that executes the Python orchestrator.py script for deployment operations, used by the deploy_mcp_server handler.function executeOrchestrator(operation: string, params: Record<string, string> = {}): any { const paramStr = Object.entries(params) .map(([key, value]) => `${key}="${value}"`) .join(" "); const cmd = `cd ${ORCHESTRATOR_PATH} && python orchestrator.py ${operation} ${paramStr}`; try { const output = execSync(cmd, { encoding: "utf-8", maxBuffer: 10 * 1024 * 1024 }); // Try to parse as JSON, fallback to plain text try { return JSON.parse(output); } catch { return { output: output.trim() }; } } catch (error: any) { return { success: false, error: error.message, stderr: error.stderr?.toString() || "", stdout: error.stdout?.toString() || "" }; } }