Get the FREE Ultimate OpenClaw Setup Guide →

fal-flux-kontext-max

MCP server for FLUX.1 Kontext [Max] - Frontier image generation model with advanced text rendering and contextual understanding

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio pierrunoyt-fal-flux-kontext-max-mcp-server npx -y https://github.com/PierrunoYT/fal-flux-kontext-max-mcp-server.git \
  --env FAL_KEY="your-fal-api-key-here"

How to use

This MCP server exposes the FLUX.1 Kontext [Max] model through the FAL AI platform, enabling frontier image generation, advanced image editing, and sophisticated text rendering with strong contextual understanding. The server supports real-time generation as well as asynchronous queue-based processing to handle longer tasks. Use it to generate images from prompts, edit existing images, and obtain both local file paths and original URLs with metadata. The available tools include flux_kontext_max_generate for real-time generation, flux_kontext_max_generate_async for batch or longer runs, flux_kontext_max_edit for image editing, and flux_kontext_max_edit_async for queued edits. Each tool accepts parameters such as prompt, seed, guidance_scale, safety_tolerance, output_format, and aspect_ratio, and returns immediate access to image URLs alongside detailed generation metadata.

How to install

Prerequisites:

  • Node.js 18 or higher
  • NPM (comes with Node.js) and internet access
  • A FAL AI API key

Install and run using the portable npx configuration (no local installation required):

  1. Ensure Node.js is installed and you have npm available.
  2. Run the MCP configuration using npx as shown in the README example:
# Quick universal run (from any machine with Node.js)
npx -y https://github.com/PierrunoYT/fal-flux-kontext-max-mcp-server.git
  1. Provide your FAL_KEY when prompted or via environment variable as configured:
export FAL_KEY=your-fal-api-key-here
  1. If you prefer local modification, clone the repository and install/build locally:
git clone https://github.com/PierrunoYT/fal-flux-kontext-max-mcp-server.git
cd fal-flux-kontext-max-mcp-server
npm install
npm run build
  1. Run the local version by invoking Node with the built entry point, as described in the repository's guidance (e.g., node path/to/fal-flux-kontext-max-mcp-server/build/index.js).

Additional notes

Tips and considerations:

  • The server gracefully handles missing API keys and other errors without crashing, but you must supply a valid FAL_KEY to access FLUX.1 Kontext [Max].
  • Supported output formats include JPEG and PNG; you can tailor the aspect_ratio and number of images (num_images) per request.
  • The MCP supports both real-time and async queue processing. Use the async variants for larger batches (2-4 images) or longer prompts to avoid timeouts.
  • For Claude Desktop and Kilo Code MCP integrations, you can point their MCP settings at the Node-based build/index.js, passing the FAL_KEY in env blocks.
  • If using npx, your environment will fetch the latest version from GitHub each time, ensuring you are always up to date.
  • Ensure network access to FAL AI services and valid API key scopes for image generation and retrieval.

Related MCP Servers

Sponsor this space

Reach thousands of developers