fal-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@fal-mcpGenerate a cinematic photo of a cyberpunk city in the rain"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 |
| Text-to-image generation with configurable model, size, steps, and guidance |
| Image generation guided by a style/content reference image |
| Image generation with a LoRA model applied |
| Edit an existing image using natural language instructions (FLUX Kontext) |
| Submit arbitrary requests for advanced configurations (ControlNet, IP-Adapter, multi-LoRA) |
| 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 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
Available Tools
6 toolsedit_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.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| image_url | Yes | ||
| model | No | fal-ai/flux-pro/kontext | |
| seed | No | ||
| output_format | No | png | |
| filename | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool uses 'FLUX Kontext' and is for editing images, but it doesn't disclose critical behavioral traits such as whether this is a read-only or destructive operation, authentication requirements, rate limits, or what the output looks like. For a tool that likely involves image manipulation and external API calls, this lack of detail is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, starting with the core purpose and usage instructions. The sentences are efficient, with no wasted words, and the Args section is structured clearly. However, the lack of behavioral details and incomplete parameter coverage slightly reduces its overall effectiveness, but it remains concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of an image editing tool with 6 parameters, 0% schema description coverage, no annotations, but an output schema, the description is partially complete. It covers the basic purpose and two parameters but misses behavioral context and details for most parameters. The output schema likely handles return values, but without annotations or full parameter guidance, it's adequate but with clear gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It only explains two parameters ('image_url' and 'prompt') in the Args section, leaving four parameters ('model', 'seed', 'output_format', 'filename') undocumented. While it adds meaning for the required parameters, it fails to cover the majority of parameters, resulting in incomplete guidance for tool invocation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Edit an existing image using natural language instructions (FLUX Kontext).' It specifies the verb ('edit'), resource ('existing image'), and method ('natural language instructions'), distinguishing it from sibling tools like 'generate_image' or 'generate_with_reference' by focusing on editing rather than generation. However, it doesn't explicitly contrast with 'generate_with_reference', which might also use reference images, slightly limiting differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides some usage context: 'Great for iterating on generated images' and implies usage by stating 'Pass a reference image and describe the changes you want in the prompt.' This suggests it's for editing existing images, but it doesn't explicitly state when to use this tool versus alternatives like 'generate_with_reference' or 'raw_generate', nor does it mention exclusions or prerequisites, leaving room for ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| model | No | fal-ai/flux/dev | |
| width | No | ||
| height | No | ||
| num_inference_steps | No | ||
| guidance_scale | No | ||
| seed | No | ||
| num_images | No | ||
| output_format | No | png | |
| filename | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key traits: the tool uses fal.ai, lists model options with performance details, and specifies the return value ('Returns paths to saved images and metadata'). It does not cover aspects like rate limits, authentication needs, or error handling, but provides substantial operational context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by a bulleted list of models for quick reference, and ends with return information. Every sentence earns its place without redundancy, making it efficient and easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (10 parameters, no annotations, but with an output schema), the description is largely complete. It covers the purpose, model options, and return values, which are critical for usage. The output schema likely details return structures, so the description need not explain those. However, it could benefit from more guidance on parameter interactions or error cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds significant meaning by explaining model options and their characteristics (e.g., 'high quality, 28 steps' for fal-ai/flux/dev), which clarifies the 'model' parameter beyond the schema's default. However, it does not address other parameters like 'guidance_scale' or 'num_inference_steps', leaving gaps for a tool with 10 parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Generate images from a text prompt using fal.ai.' It specifies the verb ('Generate'), resource ('images'), and method ('from a text prompt using fal.ai'), distinguishing it from sibling tools like edit_image or generate_with_lora that modify or enhance images rather than creating from scratch.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context by listing common models with their characteristics (e.g., 'high quality', 'fast', 'professional'), which helps guide model selection. However, it does not explicitly state when to use this tool versus alternatives like generate_with_lora or generate_with_reference, nor does it mention exclusions or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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).
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| lora_url | Yes | ||
| lora_scale | No | ||
| model | No | fal-ai/flux-general | |
| width | No | ||
| height | No | ||
| num_inference_steps | No | ||
| guidance_scale | No | ||
| seed | No | ||
| num_images | No | ||
| output_format | No | png | |
| filename | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden for behavioral disclosure. While 'Generate images' implies a creation operation, the description doesn't mention important behavioral aspects like: whether this is a read-only or mutating operation, authentication requirements, rate limits, cost implications, or what happens to generated images. The description only covers the LoRA-specific parameters without broader behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately concise with a clear main purpose statement followed by parameter explanations. The two-sentence structure is efficient, though the parameter explanations are incomplete given the total parameter count. No wasted words, but the brevity comes at the cost of completeness for this complex tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex image generation tool with 12 parameters, no annotations, and rich sibling tools, the description is significantly incomplete. It covers only the LoRA-specific aspects while ignoring the core 'prompt' parameter, generation settings, output specifications, and how this tool differs from other generation tools on the server. The existence of an output schema helps with return values, but the description doesn't provide enough context for proper tool selection and usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description provides semantic context for only 2 of 12 parameters (lora_url and lora_scale) with schema description coverage at 0%. While the description adds value by explaining what these LoRA-specific parameters mean, it completely ignores the other 10 parameters including the required 'prompt' parameter and important defaults like model, dimensions, and generation settings. This leaves significant gaps in parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Generate images with a LoRA model applied.' This specifies both the action (generate images) and the key resource/technique (LoRA model). However, it doesn't explicitly differentiate from sibling tools like 'generate_image' or 'generate_with_reference' which also generate images, leaving some ambiguity about when to choose this specific tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'generate_image', 'generate_with_reference', and 'raw_generate' that all appear to generate images, there's no indication of when LoRA-based generation is appropriate versus other methods. The description lacks any 'when-to-use' or 'when-not-to-use' context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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).
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| reference_image_url | Yes | ||
| reference_strength | No | ||
| model | No | fal-ai/flux-general | |
| width | No | ||
| height | No | ||
| num_inference_steps | No | ||
| guidance_scale | No | ||
| seed | No | ||
| num_images | No | ||
| output_format | No | png | |
| filename | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It mentions the underlying feature ('reference_image feature of flux-general') and the reference_strength range, but doesn't disclose critical behavioral traits like rate limits, authentication needs, output format details (though output schema exists), or potential side effects. For a complex image generation tool with 12 parameters, this is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately concise with three sentences: a clear purpose statement, technical context, and minimal parameter info. It's front-loaded with the core functionality. However, the parameter documentation is sparse given the complexity, and the structure could be improved with bullet points or clearer separation of concepts.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (12 parameters, no annotations, 0% schema coverage), the description is incomplete. While an output schema exists (mitigating need to explain return values), the description fails to address many parameters, provide usage examples, or detail behavioral aspects like error handling or performance characteristics. For a sophisticated image generation tool among siblings, this leaves too much unexplained.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It only documents 2 of 12 parameters (reference_image_url and reference_strength), briefly explaining their purpose. Key parameters like prompt, model, dimensions, and inference steps are undocumented in both schema and description, leaving significant gaps in understanding parameter meanings and interactions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Generate images with a style/content reference image' and 'Uses the reference_image feature of flux-general to guide generation toward a similar style or content as the reference.' This specifies the verb (generate), resource (images), and key differentiator (reference image). However, it doesn't explicitly distinguish from siblings like 'generate_image' or 'generate_with_lora' beyond the reference aspect.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context: when you want to generate images guided by a reference image for style or content. It doesn't provide explicit guidance on when to use this vs. alternatives like 'generate_image' (no reference) or 'generate_with_lora' (different guidance method), nor does it mention exclusions or prerequisites. The context is clear but lacks comparative guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_outputsB
List all images previously saved in the output directory.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool lists images but doesn't describe traits like whether it's read-only, what happens if no images exist, the format of the output, or any rate limits. This leaves significant gaps for a tool with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core action ('List all images') and specifies the scope ('previously saved in the output directory'). There is zero waste, making it appropriately sized and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 0 parameters, 100% schema coverage, and an output schema exists, the description is minimally adequate. However, with no annotations and a simple purpose, it could benefit from more context (e.g., output format or error handling), but the presence of an output schema reduces the burden, making it just viable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, but it implicitly confirms no inputs are required by stating it lists 'all' images. This aligns well with the schema, justifying a high score.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('List') and resource ('images previously saved in the output directory'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'generate_image' or 'raw_generate' which might also produce images, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., that images must exist in the output directory), exclusions, or comparisons to siblings like 'edit_image' or 'generate_with_lora', leaving the agent to infer usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| body | Yes | ||
| filename | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions the tool submits requests to external endpoints, implying network calls and potential latency/errors, but lacks details on authentication needs, rate limits, or error handling. It adds some context about advanced use cases but doesn't fully cover behavioral traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose, followed by usage guidelines and parameter explanations in a structured 'Args:' section. Every sentence adds value without redundancy, making it efficiently sized and well-organized.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (3 parameters, nested objects, 0% schema coverage) and the presence of an output schema, the description is mostly complete. It covers purpose, usage, and key parameters but could improve by mentioning the optional 'filename' parameter or behavioral aspects like error handling, though the output schema mitigates some gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It explains the 'model' parameter as the endpoint ID with an example and 'body' as the full JSON request, adding meaning beyond the schema. However, it omits the optional 'filename' parameter, leaving a minor gap in coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Submit an arbitrary request') and resource ('any fal.ai model endpoint'), distinguishing it from sibling tools by mentioning advanced configurations not covered by other tools like ControlNet, IP-Adapter, multi-LoRA, and custom parameters.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use this tool ('for advanced configurations... that aren't covered by the other tools') and implies when not to use it (for simpler cases handled by siblings like edit_image, generate_image, etc.), providing clear context and alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v0.1.0- First observed
edit_image - First observed
generate_image - First observed
generate_with_lora - First observed
generate_with_reference - First observed
list_outputs - First observed
raw_generate
TDQS
Scored across 6 tools
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.
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.
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.
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
Related MCP Connectors
Generate AI images and videos from any compatible MCP client.
MCP server for Flux AI image generation
MCP server for NanoBanana AI image generation and editing
MCP server for Qwen Image 3 AI image generation
Related MCP Servers
- AlicenseCqualityDmaintenanceHigh-performance MCP server that enables generation of images and videos using FAL AI models with automatic downloads to your local machine.24358MIT
- AlicenseAqualityDmaintenanceAn MCP server that provides AI image generation and editing capabilities using Google's Gemini 2.5 Flash Image API. It allows users to create new images from text, modify existing files, and perform iterative edits through natural language prompts.6269MIT
- AlicenseBqualityDmaintenanceAn MCP server that integrates with fal.ai to provide AI agents with tools for image generation, text processing, audio synthesis, and model management via a unified interface.87MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that lets users and autonomous agents generate high-quality images in a chosen artistic style by automatically discovering and applying open-source LoRA models.1MIT