One MCP
for all of Fly.

Bring Fly.io to your AI client. The tools and resources to build, run, and manage your apps and Sprites, right where you work.

# Add Fly MCP

# Sign in

# Check the connection

Setup

Connect your client

Choose your harness for setup instructions. Each connects to the same Fly MCP server using browser sign-in.

Which agent are you using?Pick one and follow the steps below.

Set up Claude Code

Claude Code

# Add Fly MCP

# Sign in

# Check the connection

  1. Add Fly MCP

    Add the HTTP server to your user configuration so it is available across projects.

  2. Sign in

    Complete the browser sign-in, select your organization, and review the access you are granting.

  3. Check the connection

    Check that the server is connected. In Claude Code, open /mcp to inspect its tools and manage the connection.

Official setup guide

Set up Codex

Codex

# Add Fly MCP

# Sign in

# Check the connection

  1. Add Fly MCP

  2. Sign in

    Complete the browser sign-in opened by Codex. If it does not open, start it with:

    Select your intended organization and review the requested access.

  3. Check the connection

    Confirm that fly-mcp is listed, then open /mcp in Codex to inspect the available tools.

Official setup guide

Set up Cursor

  1. Add the server configuration

    Add this server to ~/.cursor/mcp.json. Keep any existing servers in that file.

    mcp.json
    {
      "mcpServers": {
        "fly-mcp": {
          "url": "https://mcp.fly.io"
        }
      }
    }
  2. Sign in

    Open Cursor Settings, then Customize > MCPs. Find fly-mcp and follow its sign-in prompt. Complete browser consent for your intended organization.

  3. Use the tools in Agent

    Open Agent and check that Fly MCP tools are enabled. Start by asking for the Sprites you can access, and review tool approvals before making changes.

Official setup guide

Set up VS Code

VS Code

# Add an HTTP server

  1. Add an HTTP server

    Open the Command Palette and run MCP: Add Server. Choose HTTP, enter the URL below, name the server fly-mcp, and choose where to save its configuration.

  2. Start and authorize the server

    Run MCP: List Servers, select fly-mcp, and start it. Review the server trust prompt and complete browser sign-in and consent.

  3. Enable tools in Copilot

    Open Copilot Chat in Agent mode. Use Configure Tools to enable Fly MCP, then ask it to list the Sprites you can access.

Official setup guide

Set up Claude web & desktop

Claude web & desktop

# Enter the server URL

  1. Add a custom connector

    Open Connectors under Customize or Settings. Choose + Add, then Add custom connector, and name it Fly MCP. Use the Claude account where you want the connection available.

  2. Enter the server URL

    Continue with the detected OAuth settings. Choose Sign in now and leave custom request headers empty.

  3. Complete browser consent

    Add the connector and complete sign-in promptly. Select your intended organization and review its access restrictions. Check that the connector reports connected when you return to Claude.

  4. Enable it in your conversation

    Open the + menu in your chat, choose Connectors, and enable Fly MCP. Remote connectors work on both Claude web and desktop; no local Desktop JSON configuration is needed.

    Free accounts are limited to one custom connector. On Team and Enterprise plans, your organization may require an owner or authorized administrator to add the connector before you can connect.

Official setup guide

Set up Gemini CLI

Gemini CLI

# Add Fly MCP

# Sign in from Gemini

# Check the tools

  1. Add Fly MCP

  2. Sign in from Gemini

    Start Gemini CLI and run this command inside the session. Complete browser sign-in and consent for your organization.

  3. Check the tools

    Check the server connection and available tools. Review tool approvals when Gemini asks to use Fly MCP.

Official setup guide

Set up Antigravity CLI

Antigravity CLI

# Add Fly MCP

# Sign in from Antigravity

  1. Add Fly MCP

    HTTP servers are detected from the URL; no transport flag is needed.

  2. Sign in from Antigravity

    Start Antigravity CLI and open the MCP panel. Choose fly-mcp, then Authenticate, and complete browser sign-in and consent for your organization.

  3. Check the tools

    The same panel lists the server's tools once it is connected. Review tool approvals when Antigravity asks to use Fly MCP.

Official setup guide

Set up OpenCode 2

OpenCode 2

