Prepare the server locally
Run this once before adding it to Claude Code.
git clone https://github.com/guillaumeboniface/fal-mcp
cd fal-mcpThen follow the repository README for any remaining dependency or build steps.
Register it in Claude Code
claude mcp add -e "FAL_KEY=${FAL_KEY}" fal-mcp -- uv run --directory /path/to/fal-mcp python server.pyReplace any placeholder paths in the command with the real path on your machine.
FAL_KEYMake your agent remember this setup
fal-mcp's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.
npx conare@latestFree · one command · indexes the sessions already on disk. Set up in the browser instead →
What it does
- Text-to-image generation using various FLUX models
- Image editing via natural language instructions
- Support for LoRA models and style references
- Advanced configuration support for ControlNet and IP-Adapter
- Local output management and listing
Tools 6
generate_imageText-to-image generation with configurable model, size, steps, and guidancegenerate_with_referenceImage generation guided by a style/content reference imagegenerate_with_loraImage generation with a LoRA model appliededit_imageEdit an existing image using natural language instructionsraw_generateSubmit arbitrary requests for advanced configurationslist_outputsList all saved images in the output directoryEnvironment Variables
FAL_KEYrequiredAPI key from fal.aiTry it
Original README from guillaumeboniface/fal-mcp
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 |
Supported models
fal-ai/flux/dev— high quality (default)fal-ai/flux/schnell— fast, 1-4 stepsfal-ai/flux-pro/v1.1— professional, up to 2K resolutionfal-ai/flux-general— supports LoRA, ControlNet, IP-Adapterfal-ai/recraft/v3/text-to-image— illustration stylefal-ai/flux-pro/kontext— image editing
Setup
- Get an API key from fal.ai
- Set the
FAL_KEYenvironment variable (or add it to a.env.localfile 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