🎨 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
🖼️ Image Generation - Create images using Flux, SDXL, and other models
🎬 Video Generation - Generate videos from images or text prompts
🎵 Music Generation - Create music from text descriptions
🗣️ Text-to-Speech - Convert text to natural speech
📝 Audio Transcription - Transcribe audio using Whisper
⬆️ Image Upscaling - Enhance image resolution
🔄 Image-to-Image - Transform existing images with prompts
🚀 Quick Start
Prerequisites
Python 3.10 or higher
Fal.ai API key (free tier available)
Claude Desktop (or any MCP-compatible client)
Installation
Option 1: Docker (Recommended for Production) 🐳
Official Docker image available on GitHub Container Registry:
Or use Docker Compose:
Option 2: Install from PyPI
Or with uv:
Option 3: Install from source
Configuration
Get your Fal.ai API key from fal.ai
Configure Claude Desktop by adding to:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
For Docker Installation:
For PyPI Installation:
For Source Installation:
Restart Claude Desktop
💬 Usage
With Claude Desktop
Once configured, ask Claude to:
"Generate an image of a sunset"
"Create a video from this image"
"Generate 30 seconds of ambient music"
"Convert this text to speech"
"Transcribe this audio file"
HTTP/SSE Transport (New!)
Run the server with HTTP transport for web-based access:
Connect from web clients via Server-Sent Events:
SSE endpoint:
http://localhost:8080/sse(Docker) orhttp://localhost:8000/sse(pip)Message endpoint:
POST http://localhost:8080/messages/
See Docker Documentation and HTTP Transport Documentation for details.
📦 Supported Models
Image Models
flux_schnell- Fast high-quality generationflux_dev- Development version with more controlsdxl- Stable Diffusion XL
Video Models
svd- Stable Video Diffusionanimatediff- Text-to-video animation
Audio Models
musicgen- Music generationbark- Text-to-speechwhisper- Audio transcription
🤝 Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Local Development
We support local CI testing with act:
📝 License
MIT License - see LICENSE file for details.
🙏 Acknowledgments
Related MCP Servers
- AsecurityAlicenseAqualityA MCP server that enables Claude and other MCP-compatible assistants to generate images from text prompts using Together AI's image generation models.Last updated -4MIT License
- -securityFlicense-qualityAn MCP server that connects Claude to FL Studio, allowing the AI to compose music, control instruments, and live record melodies, chords, and drums to the piano roll.Last updated -61
- -security-license-qualityProvides AI-powered visual analysis capabilities for Claude and other MCP-compatible AI assistants, allowing them to capture and analyze screenshots, perform file operations, and generate UI/UX reports.
- AsecurityAlicenseAqualityAn MCP server that allows Claude to use OpenAI's image generation capabilities (gpt-image-1) to create image assets for users, which is particularly useful for game and web development projects.Last updated -113MIT License