# Add Fly MCP

# Sign in

# Check the connection

  1. Add Fly MCP

    These commands are for OpenCode 2.

    Setup for OpenCode 1.x

  2. Sign in

    Complete the browser sign-in, choose your organization, and review the requested access.

  3. Check the connection

    Check the connection status, then ask OpenCode to list the Sprites you can access.

Official setup guide

Set up Other clients

Other clients

# Add a remote HTTP server

  1. Add a remote HTTP server

    Choose your client's remote HTTP or Streamable HTTP MCP connection and enter this URL.

  2. Complete OAuth sign-in

    Use automatic OAuth discovery and your client's browser sign-in flow. Choose the intended organization and review consent. No custom authorization header or pasted API token is needed.

  3. Check the available tools

    Confirm that the server connects and its tools appear. Start with listing authorized Sprites, and review your client's tool approval settings before making changes.

Official setup guide

Choose your access

Sign in through https://fly.io and choose the organizations, existing Fly apps, and Sprites permissions to authorize in one consent screen. The same connection uses both sets of tools. Your client handles OAuth; you do not need to paste an API token.

Try your first tool

Once connected, try this read-only prompt. Check the organization in the result before asking your client to make changes.

Prompt

List the Sprites I can access and show the organization name. Do not create, change, or delete anything.

Sprites

Work with Sprites

Sprites provide persistent environments with files, commands, services, checkpoints, and network policies.

  • Find authorized Sprites, inspect their metadata, and open the Sprite Inspector in clients that support the MCP Apps UI extension.
  • Create and remove Sprites within your grant's restrictions.
  • Read and write files, run non-interactive commands, and inspect or stop exec sessions.
  • Inspect and manage services, checkpoints, and network policies.

The tool reference below comes from the server's tool definitions. Your grant and the selected Sprite determine which calls are permitted. A listed tool is not permission to use it.

First prompts

Start with a small workflow

Try these prompts with your AI client. Replace the example name with a Sprite permitted by your grant.

Get your bearings

Prompt

List the Sprites I can access. Show metadata for the one I select, without waking it or changing anything.

Try a disposable environment

Prompt

Create mcp-demo, write a greeting to /tmp/hello.txt, and read it back. Show me the result, then ask before deleting the disposable Sprite.

Investigate a service

Prompt

Show metadata for my selected Sprite first. Before reading its runtime state or logs, tell me that this may wake it. Summarize what you find and ask before changing a service or restoring a checkpoint.

Access

Choose the scope of access

Authorize only the organizations, products, and operations you need. New tools appearing in the catalogue do not expand your grant. Client tool approvals are an additional control.

Current Sprites permissions

Sprites consent ties this connection to an organization and its backing Sprites token. Use the smallest access you need, including the name prefix and Sprite limit available on the consent screen.

  • Check the selected organization and Sprite before writing files, running commands, or making service and network changes.
  • Deleting a Sprite or file and restoring a checkpoint can discard work. Review the target and intended change before approving those calls.
  • To end access, disconnect the client and revoke its backing Sprites token. Revocation prevents further use of that token, including OAuth refresh.

This guide is public. Reading it does not grant access to Fly resources or authorize a tool call.

Troubleshooting

Diagnose without surprises

Start with Sprite metadata

get_sprite_info reads authorized metadata without waking the Sprite. Opening the Sprite Inspector starts with metadata too. Reading selected runtime state, services, logs, or files may wake a Sprite; request those reads deliberately.

Use the current Sprite identity returned by selection or discovery. If a Sprite was deleted and recreated under the same name, select it again instead of reusing its old ID.

If a connection or call fails

  • Cannot connect: check that your account and organization have access and that the URL is https://mcp.fly.io.
  • Authentication failed: your client should refresh expiring access automatically. If sign-in still fails or access was revoked, reconnect through consent instead of copying an old token.
  • Permission denied or a Sprite is missing: check the consented organization, name prefix, limits, and current Sprite identity. Repeated retries do not expand a grant.
  • Backend unavailable: retry a read after service recovers. If a write timed out, inspect its result before repeating it; the first operation may have completed.

When reporting a problem, include your client version, the operation, and the visible error. Keep tokens, authorization codes, and private file contents out of the report.

