Skip to main content
Glama
FAL Image/Video MCP Server

FAL Image/Video MCP Server

by RamboRogers

FAL Image/Video MCP Server 🎨🎬

High-performance MCP server for FAL AI image and video generation with automatic downloads

Version Platform Support License TypeScript MCP Compatible

Seamless bridge between FAL AI's powerful image and video generation capabilities and MCP-compatible clients like Claude. All generated content is automatically downloaded to your local machine while providing public URLs, data URLs, and local file paths.

Make Images Example of MCP

Make Videos Example of MCP

🚀 Claude Desktop Setup

Quick Setup

  1. Get your FAL API key from fal.ai

  2. Add to Claude Desktop configuration:

{
  "mcpServers": {
    "fal-image-video": {
      "command": "npx",
      "args": ["-y", "fal-image-video-mcp"],
      "env": {
        "FAL_KEY": "YOUR-FAL-AI-API-KEY"
      }
    }
  }
}

Configuration File Locations

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%/Claude/claude_desktop_config.json

  • Linux: ~/.config/Claude/claude_desktop_config.json

Optimized for Claude Desktop

{
  "mcpServers": {
    "fal-image-video": {
      "command": "npx",
      "args": ["-y", "fal-image-video-mcp"],
      "env": {
        "FAL_KEY": "YOUR-FAL-AI-API-KEY",
        "DOWNLOAD_PATH": "/custom/download/path",
        "ENABLE_DATA_URLS": "true",
        "MAX_DATA_URL_SIZE": "1048576",
        "AUTOOPEN": "false"
      }
    }
  }
}

Environment Variables:

  • FAL_KEY (required): Your FAL AI API key

  • DOWNLOAD_PATH (optional): Custom download directory (defaults to ~/Downloads)

  • ENABLE_DATA_URLS (optional): Enable/disable data URLs (default: false, optimized for Claude Desktop)

  • MAX_DATA_URL_SIZE (optional): Max file size for data URLs in bytes (default: 2MB)

  • AUTOOPEN (optional): Automatically open generated files with default application (default: true, cross-platform)

Getting Your FAL API Key

  1. Visit fal.ai and create an account

  2. Navigate to your API keys section

  3. Generate a new API key

  4. Replace YOUR-FAL-AI-API-KEY with your actual key

  5. Restart Claude Desktop

Related MCP server: @monsoft/mcp-fal-ai

📥 Automatic Downloads

All generated content is automatically saved to your local machine!

Default Behavior:

  • Images: Downloaded as .jpg files

  • Videos: Downloaded as .mp4 files

  • Location: ~/Downloads folder (or custom DOWNLOAD_PATH)

  • Naming: fal_{model}_{timestamp}_{index}.{ext}

🎯 Claude Desktop Optimized Response:

{
  "images": [
    {
      "url": "https://fal-storage.../image.jpg",
      "localPath": "/Users/you/Downloads/fal_imagen4_2025-01-06T12-30-45-123Z.jpg",
      "width": 1024,
      "height": 1024
    }
  ],
  "download_path": "/Users/you/Downloads",
  "data_url_settings": {
    "enabled": false,
    "max_size_mb": 2,
    "note": "Data URLs disabled by default for Claude Desktop optimization"
  },
  "autoopen_settings": {
    "enabled": true,
    "note": "Files automatically opened with default application"
  }
}

Why this works better for Claude Desktop:

  • ✅ Local file paths allow Claude to directly access downloaded images

  • ✅ No large data URLs that overwhelm the context

  • ✅ Auto-open files instantly display generated content in default applications

  • ✅ Public URLs available for sharing if needed

  • ✅ Size limits prevent context overflow


✨ Features

Category

Features

🎨 Image Generation

8 curated models including Imagen 4, FLUX Kontext Pro, Ideogram V3

🎬 Video Generation

7 text-to-video models including Veo 3, Kling 2.1 Master, Pixverse V4.5

🔄 Image-to-Video

6 image-to-video models for animating static images

📥 Auto Downloads

All content automatically saved locally with custom path support

🔗 Triple URL Support

Public URLs, Data URLs, and Local file paths

🚀 Universal Execution

Run any FAL model beyond the curated registry

🌐 Multi-Transport

stdio (Claude Desktop) + HTTP/SSE (Smithery/Web)

🔐 Lazy Authentication

Discover tools without API key, authenticate on use

⚡ Performance

TypeScript implementation, async operations, error handling


🚀 Version History

Version 1.0.0

  • ✅ Initial release with FAL AI integration

  • ✅ Image generation with Flux models

  • ✅ Video generation with Minimax

  • ✅ Data URL conversion for MCP compatibility

  • ✅ TypeScript support

  • ✅ NPX deployment ready

