fal.ai MCP server
Community MCP server for fal.ai: generate and edit images, video, music, and audio with 600+ fast generative models from your agent.
fal-mcp-server is a well-maintained community MCP server for fal.ai, the platform for fast, serverless generative-media inference. It gives a coding agent a task-oriented toolbox over fal's 600+ models: create images from text, transform or edit existing images, remove backgrounds, upscale, inpaint with masks, compose layers, generate video from text or images, restyle video, and generate music — plus utility tools to discover models, get model recommendations, check pricing, and review usage.
Unlike thin pass-through wrappers, this server organizes fal's catalog into purpose-named tools (generate_image, edit_image, generate_video, generate_music, and so on) so the agent picks the right capability without memorizing model slugs, while list_models and recommend_model still expose the full catalog for advanced cases. It runs locally over stdio via uvx (uvx --from fal-mcp-server fal-mcp) and authenticates with a FAL_KEY from the fal.ai dashboard. Optional environment variables switch the transport between stdio, HTTP, and a dual mode, and set the host and port when you want to expose it as a shared HTTP endpoint for a team or agent fleet. It is published on PyPI and ships frequent releases.
Quick install
Copy-paste configs are provided for all 8 supported clients. Pick your client below.
Add to ~/.claude.json
{
"mcpServers": {
"fal": {
"command": "uvx",
"args": [
"--from",
"fal-mcp-server",
"fal-mcp"
],
"env": {
"FAL_KEY": "<FAL_KEY>",
"FAL_MCP_TRANSPORT": "<FAL_MCP_TRANSPORT>"
}
}
}
}claude mcp add fal -- uvx --from fal-mcp-server fal-mcpAvailable tools
| Tool | Description |
|---|---|
| generate_image | Create images from a text prompt. |
| generate_image_structured | Generate images with fine-grained composition control. |
| generate_image_from_image | Transform an input image with style transfer or image-to-image generation. |
| remove_background | Remove the background from an image and return a transparent PNG. |
| upscale_image | Upscale an image 2x or 4x. |
| edit_image | Edit an image using a natural-language instruction. |
| inpaint_image | Edit specific regions of an image using a mask. |
| resize_image | Smart-resize an image for social media and other target dimensions. |
| compose_images | Overlay and composite multiple images with precise positioning. |
| generate_video | Generate video from text or from an image. |
| generate_video_from_image | Animate a still image into a video. |
| generate_video_from_video | Restyle a video or transfer motion between videos. |
| generate_music | Create instrumental music or songs with vocals from a prompt. |
| list_models | Discover the 600+ available fal.ai models with filtering. |
| recommend_model | Get AI-powered model recommendations for a given task. |
| get_pricing | Check the generation cost for a model or request. |
| get_usage | View your fal.ai spending history and usage statistics. |
| upload_file | Upload a local file to the fal.ai CDN for use in generation tasks. |
Required configuration
- FAL_KEYRequired
fal.ai API key from fal.ai/dashboard/keys. Required.
- FAL_MCP_TRANSPORTOptional
Transport mode: 'stdio', 'http', or 'dual'. Optional; defaults to http.
- FAL_MCP_HOSTOptional
Host to bind when running in HTTP mode. Optional; defaults to 0.0.0.0.
- FAL_MCP_PORTOptional
Port to listen on in HTTP mode. Optional; defaults to 8080.
- FAL_MCP_DEBUGOptional
Enable verbose logging. Optional.
What you can do with it
Generate and edit media in one agent loop
The agent generates an image from a prompt, removes its background, upscales it 4x, and composes it onto another layer — chaining generate_image, remove_background, upscale_image, and compose_images without you switching tools or memorizing model names.
Produce video and music for a project
Hand the agent a script idea and let it call generate_video and generate_music, checking get_pricing first so the cost is known up front and get_usage afterward to track spend.
FAQ
- Is it free?
- The MCP server is open source and free to run, but it calls fal.ai's inference API, which is paid and billed per generation against your FAL_KEY. Use get_pricing to estimate a request's cost before running it.
- Does it support remote/OAuth?
- There is no OAuth flow; it authenticates with a FAL_KEY. The default transport is HTTP, but for editor and desktop MCP clients set FAL_MCP_TRANSPORT=stdio and run it via uvx. You can also expose it as a shared HTTP endpoint by setting the host and port.