Send feedback to Fly.io

submit_feedback sends a report straight to the Fly.io team. Use it when Fly.io itself misbehaves, when documentation or a tool description disagrees with what happened, or when something the user needs is not possible. Do not use it for errors in the user's own application.

We read every report, but we don't reply to them. If the user needs help with their apps, account or billing, send them to https://docs.fly.io/about/support. Don't tell them they've contacted support.

Tool results carry a request ID in _meta under io.fly/request_id, and JSON-RPC errors carry it in error.data. Pass it as request_id so the team can find the exact call; otherwise name the tool or a documentation url. Describe what you tried, what happened and what you expected, and keep secrets, tokens, credentials and customer data out of the note.

Reference

Tool reference

The reference includes Fly apps, Machines, volumes, secrets, Managed Postgres, and Sprites. Names and descriptions come directly from their tool definitions. Ask your client for the current tool schema before constructing arguments.

The same authorization can enable Sprites tools, direct operations on existing Fly apps, Machines, volumes, and app secrets, and Managed Postgres in the organizations you select. IP addresses and certificates are read-only. Managed Postgres tools never delete anything, change users or passwords, or return passwords. Deployment workflows, app creation, other product provisioning, and organization administration are not included.

Account and context

Account and context5 tools
get_fly_contextRead-only
Show this connection's current authorized resource bindings, per-resource scopes, and restrictions, including the Sprites name_prefix and max_sprites_total creation limit. This describes the grant and never expands access.
list_organizationsRead-only
List current organization identities and roles under explicitly granted account-directory access. This does not authorize their resources.
get_organizationRead-only
Read the selected organization's identity, current role and launch eligibility.
get_launch_requirementsRead-only
Explain launch blockers and return browser handoffs for billing, SSO or provider terms. Does not accept terms or alter payment settings.
get_credit_balanceRead-only
Read the selected organization's purchased credit balance in US cents, the Purchased Credit Balance on its billing page. Trial credits and other grants are not included. For an organization billed through a parent organization, purchased_credit_balance_cents is null and billed_by_parent is true. Does not buy credits or alter payment settings.
Feedback1 tool
submit_feedbackMakes changes
Send the Fly.io team a report about a Fly.io platform bug, a documentation problem or a missing feature you hit while working. Cite what it is about with request_id, url or tool. Reporting the same request_id again returns the original report. Fly.io staff read every report but don't reply to them. If the user needs help with their apps, account or billing, send them to https://docs.fly.io/about/support and don't tell them they've contacted support. Do not report errors in the user's own application, and never include secrets, tokens, credentials or customer data.

Fly apps and resources

Apps3 tools
list_appsRead-only
List app identity, organization, status, and counts.
get_appRead-only
Read an app's identity, organization, status, and counts.
delete_appMakes changes
Permanently delete the app. This can disrupt or delete its resources; inspect the app first. Requires explicit fly:apps:delete authorization.
Machines28 tools
list_machinesRead-only
List Machine identity and lifecycle summaries for an app. Excludes configuration and secrets.
get_machineRead-only
Read a Machine's identity and lifecycle summary. Excludes configuration and secrets.
get_machine_configurationRead-only
Read the full Machine configuration under explicit authorization. Configuration can contain sensitive environment, file and metadata values. Requires explicit fly:machines:sensitive:read authorization.
create_machineMakes changes
Create a billable Machine from explicit configuration. It starts unless skip_launch is set. If the response is lost, inspect existing Machines before retrying; mutations are not automatically retried. Requires explicit fly:machines:write authorization.
delete_machineMakes changes
Permanently destroy the Machine and its ephemeral root filesystem. Attached volumes are separate resources. force is never enabled implicitly. Requires explicit fly:machines:delete authorization.
start_machineMakes changes
Start a stopped or suspended Machine using its existing configuration. Use wait_for_machine_state with state started to wait for startup. Requires explicit fly:machines:write authorization.
stop_machineMakes changes
Stop running work on the Machine. Existing auto_destroy configuration still applies. Requires explicit fly:machines:write authorization.
restart_machineMakes changes
Restart the Machine and interrupt its running work. Requires explicit fly:machines:write authorization.
suspend_machineMakes changes
Suspend running work on the Machine; this interrupts service until resumed. Requires explicit fly:machines:write authorization.
signal_machineMakes changes
Send a Unix signal to the running Machine's main process. SIGTERM requests termination and allows application cleanup if handled; SIGINT requests an interrupt. SIGKILL terminates immediately without cleanup and can lose in-flight work. SIGHUP, SIGUSR1 and SIGUSR2 have application-defined behavior; choose the signal explicitly. Requires explicit fly:machines:write authorization.
cordon_machineMakes changes
Remove this Machine from proxy routing; existing application work can continue. Requires explicit fly:machines:write authorization.
uncordon_machineMakes changes
Allow proxy routing to this Machine again. Requires explicit fly:machines:write authorization.
list_machine_eventsRead-only
List lifecycle events for the named Machine, including state transitions and their timestamps, to investigate starts, stops and failures. Requires explicit fly:machines:read authorization.
list_machine_versionsRead-only
Read historical Machine configurations under explicit authorization. History can contain sensitive environment, file and metadata values. Requires explicit fly:machines:sensitive:read authorization.
list_machine_processesRead-only
Read process details, which can include sensitive command arguments, under explicit authorization. Requires explicit fly:machines:sensitive:read authorization.
wait_for_machine_stateRead-only
Wait for the named Machine to reach the requested state, optionally for a specific version or instance. This observes state without starting or stopping the Machine. timeout is in seconds, defaults to 10 and cannot exceed 10; a timeout does not change the Machine state. Requires explicit fly:machines:read authorization.
get_machine_leaseRead-only
Read the active lease under an explicit management grant. Lease nonces are sensitive concurrency credentials. Requires explicit fly:machines:write authorization.
get_machine_metadataRead-only
Read arbitrary Machine metadata under explicit authorization; values can be sensitive. Requires explicit fly:machines:sensitive:read authorization.
get_machine_metadata_keyRead-only
Read one arbitrary Machine metadata value under explicit authorization. Requires explicit fly:machines:sensitive:read authorization.
exec_machine_commandMakes changes
Execute an explicit argv array on the Machine, without an implicit shell. Can read or change application data. Command output may contain sensitive values. Requires explicit fly:machines:exec authorization.
create_machine_leaseMakes changes
Acquire a temporary Machine lease, or renew it with the existing lease_nonce. Keep the returned nonce private; use it for subsequent mutations and release. Requires explicit fly:machines:write authorization.
release_machine_leaseMakes changes
Release the Machine lease using its exact lease_nonce. Requires explicit fly:machines:write authorization.
get_machine_memoryRead-only
Read the named Machine's current memory limit and available memory in MiB. Requires explicit fly:machines:write authorization.
set_machine_memory_limitMakes changes
Set the named Machine's memory limit to limit_mb MiB. Lowering the limit can cause memory pressure or out-of-memory failures in running workloads. Requires explicit fly:machines:write authorization.
reclaim_machine_memoryMakes changes
Request reclamation of amount_mb MiB from the named Machine. Returns the actual amount reclaimed; reclamation can affect running workload performance. Requires explicit fly:machines:write authorization.
update_machine_metadataMakes changes
Set or remove metadata keys, without replacing other keys. Null or empty values remove keys. Requires machine_version; stale versions fail without updating. Requires explicit fly:machines:write authorization.
set_machine_metadata_keyMakes changes
Create or replace the value of one metadata key on the named Machine, leaving other keys unchanged. Requires explicit fly:machines:write authorization.
delete_machine_metadata_keyMakes changes
Remove one metadata key from the named Machine, leaving other keys unchanged. Requires explicit fly:machines:write authorization.
Volumes8 tools
list_volumesRead-only
List volumes, hiding deletion-state volumes by default. Set include_destroyed=true to include them. With summary=true, byte and block statistics are unavailable and omitted. Requires explicit fly:volumes:read authorization.
create_volumeMakes changes
Create a new billable persistent volume. Restoring or forking another volume is not supported by this tool; those operations require separate source-resource authorization. Requires explicit fly:volumes:write authorization.
get_volumeRead-only
Read the named persistent volume's size, region, attachment and snapshot settings. Use this to inspect the target before updating, extending or deleting it. Requires explicit fly:volumes:read authorization.
update_volumeMakes changes
Update the named volume's automatic snapshot setting (auto_backup_enabled) and/or snapshot retention in days (snapshot_retention). Disabling backups or shortening retention reduces recovery coverage. Use extend_volume to increase capacity. Requires explicit fly:volumes:write authorization.
delete_volumeMakes changes
Permanently destroy a persistent volume and its data. Detach it from Machines before deletion. Requires explicit fly:volumes:delete authorization.
extend_volumeMakes changes
Increase the named persistent volume to size_gb GiB total, not by that amount. This permanently increases capacity and associated storage charges; volumes cannot be shrunk. Read get_volume first. Only call when the user has authorized the target volume and new total size. Requires explicit fly:volumes:write authorization.
list_volume_snapshotsRead-only
List snapshots for the named volume, including snapshot IDs, creation times and status. Use this after create_volume_snapshot to check asynchronous snapshot creation. Requires explicit fly:volumes:read authorization.
create_volume_snapshotMakes changes
Schedule a volume snapshot. The volume must be attached and ready. Creation is asynchronous and may not return a snapshot ID; use list_volume_snapshots afterward to find the snapshot ID and completion status. Requires explicit fly:volumes:write authorization.
App secrets5 tools
list_app_secretsRead-only
List secret names, digests and timestamps. Secret values are never returned. Requires explicit fly:secrets:read authorization.
get_app_secretRead-only
Read one secret's name, digest and timestamps. Its value is never returned. Requires explicit fly:secrets:read authorization.
update_app_secretsMakes changes
Set or remove several secrets. Null values remove secrets and additionally require fly:secrets:delete consent. The upstream bulk API requires create, write and delete action bits even for sets; secret values are never echoed. Requires explicit fly:secrets:write authorization.
set_app_secretMakes changes
Set a secret value. The result contains metadata only; secret values are not echoed. Requires explicit fly:secrets:write authorization.
delete_app_secretMakes changes
Delete an app secret. Repeated deletion of an absent name can still succeed and advance the secrets version. Requires explicit fly:secrets:delete authorization.
IP addresses1 tool
list_app_ipsRead-only
List the named app's assigned IP addresses and their types for inspecting public and private networking. Requires explicit fly:network:read authorization.
TLS certificates2 tools
list_app_certificatesRead-only
List TLS certificates configured for the named app, including hostnames and certificate status. Requires explicit fly:certificates:read authorization.
get_app_certificateRead-only
Read TLS certificate details and validation status for one hostname on the named app. Requires explicit fly:certificates:read authorization.

