fly-mcp
About
MCP server for managing your Fly.io infrastructure
Details
- Author
- brannn
- Downloads
- 347
- Categories
- Other, Infrastructure
Jump to
- Fly.io API integration via MCP tools
- Security features: rate limiting, CORS, audit logging
- Real-time application status and scaling
- Configuration via YAML, env vars, or CLI flags
- Structured logging with audit trails
- List and manage Fly.io apps
Set environment variables FLY_MCP_FLY_API_TOKEN and FLY_MCP_FLY_ORGANIZATION, then build and run the server with make build and make run (or make dev for hot reload). For production, deploy on Fly.io using fly mcp launch with required secrets. The server exposes an HTTP endpoint on port 8080; tools are invoked via JSON-RPC requests to that endpoint.
fly-mcp
An open-source MCP (Model Context Protocol) server for Fly.io infrastructure management, enabling AI-driven DevOps workflows through natural language interactions.
π Quick Start
Prerequisites
- Go 1.21 or later
- Fly.io account and API token
- Git
Local Development Setup
1. Clone the repository
git clone https://github.com/brannn/fly-mcp.git
cd fly-mcp
2. Set up environment variables
export FLY_MCP_FLY_API_TOKEN="your_fly_api_token_here"
export FLY_MCP_FLY_ORGANIZATION="your_fly_org_here"
3. Build and run
make build
make run
Or for development with hot reload:
make dev
Production Deployment on Fly.io
Deploy using Fly.io's MCP infrastructure:
fly mcp launch \
"github.com/brannn/fly-mcp" \
--claude --cursor --zed \
--server fly-infrastructure \
--secret FLY_API_TOKEN=fo1_your_token \
--secret FLY_ORG=your-org-name
ποΈ Architecture
Project Structure
fly-mcp/
βββ cmd/fly-mcp/ # Main application entry point
βββ pkg/
β βββ mcp/ # MCP protocol implementation
β βββ fly/ # Fly.io API client (coming soon)
β βββ auth/ # Authentication (coming soon)
β βββ tools/ # MCP tool implementations (coming soon)
β βββ config/ # Configuration management
βββ internal/
β βββ server/ # HTTP server implementation
β βββ security/ # Security utilities (coming soon)
β βββ logger/ # Structured logging
βββ config.local.yaml # Local development configuration
βββ config.production.yaml # Production configuration
βββ Makefile # Build automation
Configuration
The application supports flexible configuration through:
- YAML files: config.local.yaml for development, config.production.yaml for production
- Environment variables: All config values can be overridden with FLY_MCP_ prefixed env vars
- Command line flags: --config and --log-level flags
Environment Variables
| Variable | Description | Required |
|----------|-------------|----------|
| FLY_MCP_FLY_API_TOKEN | Fly.io API token | Yes |
| FLY_MCP_FLY_ORGANIZATION | Fly.io organization name | Yes |
| FLY_MCP_ENVIRONMENT | Environment (local/production) | No |
| FLY_MCP_LOGGING_LEVEL | Log level (debug/info/warn/error) | No |
π οΈ Development
Available Make Targets
make build # Build the binary
make build-all # Build for all platforms
make test # Run tests
make test-coverage # Run tests with coverage
make lint # Run linters
make fmt # Format code
make clean # Clean build artifacts
make dev # Run in development mode
make validate-config # Validate configuration
make docker-build # Build Docker image
make help # Show all available targets
Running Tests
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



