🎨 Fal.ai MCP Server

A Model Context Protocol (MCP) server that enables Claude Desktop (and other MCP clients) to generate images, videos, music, and audio using Fal.ai models.
✨ Features
🚀 Performance
- Native Async API - Uses fal_client.run_async() for optimal performance
- Queue Support - Long-running tasks (video/music) use queue API with progress updates
- Non-blocking - All operations are truly asynchronous
🌐 Transport Modes (New!)
- STDIO - Traditional Model Context Protocol communication
- HTTP/SSE - Web-based access via Server-Sent Events
- Dual Mode - Run both transports simultaneously
🎨 Media Generation (18 Tools)
Image Generation:
- 🖼️ generate_image - Create images from text prompts (Flux, SDXL, etc.)
- 🎯 generate_image_structured - Fine-grained control over composition, lighting, subjects
- 🔄 generate_image_from_image - Transform existing images with style transfer
Image Editing:
- ✂️ remove_background - Remove backgrounds from images (transparent PNG)
- 🔍 upscale_image - Upscale images 2x or 4x while preserving quality
- ✏️ edit_image - Edit images using natural language instructions
- 🎭 inpaint_image - Edit specific regions using masks
- 📐 resize_image - Smart resize for social media (Instagram, YouTube, TikTok, etc.)
- 🏷️ compose_images - Overlay images (watermarks, logos) with precise positioning
Video Tools:
- 🎬 generate_video - Text-to-video and image-to-video generation
- 📹 generate_video_from_image - Animate images into videos
- 🔀 generate_video_from_video - Video restyling and motion transfer
Audio Tools:
- 🎵 generate_music - Create instrumental music or songs with vocals
Utility Tools:
- 🔍 list_models - Discover 600+ available models with smart filtering
- 💡 recommend_model - AI-powered model recommendations for your task
- 💰 get_pricing - Check costs before generating content
- 📊 get_usage - View spending history and usage stats
- ⬆️ upload_file - Upload local files for use with generation tools
🔍 Dynamic Model Discovery (New!)
- 600+ Models - Access all models available on Fal.ai platform
- Auto-Discovery - Models are fetched dynamically from the Fal.ai API
- Smart Caching - TTL-based cache for optimal performance
- Flexible Input - Use full model IDs or friendly aliases
🚀 Quick Start
Prerequisites
- Python 3.10 or higher
- Fal.ai API key (free tier available)
- Claude Desktop (or any MCP-compatible client)
Installation
Option 0: Claude Code Plugin (Simplest for Claude Code Users) 🔌
If you're using Claude Code, install directly via the plugin system:
# Add the Luminary Lane Tools marketplace
/plugin marketplace add raveenb/fal-mcp-server
# Install the fal-ai plugin
/plugin install fal-ai@luminary-lane-tools
Or install directly without adding the marketplace:
/plugin install fal-ai@raveenb/fal-mcp-server
Note: You'll need to set FAL_KEY in your environment before using the plugin.
Option 1: uvx (Recommended - Zero Install) ⚡
Run directly without installation using uv:
# Run the MCP server directly
uvx --from fal-mcp-server fal-mcp
# Or with specific version
uvx --from fal-mcp-server==1.4.0 fal-mcp
Claude Desktop Configuration for uvx:
{
"mcpServers": {
"fal-ai": {
"command": "uvx",
"args": ["--from", "fal-mcp-server", "fal-mcp"],
"env": {
"FAL_KEY": "your-fal-api-key"
}
}
}
}
Note: Install uv first: curl -LsSf https://astral.sh/uv/install.sh | sh
Option 2: Docker (Recommended for Production) 🐳