Managed Postgres

Clusters and plans5 tools
list_postgres_clustersRead-only
List Managed Postgres clusters for an organization.
get_postgres_plansRead-only
List the Managed Postgres plans available when creating or forking a cluster in an organization, cheapest first.
get_postgres_clusterRead-only
Get details of a specific Managed Postgres cluster, including its status and, once it is ready, its endpoints.
create_postgres_clusterMakes changes
Create a Managed Postgres cluster in the organization. Provisioning is asynchronous: poll get_postgres_cluster until its status is ready before creating databases or enabling extensions.
fork_postgres_clusterMakes changes
Fork a ready Managed Postgres cluster into a new cluster that inherits the source's settings, on the source's plan unless plan is given. The source cluster is left unchanged, and the fork is provisioned asynchronously.
Backups2 tools
list_postgres_backupsRead-only
List all backups associated with a specific cluster.
create_postgres_backupMakes changes
Create a backup for a specific cluster. The backup runs asynchronously and is rejected if one is already in progress.
Databases and extensions4 tools
list_postgres_databasesRead-only
List all databases within a specific cluster.
list_postgres_extensionsRead-only
List all extensions available within a specific database, indicating which are installed.
create_postgres_databaseMakes changes
Create a database within a specific cluster.
enable_postgres_extensionMakes changes
Enable a Postgres extension within a specific database. PostGIS extensions require a PostGIS-enabled cluster.
Users and query activity3 tools
list_postgres_usersRead-only
List all Postgres users within a specific cluster.
list_postgres_active_queriesRead-only
List active queries in the supplied database. Returns full query text and durations in seconds.
list_postgres_slow_queriesRead-only
List the top 20 queries by cumulative total execution time, excluding the postgres database. Uses the latest available metrics within the lookback range; statistics are cumulative PostgreSQL counters, not deltas over that range. Returns full query text and execution times in seconds.
Read-only SQL1 tool
query_postgres_databaseRead-only
Run one read-only SQL query on a database and return columns, rows, and row_count. Queries time out after 5 seconds and fail above 1000 rows, so add a LIMIT. Cast bigint and numeric values to text when you need exact values.

