# Fly.io MCP

> Fly.io MCP lets your agent manage complex edge infrastructure and container orchestration through natural conversation. You can list apps, monitor machines globally, scale compute capacity dynamically, run remote commands inside containers, and handle persistent data volumes—all without touching the command line.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Tags:** edge-computing, container-orchestration, docker, serverless, infrastructure-as-code

## Description

This connector connects your account to Fly.io, giving you full control over distributed edge computing resources via any MCP-compatible client. Forget logging into separate dashboards or writing complex CLI scripts just to check machine health across global regions. Instead, talk to your agent and get real-time status updates on everything from active container assignments to persistent storage volumes.

You can ask the system to list all app spaces belonging to an organization or identify specific dedicated IPv4/IPv6 IPs assigned by the cluster master. Need more compute power? Your agent provisions new, highly available Edge Machines to scale capacity instantly. If something goes wrong, you don't have to SSH in; your agent runs shell commands directly inside active machines through the hypervisor API. This means you can diagnose issues or run database migrations without manual intervention. All of this infrastructure control is managed seamlessly through Vinkius, making it one place for all your edge resources.

## Tools

### create_machine
This tool provisions a new, highly available Edge Machine within an existing App space.

### delete_machine
It terminates and destroys a specific Fly Machine instance permanently.

### exec_machine
This function injects and runs shell or Bash commands inside an active machine.

### get_app
It retrieves the operational baseline state of a distinct Fly App, including its primary region and Anycast IPs.

### get_machine
This fetches the exhaustive runtime status for a single machine, detailing its current execution state and image digest.

### list_apps
It lists all App spaces belonging to an organization, identifying their container and storage components.

### list_machines
This function retrieves unique identifiers and explicit placement regions for individual machines within an app.

### list_volumes
It lists persistent hardware NVMe Volumes attached to an App, crucial for stateful data management.

### start_machine
This tool boots up a Fly Machine that was previously stopped or suspended.

### stop_machine
It gracefully halts an active, running internal machine instance.

## Prompt Examples

**Prompt:** 
```
List all machines in my 'web-api' app
```

**Response:** 
```
Retrieving machines... I found 2 machines in 'web-api': '918572b0' (Region: iad, Status: started) and 'e28654c1' (Region: gru, Status: stopped). Would you like me to start the stopped machine?
```

**Prompt:** 
```
Run 'ls -la /app' on machine '918572b0' in app 'web-api'
```

**Response:** 
```
Command execution initiated! I've sent the request to machine 918572b0. Result: [Detailed directory listing showing files in /app folder]. No SSH required, I used the Fly Machine API synchronously.
```

**Prompt:** 
```
Show me the persistent volumes for 'web-api'
```

**Response:** 
```
Retrieving volumes... I found 1 persistent NVMe volume: 'data_vol' (Size: 10GB, Region: iad). It is currently attached to machine 918572b0 and is residency on physical hardware node xyz.
```

## Capabilities

### Listing Infrastructure Components
You can list the app spaces belonging to an organization or retrieve a list of individual microVM endpoints and their specific physical placement regions.

### Managing Machine Lifecycle
The system allows you to start, stop, scale up, or terminate machines dynamically based on current operational needs.

### Auditing Runtime Status and IP Ranges
You can get the exhaustive runtime state of a machine, including its running image digest, or retrieve the operational baseline, such as anycast IPs and Wireguard network ranges for an app.

### Executing Remote Commands
Your agent injects and runs standard shell commands inside active machines, bypassing the need for manual SSH connections.

### Controlling Persistent Storage
You can list hardware NVMe Volumes attached to an app, ensuring stateful data like PostgreSQL or SQLite remains available even if compute instances fail.

## Use Cases

### Debugging a service outage in a remote region
A backend developer notices high latency. They ask their agent to run `get_machine` on the primary web-api machine. The agent returns that the status is 'suspended.' The developer then instructs the agent to use `start_machine`, restoring the service and confirming connectivity via a follow-up command.

### Verifying data integrity before deployment
A DevOps engineer needs to migrate user data. They first call `list_volumes` for the app, confirm the existence of the necessary NVMe storage. Then, they use `exec_machine` to run a specific database migration script inside the target machine.

### Scaling up during peak traffic hours
The SRE team sees CPU spikes approaching limits. Instead of waiting for automated scaling policies, they instruct their agent to use `create_machine`, provisioning a new Edge Machine instantly in the busiest region and balancing load across the cluster.

### Auditing network topology changes
A cloud architect needs to confirm which IPs are active for compliance. They run `get_app` on the service, receiving an immediate report detailing all assigned Anycast IP ranges and internal Wireguard assignments.

## Benefits

- You manage the entire lifecycle of your infrastructure—from listing apps using `list_apps` to ensuring machines are running via `start_machine`. This eliminates context switching between multiple cloud tools.
- Never manually SSH into a machine again. Use `exec_machine` to run diagnostic commands like `ps aux` directly from your agent, giving you immediate shell output without complex terminal setup.
- Data persistence is guaranteed. By using `list_volumes`, you can audit attached hardware NVMe Volumes and know exactly where critical stateful data lives, independent of any single machine's uptime.
- Scaling compute capacity becomes conversational. Instead of following a multi-step deployment process, your agent provisions new Edge Machines instantly with the `create_machine` tool.
- You maintain visibility into global networking. The system can provide the operational baseline using `get_app`, identifying active Anycast IPs and Wireguard ranges in one query.

## How It Works

The bottom line is that you manage complex global edge computing resources using plain conversation instead of platform CLIs.

1. Subscribe to this MCP and provide your Fly.io API Token.
2. Connect your agent from any MCP-compatible client, giving it access to the Fly.io infrastructure layer.
3. Use natural language commands to perform actions like listing apps or running diagnostics on machines.

## Frequently Asked Questions

**How does Fly.io MCP handle data integrity?**
The system helps manage stateful applications by allowing you to list hardware NVMe Volumes using `list_volumes`, which keeps persistent data separate from the compute layer.

**Can I run diagnostics on a machine without SSH?**
Yes. You use the `exec_machine` tool, which injects and runs shell commands like `ls -la` directly inside an active machine via the hypervisor API, bypassing traditional SSH methods.

**What if I need to scale capacity quickly?**
Use `create_machine`. This tool provisions new highly available Edge Machines dynamically, letting you adjust horizontal scaling without waiting for a full platform deployment cycle.

**Does Fly.io MCP show me the network IPs?**
Yes. You can run `get_app` to retrieve the operational baseline, which includes identifying anycast assignments and internal Wireguard ranges assigned to your app.

**How do I shut down a machine safely?**
Use `stop_machine`. This tool gracefully halts a running Fly.io internal Machine instance, minimizing potential latency issues during idle cycles.