FI

Firefly MCP Server for Cloud and SaaS Management

Manage and codify Cloud and SaaS resources with the Firefly MCP server, a TypeScript integration for discovering and controlling accounts on Firefly

Quick Install
npx -y @gofireflyio/firefly-mcp

Overview

The Firefly MCP (Model Context Protocol) server is a TypeScript-based integration that lets developer tools discover, inspect, and codify resources from Cloud and SaaS accounts connected to Firefly. It implements the MCP pattern so LLM-driven or agent-style tools (for example, Cursor or Claude) can query account context and receive structured resource data or generated Infrastructure as Code (IaC).

The server is intended for teams that want to centralize resource discovery and convert live resources into reproducible code. Typical uses include inventory and audit, IaC bootstrapping (e.g., Terraform), migration planning, and conversational queries about accounts and resources.

Features

  • Resource discovery across Cloud and SaaS accounts connected to Firefly
  • Resource codification: convert discovered resources into IaC (Terraform, etc.)
  • Secure authentication using Firefly access keys
  • Runs as an MCP-compatible server (stdio or SSE) for easy integration with tools
  • Simple NPX-based start (no global install required)
  • Works with LLM-driven integrations such as Cursor and Claude

Prerequisites

  • Node.js v20 or later
  • npm or yarn available to run NPX
  • A Firefly account and a generated FIREFLY_ACCESS_KEY and FIREFLY_SECRET_KEY

Installation / Configuration

You can run the MCP server directly with NPX (no install required):

# Quick start (env vars)
FIREFLY_ACCESS_KEY=your_access_key \
FIREFLY_SECRET_KEY=your_secret_key \
npx @fireflyai/firefly-mcp

Or pass credentials as CLI arguments:

npx @fireflyai/firefly-mcp --access-key your_access_key --secret-key your_secret_key

Common runtime flags

# run as an SSE server on port 6001
npx @fireflyai/firefly-mcp --sse --port 6001

Environment variables and CLI equivalents

PurposeEnvironment variableCLI flag
Firefly access keyFIREFLY_ACCESS_KEY–access-key
Firefly secret keyFIREFLY_SECRET_KEY–secret-key
Enable SSE moden/a (use –sse)–sse
Port for SSE servern/a (use –port)–port

Example mcp.json configurations

  • Stdio-based MCP server (tool spawns the process):
{
  "mcpServers": {
    "firefly": {
      "command": "npx",
      "args": ["-y", "@fireflyai/firefly-mcp"],
      "env": {
        "FIREFLY_ACCESS_KEY": "your_access_key",
        "FIREFLY_SECRET_KEY": "your_secret_key"
      }
    }
  }
}
  • SSE-based MCP server (tool connects to a running HTTP SSE endpoint):

Start the server:

npx @fireflyai/firefly-mcp --sse --port 6001 \
  --access-key your_access_key --secret-key your_secret_key

Tell your MCP client to use the SSE URL:

{
  "mcpServers": {
    "firefly": {
      "url": "http://localhost:6001/sse"
    }
  }
}

Available Tools / Protocols

  • Model Context Protocol (MCP) over:
    • stdio: spawnable process that exchanges JSON messages on stdin/stdout
    • SSE: HTTP Server-Sent Events endpoint for persistent connections
  • Integration-ready with tools that implement MCP (e.g., Cursor, Claude connectors)
  • CLI entry point: @fireflyai/firefly-mcp (exposed via NPX)

Authentication & Security

  • The server uses FIREFLY_ACCESS_KEY and FIREFLY_SECRET_KEY for authenticating to Firefly APIs.
  • Provide credentials via environment variables or CLI flags. Avoid checking credentials into source control.
  • Run the server in a network environment with appropriate access controls if exposing an SSE endpoint.

Use Cases

  1. Codify a live EC2 instance into Terraform

    • Query: “Find the ubuntu-prod EC2 instance in AWS account 123456789012 and output Terraform.”
    • Result: Generated Terraform resource block with ami and instance_type populated from the discovered instance.
  2. Multi-account inventory and audit

    • Use the MCP server as a contextual source for LLM-based assistants to report which accounts have specific resource types, open security groups, or public S3 buckets.
  3. SaaS account discovery and user management

    • Ask conversational queries like “List GitHub org repos with branch protection disabled” and receive structured results that can be codified or used in remediation workflows.
  4. IaC bootstrapping and migration planning

    • Discover resources in a cloud account and generate initial Terraform modules to accelerate migration or onboarding.

Examples

Prompt to an MCP-enabled assistant:

Find all "ubuntu-prod" EC2 instance in 123456789012 AWS account and codify it into Terraform

Example generated response:

resource "aws_instance" "ubuntu-prod" {
  ami           = "ami-0c55b159cbfafe1f0"
  instance_type = "t3.micro"
  # additional attributes inferred from the discovered instance...
}

Getting Help & Contributing

  • Repository: https://github.com/gofireflyio/firefly-mcp
  • For bugs or feature requests, open an issue in the GitHub repo.
  • Contributions: fork, create a feature branch, commit, and open a pull request. Follow repository contribution guidelines.

Notes

  • The MCP server is intended to be used as part of a broader Firefly workflow—ensure your Firefly account has the necessary connectors and permissions for the clouds/SaaS systems you intend to query.
  • Treat generated IaC as a starting point: review and harden before applying in production.