Coming Soon

  • 🔜 Additional FAL models

  • 🔜 Batch processing

  • 🔜 Enhanced error handling

  • 🔜 Performance optimizations


🏗️ Technical Architecture

Component

Technology

Purpose

Backend

TypeScript + Node.js

Core server implementation

AI Client

@fal-ai/client

FAL API integration

MCP SDK

@modelcontextprotocol/sdk

MCP protocol compliance

Transport

stdio / HTTP + SSE

Multi-transport communication

Build System

TypeScript Compiler

Production builds

Deployment

npm / Docker / Smithery

Multiple deployment options


📖 Usage

Available Tools

🎨 Image Generation Models (8 Available)

The server dynamically loads the latest available models from FAL AI. Current models include:

imagen4 - Imagen 4

Google's latest text-to-image model with superior quality.

{
  "tool": "imagen4",
  "arguments": {
    "prompt": "A photorealistic mountain landscape at golden hour",
    "image_size": "landscape_16_9"
  }
}

flux_kontext - FLUX Kontext Pro

State-of-the-art prompt adherence and typography generation.

{
  "tool": "flux_kontext",
  "arguments": {
    "prompt": "Modern logo design with the text 'AI Studio'",
    "num_inference_steps": 25
  }
}

ideogram_v3 - Ideogram V3

Advanced typography and realistic outputs.

{
  "tool": "ideogram_v3",
  "arguments": {
    "prompt": "Vintage poster with text 'Retro Café'",
    "negative_prompt": "blurry, low quality"
  }
}

recraft_v3 - Recraft V3

Professional design and illustration capabilities.

{
  "tool": "recraft_v3",
  "arguments": {
    "prompt": "Minimalist icon design for a mobile app",
    "image_size": "square_hd"
  }
}

Other Available Models:

  • stable_diffusion_35 - Stable Diffusion 3.5 Large

  • flux_dev - FLUX Dev (High-quality 12B parameter model)

  • hidream - HiDream I1 (High-resolution generation)

  • janus - Janus (Multimodal understanding)

🎬 Image-to-Video Models (6 Available)

kling_master_image - Kling 2.1 Master I2V

Premium image-to-video conversion with motion fluidity.

{
  "tool": "kling_master_image",
  "arguments": {
    "image_url": "https://example.com/landscape.jpg",
    "prompt": "Gentle wind blowing through the trees",
    "duration": 5
  }
}

pixverse_image - Pixverse V4.5 I2V

Advanced image-to-video with high quality output.

{
  "tool": "pixverse_image",
  "arguments": {
    "image_url": "https://example.com/portrait.jpg",
    "prompt": "Person looking around and smiling",
    "aspect_ratio": "16:9"
  }
}

wan_pro_image - Wan Pro I2V

Professional image animation with effects.

{
  "tool": "wan_pro_image",
  "arguments": {
    "image_url": "https://example.com/scene.jpg",
    "prompt": "Camera slowly panning across the scene"
  }
}

Other Available Models:

  • hunyuan_image - Hunyuan I2V (Open-source)

  • vidu_image - Vidu I2V (High-quality animation)

  • luma_ray2_image - Luma Ray 2 I2V (Latest Luma)

📹 Text-to-Video Models (7 Available)

veo3 - Veo 3

Google DeepMind's latest with speech and audio capabilities.

{
  "tool": "veo3",
  "arguments": {
    "prompt": "A serene mountain lake with gentle ripples at sunrise",
    "duration": 10,
    "aspect_ratio": "16:9"
  }
}

kling_master_text - Kling 2.1 Master

Premium text-to-video with motion fluidity and cinematic quality.

{
  "tool": "kling_master_text",
  "arguments": {
    "prompt": "A cat playing with a ball of yarn in slow motion",
    "duration": 6,
    "aspect_ratio": "16:9"
  }
}

pixverse_text - Pixverse V4.5

Advanced text-to-video generation with precise control.

{
  "tool": "pixverse_text",
  "arguments": {
    "prompt": "Ocean waves crashing on a rocky shore at sunset",
    "duration": 8
  }
}

luma_ray2 - Luma Ray 2

Latest Luma Dream Machine with enhanced capabilities.

{
  "tool": "luma_ray2",
  "arguments": {
    "prompt": "A field of flowers swaying in the breeze",
    "aspect_ratio": "16:9"
  }
}

Other Available Models:

  • magi - Magi (Creative video generation)

  • wan_pro_text - Wan Pro (Professional video effects)

  • vidu_text - Vidu Q1 (High-quality text-to-video)

🔄 Image-to-Video Workflow

Yes! You can absolutely pass generated images back to Claude and use them for video generation. Here's how:

  1. Generate an image using any image model:

{
  "tool": "imagen4",
  "arguments": {
    "prompt": "A majestic mountain landscape at sunset"
  }
}
  1. Use the returned image URL in any image-to-video model:

{
  "tool": "kling_master_image",
  "arguments": {
    "image_url": "<URL_FROM_PREVIOUS_GENERATION>",
    "prompt": "Gentle clouds moving across the sky",
    "duration": 5
  }
}

🔧 Advanced Model System

This MCP server features comprehensive model access:

📋 Model Discovery

Use list_available_models to see all models in the registry:

{
  "tool": "list_available_models",
  "arguments": {
    "category": "imageGeneration"
  }
}

🚀 Universal Model Execution

Use execute_custom_model to run ANY FAL endpoint beyond our registry:

{
  "tool": "execute_custom_model",
  "arguments": {
    "endpoint": "fal-ai/custom-model-name",
    "input_params": {
      "prompt": "Your custom prompt",
      "custom_param": "value"
    },
    "category_hint": "image"
  }
}

✨ Smart Features:

  • ✅ 21 curated models from actual FAL AI platform

  • ✅ Universal execution for any FAL endpoint

  • ✅ Automatic downloading to ~/Downloads (configurable)

  • ✅ Triple URL support (public + data + local file URLs)

  • ✅ Automatic categorization by type

  • ✅ Dynamic tool generation for each model

  • ✅ Model-specific parameter handling

🎯 No Limitations:

  • Want to use a model not in our registry? Use execute_custom_model

  • Need to see all available models? Use list_available_models

  • Want both curated experience AND full flexibility? You got it!

The MCP server provides both public URLs and data URLs for maximum compatibility with Claude and other clients.

Response Format

Both tools return structured JSON with:

  • Public URL: Direct link to the generated content

  • Data URL: Base64-encoded data URL for direct embedding

  • Metadata: Generation parameters and dimensions

  • Claude-compatible format: Ready for immediate use in conversations

Example Response:

{
  "model": "fal-ai/flux/schnell",
  "prompt": "A majestic dragon...",
  "images": [
    {
      "url": "https://storage.googleapis.com/fal-flux-storage/...",
      "dataUrl": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...",
      "width": 1024,
      "height": 768
    }
  ],
  "metadata": {
    "image_size": "landscape_4_3",
    "num_inference_steps": 4,
    "guidance_scale": 3.5
  }
}

🔧 Alternative Installation Methods

🌐 HTTP Server Mode (Standalone Testing)

Start HTTP server for testing or integration:

# Start on auto-detected port (default: 3000)
npx -y fal-image-video-mcp --http

# Or specify port via environment
PORT=8080 npx -y fal-image-video-mcp --http

# With custom transport flag
MCP_TRANSPORT=http npx -y fal-image-video-mcp

HTTP Endpoints:

  • GET /health - Server health check

  • GET /mcp - SSE endpoint for MCP communication

  • POST /mcp - JSON-RPC message handling

Test the server:

# Health check
curl http://localhost:3000/health

# List available tools
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {}}'

🎯 Authentication in HTTP Mode

Lazy Loading Support:

  • ✅ Server starts without FAL_KEY (for tool discovery)

  • ✅ API key validated only when tools are invoked

  • ✅ Clear error messages for missing authentication

Set your FAL_KEY:

# Via environment variable
FAL_KEY=your-api-key npx fal-image-video-mcp --http

# Or configure in your deployment platform
export FAL_KEY=your-api-key
npx fal-image-video-mcp --http

Production deployment example:

# Dockerfile
FROM node:18-slim
ENV FAL_KEY=your-api-key
ENV PORT=3000
RUN npx -y fal-image-video-mcp --http
EXPOSE 3000

📱 NPX (One-time use)

# Stdio mode (Claude Desktop)
npx -y fal-image-video-mcp

# HTTP mode (Testing/Smithery)
npx -y fal-image-video-mcp --http

🔧 Global Installation

npm install -g fal-image-video-mcp

# Run in different modes
fal-image-video-mcp              # Stdio mode
fal-image-video-mcp --http       # HTTP mode

💻 From Source

git clone https://github.com/RamboRogers/fal-image-video-mcp.git
cd fal-image-video-mcp
npm install
npm run build

# Choose your transport
npm start                    # Stdio mode
npm start -- --http         # HTTP mode

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

GPLv3 License


🌐 Connect

GitHub Website Email

Created by Matthew Rogers - Bringing AI creativity to MCP clients everywhere! 🚀

Available Tools

24 tools
execute_custom_modelC

Execute any FAL model by specifying the endpoint directly

Inputs: endpoint (required), input_params (required), category_hint.

flux_devD

FLUX Dev - High-quality 12B parameter model

