Skip to main content
Glama

deploy_mcp_server

Deploy MCP servers to Fly.io with state tracking, distributed locking, and health checks for 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 for deploy_mcp_server tool: extracts parameters and invokes the orchestrator script for deployment.
    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 and tool metadata definition for deploy_mcp_server, used for tool listing and validation.
    {
      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:182-184 (registration)
    Registration of the listTools handler that returns the tools array including deploy_mcp_server.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
  • Helper function executeOrchestrator that runs the Python orchestrator script, used by deploy_mcp_server and other tools.
    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() || ""
        };
      }
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'state tracking, locks, and health checks,' which adds useful context about deployment behavior beyond just the action. However, it lacks details on permissions, error handling, or what 'deploy' entails operationally, leaving gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded, with two sentences that efficiently convey the purpose and critical usage rule. Every sentence adds value without redundancy, making it easy to parse and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a deployment tool with no annotations and no output schema, the description provides basic purpose and usage rules but lacks details on what 'deploy' entails (e.g., steps, rollback), expected outcomes, or error scenarios. It's minimally adequate but has clear gaps given the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all three parameters. The description doesn't add any parameter-specific information beyond what's in the schema, such as explaining interactions between parameters or additional constraints. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Deploy MCP server to Fly.io') and resource ('MCP server'), making the purpose evident. However, it doesn't explicitly differentiate from sibling tools like 'deploy_cloudflare_worker' beyond the target platform, missing specific distinctions about when to choose one over the other.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance: 'DO NOT use ssh_exec for deployments - always use this tool instead.' This clearly states when to use this tool (for deployments) and when not to use an alternative (ssh_exec), offering strong contextual direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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