BeClaude

fal-ai

New
43Community RegistryGeneralby Raveen Beemsingh ยท MIT

Generate images, videos, and music using 600+ Fal.ai models. Supports Flux, SDXL, Kling Video, MusicGen, and more.

First seen 6/6/2026

Overview

![CI](https://github.com/raveenb/fal-mcp-server/actions/workflows/ci.yml) ![Docker](https://github.com/raveenb/fal-mcp-server/actions/workflows/docker.yml) ![MCP](https://modelcontextprotocol.io) ![GitHub Release](https://github.com/raveenb/fal-mcp-server/releases) ![PyPI](https://pypi.org/project/fal-mcp-server/) ![Docker Image](https://github.com/raveenb/fal-mcp-server/pkgs/container/fal-mcp-server) ![Python](https://www.python.org) ![License](LICENSE)

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.

<a href="https://glama.ai/mcp/servers/@raveenb/fal-mcp-server"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@raveenb/fal-mcp-server/badge" alt="Fal.ai Server MCP server" /> </a>

โœจ 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

If you're using Claude Code, install directly via the plugin system:

bash
# 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:

bash
/plugin install fal-ai@raveenb/fal-mcp-server

Note: You'll need to set FAL_KEY in your environment before using the plugin.

Run directly without installation using uv:

bash
# 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:

json
{
  "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

Official Docker image available on GitHub Container Registry.

Step 1: Start the Docker container

bash
# Pull and run with your API key
docker run -d \
  --name fal-mcp \
  -e FAL_KEY=your-api-key \
  -p 8080:8080 \
  ghcr.io/raveenb/fal-mcp-server:latest

# Verify it's running
docker logs fal-mcp

Step 2: Configure Claude Desktop to connect

Add to your Claude Desktop config file:

  • โ€ขmacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • โ€ขWindows: %APPDATA%\Claude\claude_desktop_config.json
json
{
  "mcpServers": {
    "fal-ai": {
      "command": "npx",
      "args": ["mcp-remote", "http://localhost:8080/sse"]
    }
  }
}

Note: This uses mcp-remote to connect to the HTTP/SSE endpoint. Alternatively, if you have curl available: "command": "curl", "args": ["-N", "http://localhost:8080/sse"]

Step 3: Restart Claude Desktop

The fal-ai tools should now be available.

Docker Environment Variables:

VariableDefaultDescription
FAL_KEY(required)Your Fal.ai API key
FAL_MCP_TRANSPORThttpTransport mode: http, stdio, or dual
FAL_MCP_HOST0.0.0.0Host to bind the server to
FAL_MCP_PORT8080Port for the HTTP server

Using Docker Compose:

bash
curl -O https://raw.githubusercontent.com/raveenb/fal-mcp-server/main/docker-compose.yml
echo "FAL_KEY=your-api-key" > .env
docker-compose up -d

โš ๏ธ File Upload with Docker:

The upload_file tool requires volume mounts to access host files:

bash
docker run -d -p 8080:8080 \
  -e FAL_KEY="${FAL_KEY}" \
  -e FAL_MCP_TRANSPORT=http \
  -v ${HOME}/Downloads:/downloads:ro \
  -v ${HOME}/Pictures:/pictures:ro \
  ghcr.io/raveenb/fal-mcp-server:latest

Then use container paths like /downloads/image.png instead of host paths.

Featurestdio (uvx)Docker (HTTP/SSE)
upload_fileโœ… Full filesystemโš ๏ธ Needs volume mounts
SecurityRuns as userSandboxed container
bash
pip install fal-mcp-server

Or with uv:

bash
uv pip install fal-mcp-server
bash
git clone https://github.com/raveenb/fal-mcp-server.git
cd fal-mcp-server
pip install -e .

Configuration

  1. Get your Fal.ai API key from fal.ai
  1. Configure Claude Desktop by adding to:

- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json - Windows: %APPDATA%\Claude\claude_desktop_config.json

json
{
  "mcpServers": {
    "fal-ai": {
      "command": "fal-mcp",
      "env": {
        "FAL_KEY": "your-fal-api-key"
      }
    }
  }
}

Note: For Docker configuration, see Option 2: Docker above.

json
{
  "mcpServers": {
    "fal-ai": {
      "command": "python",
      "args": ["/path/to/fal-mcp-server/src/fal_mcp_server/server.py"],
      "env": {
        "FAL_KEY": "your-fal-api-key"
      }
    }
  }
}
  1. 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"

Discovering Available Models

Use the list_models tool to discover available models:

  • โ€ข"What image models are available?"
  • โ€ข"List video generation models"
  • โ€ข"Search for flux models"

Using Any Fal.ai Model

You can use any model from the Fal.ai platform:

code
# Using a friendly alias (backward compatible)
"Generate an image with flux_schnell"

# Using a full model ID (new capability)
"Generate an image using fal-ai/flux-pro/v1.1-ultra"
"Create a video with fal-ai/kling-video/v1.5/pro"

HTTP/SSE Transport (New!)

Run the server with HTTP transport for web-based access:

bash
# Using Docker (recommended)
docker run -d -e FAL_KEY=your-key -p 8080:8080 ghcr.io/raveenb/fal-mcp-server:latest

# Using pip installation
fal-mcp-http --host 0.0.0.0 --port 8000

# Or dual mode (STDIO + HTTP)
fal-mcp-dual --transport dual --port 8000

Connect from web clients via Server-Sent Events:

  • โ€ขSSE endpoint: http://localhost:8080/sse (Docker) or http://localhost:8000/sse (pip)
  • โ€ขMessage endpoint: POST http://localhost:8080/messages/

See Docker Documentation and HTTP Transport Documentation for details.

๐Ÿ“ฆ Supported Models

This server supports 600+ models from the Fal.ai platform through dynamic discovery. Use the list_models tool to explore available models, or use any model ID directly.

Popular Aliases (Quick Reference)

These friendly aliases are always available for commonly used models:

AliasModel IDType
flux_schnellfal-ai/flux/schnellImage
flux_devfal-ai/flux/devImage
flux_profal-ai/flux-proImage
sdxlfal-ai/fast-sdxlImage
stable_diffusionfal-ai/stable-diffusion-v3-mediumImage
svdfal-ai/stable-video-diffusionVideo
animatedifffal-ai/fast-animatediffVideo
klingfal-ai/kling-videoVideo
musicgenfal-ai/musicgen-mediumAudio
musicgen_largefal-ai/musicgen-largeAudio
barkfal-ai/barkAudio
whisperfal-ai/whisperAudio

Using Full Model IDs

You can also use any model directly by its full ID:

python
# Examples of full model IDs
"fal-ai/flux-pro/v1.1-ultra"      # Latest Flux Pro
"fal-ai/kling-video/v1.5/pro"     # Kling Video Pro
"fal-ai/hunyuan-video"            # Hunyuan Video
"fal-ai/minimax-video"            # MiniMax Video

Use list_models with category filters to discover more:

  • โ€ขlist_models(category="image") - All image generation models
  • โ€ขlist_models(category="video") - All video generation models
  • โ€ขlist_models(category="audio") - All audio models
  • โ€ขlist_models(search="flux") - Search for specific models

๐Ÿ“š Documentation

GuideDescription
Installation GuideDetailed setup instructions for all platforms
API ReferenceComplete tool documentation with parameters
ExamplesUsage examples for image, video, and audio generation
Docker GuideContainer deployment and configuration
HTTP TransportWeb-based SSE transport setup
Local TestingRunning CI locally with act

๐Ÿ“– Full documentation site: raveenb.github.io/fal-mcp-server

๐Ÿ”Œ Claude Code Plugin Marketplace

This project is part of the Luminary Lane Tools marketplace for Claude Code plugins.

Add the marketplace:

bash
/plugin marketplace add raveenb/fal-mcp-server

Available plugins:

PluginDescription
fal-aiGenerate images, videos, and music using 600+ Fal.ai models

More plugins coming soon!

๐Ÿ”ง Troubleshooting

Common Errors

code
Error: FAL_KEY environment variable is required

Solution: Set your Fal.ai API key:

bash
export FAL_KEY="your-api-key"
code
Error: Model 'xyz' not found

Solution: Use list_models to discover available models, or check the model ID spelling.

code
Error: File not found: /Users/username/image.png

Solution: When using Docker, mount the directory as a volume. See File Upload with Docker above.

code
Error: Generation timed out after 300s

Solution: Video and music generation can take several minutes. This is normal for high-quality models. Try:

  • โ€ขUsing a faster model variant (e.g., schnell instead of pro)
  • โ€ขReducing duration or resolution
code
Error: Rate limit exceeded

Solution: Wait a few minutes and retry. Consider upgrading your Fal.ai plan for higher limits.

Debug Mode

Enable verbose logging for troubleshooting:

bash
# Set debug environment variable
export FAL_MCP_DEBUG=true

# Run the server
fal-mcp

Reporting Issues

If you encounter a bug or unexpected behavior:

  1. Check existing issues: GitHub Issues
  1. Gather information:

- Error message (full text) - Steps to reproduce - Model ID used - Environment (OS, Python version, transport mode)

  1. Open a new issue with:

`` **Error:** [paste error message] **Steps to reproduce:** [what you did] **Model:** [model ID if applicable] **Environment:** [OS, Python version, Docker/uvx/pip] ``

  1. Include logs if available (with sensitive data removed)

๐Ÿ“ Open an Issue

๐Ÿค Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Local Development

We support local CI testing with act:

bash
# Quick setup
make ci-local  # Run CI locally before pushing

# See detailed guide
cat docs/LOCAL_TESTING.md

๐Ÿ“ License

MIT License - see LICENSE file for details.

๐Ÿ™ Acknowledgments

  • โ€ขFal.ai for providing the AI models
  • โ€ขAnthropic for the MCP specification

Hosted deployment

A hosted deployment is available on Fronteir AI.

Install & Usage

1
Open your MCP config
~/.claude.json
2
Add the server config

Add the configuration to "mcpServers": { "fal-ai": { "command": "...", "args": [] } }

3
Restart Claude Code
/mcp
View source on GitHub
falaiimage-generationvideo-generationmusic-generationfluxsdxlkling

Security Audits

LicensePassSourceWarnRepositoryPass

Frequently Asked Questions

What is fal-ai?

Generate images, videos, and music using 600+ Fal.ai models. Supports Flux, SDXL, Kling Video, MusicGen, and more.

How to install fal-ai?

To install fal-ai: open your mcp config (~/.claude.json), then add the config to "mcpServers": { "fal-ai": { "command": "...", "args": [] } }. Finally, /mcp in Claude Code.

What is fal-ai best for?

fal-ai is a mcp categorized under General. It is designed for: fal, ai, image-generation, video-generation, music-generation, flux, sdxl, kling. Created by Raveen Beemsingh.