Skip to main content
Glama

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
NameRequiredDescriptionDefault
app_nameYesFly.io app name (e.g., 'garza-home-mcp')
source_dirNoSource directory containing the MCP server code
regionNoFly.io region (default: dfw)

Implementation Reference

  • 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; }
  • 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"] } },
  • 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() || "" }; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/itsablabla/lastrock-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server