Sprites

Discovery and lifecycle6 tools
list_spritesRead-only
List Sprites visible to this connection. The grant's name prefix and optional label filter access; this is not necessarily every Sprite in the organization, nor limited to Sprites created by this client. Call get_fly_context to inspect the restrictions.
create_spriteMakes changes
Create a Sprite within this connection's grant restrictions. First call get_fly_context and inspect the Sprites binding restrictions for the required name_prefix and max_sprites_total creation limit.
destroy_spriteMakes changes
Destroy a sprite in the authenticated organization.
search_sprite_mentionsRead-only
Find up to 20 authorized Sprites by name prefix for composer mentions.
open_sprite_inspectorRead-only
Open a read-only Sprite Inspector showing environments, services, checkpoints and recent service logs. Opening only lists metadata; runtime reads are explicit and may wake a Sprite.
get_sprite_infoRead-only
Read authorized Sprite metadata without waking it. Pass sprite_id from a mention or Inspector selection to reject deleted and recreated environments.
Commands and sessions3 tools
exec_listReads; may wake
List active exec sessions.
execMakes changes
Run a command on the named Sprite without a TTY and return its output; interactive commands that need a terminal are not supported. Pass an argv array to preserve argument boundaries; to use shell syntax, explicitly run a shell such as bash -c. Commands can modify files and access the network.
exec_killMakes changes
Kill an exec session by session ID. Returns streaming NDJSON with kill progress.
Files and directories6 tools
file_readReads; may wake
Read file contents from the sprite filesystem. Returns raw file bytes.
file_writeMakes changes
Write up to 16 MiB of file contents to the sprite filesystem. Request body contains raw file bytes.
file_listReads; may wake
List directory contents.
file_deleteMakes changes
Delete a file or directory on the named Sprite. recursive defaults to false; set it to true explicitly to delete a directory tree. asRoot defaults to false.
file_renameMakes changes
Rename or move a file or directory on the named Sprite. asRoot defaults to false.
file_copyMakes changes
Copy a file or directory on the named Sprite. recursive, preserveAttrs and asRoot default to false; enable them explicitly to copy directory trees, preserve attributes or use root privileges.
Services and logs6 tools
service_listReads; may wake
List all configured services and their current state.
service_getReads; may wake
Get details of a specific service.
service_createMakes changes
Register a named service on the Sprite. On provider-backed Sprites, creates or replaces the stored service definition; use service_start and service_logs for explicit runtime control and output. On legacy Sprites, a new service starts with its dependencies and streams initial logs (duration defaults to 5s). An existing legacy service with the same cmd succeeds without changing any settings; a different cmd conflicts. Read service_get before reusing a name and verify the definition afterward.
service_startMakes changes
Start a service. Returns streaming NDJSON with stdout/stderr.
service_stopMakes changes
Stop a running service. Returns streaming NDJSON with service stop progress.
service_logsReads; may wake
Stream logs for a service.
Checkpoints4 tools
checkpoint_createMakes changes
Create a new checkpoint of the current sprite state. Returns streaming NDJSON progress.
checkpoint_listReads; may wake
List all checkpoints.
checkpoint_getReads; may wake
Get details of a specific checkpoint.
checkpoint_restoreMakes changes
Restore to a specific checkpoint. Returns streaming NDJSON progress.
Network policies2 tools
policy_network_getReads; may wake
Read the named Sprite's current network policy rules before preparing a replacement.
policy_network_updateMakes changes
Replace the named Sprite's entire network policy with the supplied rules; this does not append rules. Read policy_network_get first and include every rule to retain. Replacement can interrupt network access and running work.