Skip to main content
Glama

fal-mcp

An MCP server that wraps the fal.ai image generation API, giving Claude (or any MCP client) the ability to generate and edit images.

Tools

Tool

Description

generate_image

Text-to-image generation with configurable model, size, steps, and guidance

generate_with_reference

Image generation guided by a style/content reference image

generate_with_lora

Image generation with a LoRA model applied

edit_image

Edit an existing image using natural language instructions (FLUX Kontext)

raw_generate

Submit arbitrary requests for advanced configurations (ControlNet, IP-Adapter, multi-LoRA)

list_outputs

List all saved images in the output directory

Related MCP server: Nano-Banana MCP Server

Supported models

  • fal-ai/flux/dev — high quality (default)

  • fal-ai/flux/schnell — fast, 1-4 steps

  • fal-ai/flux-pro/v1.1 — professional, up to 2K resolution

  • fal-ai/flux-general — supports LoRA, ControlNet, IP-Adapter

  • fal-ai/recraft/v3/text-to-image — illustration style

  • fal-ai/flux-pro/kontext — image editing

Setup

  1. Get an API key from fal.ai

  2. Set the FAL_KEY environment variable (or add it to a .env.local file in the parent directory)

Usage with Claude Code

Add this to your .mcp.json:

{
  "mcpServers": {
    "fal": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/fal-mcp", "python", "server.py"]
    }
  }
}

Dependencies

  • Python >= 3.11

  • FastMCP v2

  • httpx

  • python-dotenv

Available Tools

6 tools
edit_imageB

Edit an existing image using natural language instructions (FLUX Kontext).

Pass a reference image and describe the changes you want in the prompt. Great for iterating on generated images.

Args: image_url: URL of the image to edit. prompt: Description of the desired changes.

Inputs: prompt (required), image_url (required), model, seed, +2 more. Returns: object

generate_imageA

Generate images from a text prompt using fal.ai.

Common models:

  • fal-ai/flux/dev (high quality, 28 steps)

  • fal-ai/flux/schnell (fast, 1-4 steps)

  • fal-ai/flux-pro/v1.1 (professional, up to 2K)

  • fal-ai/flux-general (supports LoRA, ControlNet, IP-Adapter)

  • fal-ai/recraft/v3/text-to-image (illustration style)

Returns paths to saved images and metadata.

Inputs: prompt (required), model, width, height, +6 more. Returns: object

generate_with_loraC

Generate images with a LoRA model applied.

Args: lora_url: URL to the LoRA safetensors file (e.g. from HuggingFace). lora_scale: Strength of the LoRA effect (0.0-2.0, default 1.0).

Inputs: prompt (required), lora_url (required), lora_scale, model, +8 more. Returns: object

generate_with_referenceC

Generate images with a style/content reference image.

Uses the reference_image feature of flux-general to guide generation toward a similar style or content as the reference.

Args: reference_image_url: URL of the reference image for style guidance. reference_strength: How strongly to follow the reference (0.0-1.0).

Inputs: prompt (required), reference_image_url (required), reference_strength, model, +8 more. Returns: object

list_outputsB

List all images previously saved in the output directory.

Inputs: no named parameters. Returns: object

raw_generateA

Submit an arbitrary request to any fal.ai model endpoint.

Use this for advanced configurations (ControlNet, IP-Adapter, multi-LoRA, custom parameters) that aren't covered by the other tools.

Args: model: The fal.ai model endpoint ID (e.g. "fal-ai/flux-general"). body: The full JSON request body to send to the model.

Inputs: model (required), body (required), filename. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 6 tools

    Disambiguation4/5

    Most tools have distinct purposes: edit_image modifies existing images, generate_image creates from text, generate_with_lora adds LoRA models, generate_with_reference uses style guidance, list_outputs enumerates saved images, and raw_generate handles advanced configurations. However, generate_image and generate_with_lora could potentially overlap in functionality if LoRA is used for generation, but their descriptions clarify the distinction.

    Naming Consistency4/5

    Tool names follow a consistent verb-based snake_case pattern (e.g., edit_image, generate_image, list_outputs), which is clear and predictable. The only minor deviation is raw_generate, which uses 'raw' as a prefix instead of a verb, but it still fits the overall naming style without causing confusion.

    Tool Count5/5

    With 6 tools, the server is well-scoped for image generation and editing tasks. Each tool serves a specific role, from basic generation to advanced configurations, and the count is neither too sparse nor overwhelming, fitting typical MCP server ranges for this domain.

    Completeness4/5

    The toolset covers core image generation workflows: creation (generate_image), editing (edit_image), style control (generate_with_reference), model customization (generate_with_lora), and advanced options (raw_generate), plus management (list_outputs). A minor gap is the lack of a delete or manage tool for removing saved images, but agents can work around this.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers