fly-io — Claude Code MCP server: what it does, how to install
This MCP server lets an agent operate Fly.io apps and machines, inspect logs, and manage Docker images. It fits deployment and troubleshooting workflows.
claude mcp add --env FLY_IO_API_TOKEN=<FLY_IO_API_TOKEN> --env FLY_IO_APP_NAME=<FLY_IO_APP_NAME> --env ENABLED_TOOLGROUPS=<ENABLED_TOOLGROUPS> --env SKIP_HEALTH_CHECKS=<SKIP_HEALTH_CHECKS> --env DISABLE_DOCKER_CLI_TOOLS=<DISABLE_DOCKER_CLI_TOOLS> --transport stdio fly-io -- npx -y fly-io-mcp-serverWhat fly-io does
fly-io exposes tools for working with Fly.io applications and machines. An agent can list or inspect resources, create and update them, control machine state, wait for transitions, and remove apps or machines. It can also fetch machine events, retrieve application logs with region or machine filters, and run commands on active machines.
The server covers Docker image inspection, release listing, image updates, and transfers through the Fly.io registry. ENABLED_TOOLGROUPS controls permission and feature groups, while FLY_IO_APP_NAME scopes machine actions to one app. Authentication uses FLY_IO_API_TOKEN. The fly CLI must be installed, so that dependency is a hard prerequisite for running the server.
What it helps with
- create a Fly.io application
- start, stop, or restart a machine
- inspect machine events and application logs
- update the Docker image used by an app
- restrict operations to one application
Example prompts for the agent
- List the Fly.io applications and show the machines for
my-app. - Inspect events for machine
machine-id, then restart that machine. - Fetch application logs filtered by region and machine, and show the current Docker image.
How to install fly-io
Platform CLI
claude mcp add --env FLY_IO_API_TOKEN=<FLY_IO_API_TOKEN> --env FLY_IO_APP_NAME=<FLY_IO_APP_NAME> --env ENABLED_TOOLGROUPS=<ENABLED_TOOLGROUPS> --env SKIP_HEALTH_CHECKS=<SKIP_HEALTH_CHECKS> --env DISABLE_DOCKER_CLI_TOOLS=<DISABLE_DOCKER_CLI_TOOLS> --transport stdio fly-io -- npx -y fly-io-mcp-serverReplace <…> with your own values
Platform CLI
codex mcp add fly-io --env FLY_IO_API_TOKEN=<FLY_IO_API_TOKEN> --env FLY_IO_APP_NAME=<FLY_IO_APP_NAME> --env ENABLED_TOOLGROUPS=<ENABLED_TOOLGROUPS> --env SKIP_HEALTH_CHECKS=<SKIP_HEALTH_CHECKS> --env DISABLE_DOCKER_CLI_TOOLS=<DISABLE_DOCKER_CLI_TOOLS> -- npx -y fly-io-mcp-serverReplace <…> with your own values
Config file
{
"mcpServers": {
"fly-io": {
"command": "npx",
"args": [
"-y",
"fly-io-mcp-server"
],
"env": {
"FLY_IO_API_TOKEN": "<FLY_IO_API_TOKEN>",
"FLY_IO_APP_NAME": "<FLY_IO_APP_NAME>",
"ENABLED_TOOLGROUPS": "<ENABLED_TOOLGROUPS>",
"SKIP_HEALTH_CHECKS": "<SKIP_HEALTH_CHECKS>",
"DISABLE_DOCKER_CLI_TOOLS": "<DISABLE_DOCKER_CLI_TOOLS>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"fly-io": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"fly-io-mcp-server"
],
"env": {
"FLY_IO_API_TOKEN": "<FLY_IO_API_TOKEN>",
"FLY_IO_APP_NAME": "<FLY_IO_APP_NAME>",
"ENABLED_TOOLGROUPS": "<ENABLED_TOOLGROUPS>",
"SKIP_HEALTH_CHECKS": "<SKIP_HEALTH_CHECKS>",
"DISABLE_DOCKER_CLI_TOOLS": "<DISABLE_DOCKER_CLI_TOOLS>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e FLY_IO_API_TOKEN=<FLY_IO_API_TOKEN> -e FLY_IO_APP_NAME=<FLY_IO_APP_NAME> -e ENABLED_TOOLGROUPS=<ENABLED_TOOLGROUPS> -e SKIP_HEALTH_CHECKS=<SKIP_HEALTH_CHECKS> -e DISABLE_DOCKER_CLI_TOOLS=<DISABLE_DOCKER_CLI_TOOLS> fly-io npx -y fly-io-mcp-serverReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about fly-io
How do I install fly-io in Claude Code?
Run claude mcp add fly-io -e FLY_IO_API_TOKEN=<FLY_IO_API_TOKEN> -- npx -y fly-io-mcp-server. The Fly.io API token is supplied through the environment variable.
What does fly-io do?
It gives an agent MCP tools for Fly.io apps and machines, logs, Docker images, and the Fly.io registry. The tools cover resource changes, machine state control, diagnostics, and remote commands.
How can I limit fly-io to one app and reduce its permissions?
Set FLY_IO_APP_NAME to scope machine operations to that application. Use ENABLED_TOOLGROUPS="readonly" for read-only access, or ENABLED_TOOLGROUPS="readonly,write" to exclude administrative actions such as deletion.