Wraps fal.ai image generation API to enable image creation and editing via MCP clients.
Configuration
View docs{
"mcpServers": {
"guillaumeboniface-fal-mcp": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/fal-mcp",
"python",
"server.py"
],
"env": {
"FAL_KEY": "YOUR_API_KEY"
}
}
}
}This MCP server wraps the fal.ai image generation API to empower an MCP client like Claude to generate and edit images through a streamlined, configurable backend. It exposes a set of image generation and editing tools that you can invoke from your MCP client, handling authentication and API interactions for you.
You connect to this server from your MCP client by configuring an MCP JSON that points to the local server. Once connected, you can request image generation, guided generation with references, LoRA-enabled transforms, and image edits using natural language prompts. The server handles API authentication and routes your requests to fal.ai, returning image outputs you can save or reuse.
Prerequisites you need before installation:
Step-by-step setup:
# 1) Prepare a Python virtual environment
python3.11 -m venv venv
source venv/bin/activate
# 2) Install required Python dependencies
pip install fastmcp httpx python-dotenv
# 3) Ensure you have an API key from fal.ai and set it for the server (see environment config below)To connect from Claude Code, add a server entry that runs the local fal-mcp server. The following configuration starts the server from your local directory.
{
"mcpServers": {
"fal": {
"command": "uv",
"args": ["run", "--directory", "/path/to/fal-mcp", "python", "server.py"]
}
}
}Create a new image from text prompts with a chosen model, resolution, steps, and guidance scale.
Generate an image guided by a content or style reference image.
Generate an image using a LoRA model to apply specialized styles or effects.
Edit an existing image using natural language instructions (FLUX Kontext) to apply changes.
Submit advanced, configurable requests for supporting techniques like ControlNet, IP-Adapter, or multiple LoRAs.
List all images saved in the server's output directory for easy access and reuse.