Inputs: prompt (required), image_size, num_images, num_inference_steps, +1 more.

flux_kontextD

FLUX Kontext Pro - State-of-the-art prompt adherence and typography

Inputs: prompt (required), image_size, num_images, num_inference_steps, +1 more.

hidreamC

HiDream I1 - High-resolution image generation

Inputs: prompt (required), image_size, num_images.

hunyuan_imageC

Hunyuan I2V - Open-source image-to-video

Inputs: image_url (required), prompt (required), duration, aspect_ratio, +2 more.

ideogram_v3C

Ideogram V3 - Advanced typography and realistic outputs

Inputs: prompt (required), image_size, num_images, negative_prompt.

imagen4C

Imagen 4 - Google's latest text-to-image model

Inputs: prompt (required), image_size, num_images.

janusC

Janus - Multimodal understanding and generation

Inputs: prompt (required), image_size, num_images.

kling_master_imageC

Kling 2.1 Master I2V - Premium image-to-video conversion

Inputs: image_url (required), prompt (required), duration, aspect_ratio, +2 more.

kling_master_textC

Kling 2.1 Master - Premium text-to-video with motion fluidity

Inputs: prompt (required), duration, aspect_ratio.

list_available_modelsC

List all available models in the current registry with their capabilities

Inputs: category.

ltx_videoC

LTX Video - Fast and high-quality image-to-video conversion

Inputs: image_url (required), prompt (required), duration, aspect_ratio, +2 more.

luma_ray2D

Luma Ray 2 - Latest Luma Dream Machine

Inputs: prompt (required), duration, aspect_ratio.

luma_ray2_imageC

Luma Ray 2 I2V - Latest Luma image-to-video

Inputs: image_url (required), prompt (required), duration, aspect_ratio, +2 more.

magiC

Magi - Creative video generation

Inputs: prompt (required), duration, aspect_ratio.

pixverse_imageC

Pixverse V4.5 I2V - Advanced image-to-video

Inputs: image_url (required), prompt (required), duration, aspect_ratio, +2 more.

pixverse_textC

Pixverse V4.5 - Advanced text-to-video generation

Inputs: prompt (required), duration, aspect_ratio.

recraft_v3C

Recraft V3 - Professional design and illustration

Inputs: prompt (required), image_size, num_images.

stable_diffusion_35C

Stable Diffusion 3.5 Large - Improved image quality and performance

Inputs: prompt (required), image_size, num_images, num_inference_steps, +2 more.

veo3D

Veo 3 - Google DeepMind's latest with speech and audio

Inputs: prompt (required), duration, aspect_ratio.

vidu_imageC

Vidu I2V - High-quality image animation

Inputs: image_url (required), prompt (required), duration, aspect_ratio, +2 more.

vidu_textC

Vidu Q1 - High-quality text-to-video

Inputs: prompt (required), duration, aspect_ratio.

wan_pro_imageC

Wan Pro I2V - Professional image animation

Inputs: image_url (required), prompt (required), duration, aspect_ratio, +2 more.

wan_pro_textD

Wan Pro - Professional video effects

Inputs: prompt (required), duration, aspect_ratio.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.6/5.0

    Scored across 24 tools

    Disambiguation3/5

    Most tools are clearly distinguished by model name and type (e.g., text-to-image vs. image-to-video), but there is some functional overlap between models like 'flux_dev' and 'stable_diffusion_35' for image generation, and multiple image-to-video tools (e.g., 'hunyun_image', 'kling_master_image', 'luma_ray2_image') that could cause confusion without detailed descriptions of their specific capabilities. The 'execute_custom_model' tool adds ambiguity as it could potentially duplicate any other model's function.

    Naming Consistency4/5

    Naming is mostly consistent with a clear pattern of using model names (e.g., 'flux_dev', 'imagen4') or descriptive phrases (e.g., 'list_available_models'), but there are minor deviations such as mixed use of underscores and spaces (e.g., 'flux_dev' vs. 'flux_kontext' is consistent, but 'kling_master_image' vs. 'kling_master_text' shows slight inconsistency in abbreviation handling). Overall, the naming is readable and follows a predictable structure.

    Tool Count3/5

    With 24 tools, the count is borderline high for an image/video generation server, as it includes many specific models that might be better grouped or parameterized. While it covers a wide range of models, it risks being overwhelming and could feel heavy for agents to navigate efficiently, though it aligns with the server's purpose of providing access to multiple AI models.

    Completeness4/5

    The tool set is quite complete for its domain, offering a variety of text-to-image, image-to-video, and text-to-video models, along with utility tools like 'list_available_models' and 'execute_custom_model'. However, there are minor gaps such as the lack of tools for editing or post-processing generated media, which could limit advanced workflows, but core generation tasks are well-covered.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers