fal-ai-mcp-server

fal-ai-mcp-server

An MCP server that gives Claude access to fal.ai generative AI models for images, videos, audio, and 3D content generation and editing.

Category
访问服务器

README

fal.ai MCP Server

An MCP (Model Context Protocol) server that gives Claude access to fal.ai generative AI models — images, videos, audio, 3D models, and more.

Built with FastMCP. Works with Claude Code and Claude Desktop.

Model Catalog

Image Generation (10 models)

Short Name Model Description Price
flux-dev FLUX.1 Dev High-quality balanced generation ~$0.025/image
flux-schnell FLUX.1 Schnell Fast generation (4 steps) ~$0.003/image
flux-pro FLUX.1 Pro v1.1 Best quality FLUX model ~$0.05/image
flux-kontext FLUX Kontext Max Context-aware editing, multi-image input ~$0.08/image
recraft-v4 Recraft V4 Typography and design-oriented ~$0.04/image
nano-banana Nano Banana Ultra-fast, ultra-cheap ~$0.001/image
nano-banana-2 Nano Banana 2 Gemini 3.1 Flash — text rendering, consistency ~$0.08/image
nano-banana-pro Nano Banana Pro Gemini 3 Pro — state-of-the-art ~$0.15/image
gpt-image GPT-Image 1.5 OpenAI — high-fidelity, strong prompt adherence ~$0.13/image
gpt-image-2 GPT Image 2 OpenAI — latest model, fine typography, detailed images token-based, ~$0.10–0.30
seedream-v4 Seedream V4 ByteDance — up to 4K resolution ~$0.03/image

Image Editing (4 models)

Short Name Model Description Price
nano-banana-2-edit Nano Banana 2 Edit Gemini 3.1 Flash — fast editing, text rendering ~$0.08/edit
nano-banana-pro-edit Nano Banana Pro Edit Gemini 3 Pro — semantic editing, 14 ref images ~$0.15/edit
gpt-image-edit GPT-Image 1.5 Edit OpenAI — preserves composition and lighting ~$0.13/edit
gpt-image-2-edit GPT Image 2 Edit OpenAI — latest model, supports mask_url token-based, ~$0.10–0.30
seedream-v4-edit Seedream V4 Edit ByteDance — context-aware editing ~$0.03/edit

Video Generation (5 models)

Short Name Model Description Price
kling-v3-pro Kling V3 Pro High-quality text/image to video ~$0.30/video
sora-2-t2v Sora 2 Text-to-Video OpenAI Sora text-to-video ~$0.50/video
sora-2-i2v Sora 2 Image-to-Video OpenAI Sora image-to-video ~$0.50/video
ltx-2 LTX Video V2 Fast, affordable video ~$0.05/video
wan-v2 Wan 2.1 Alibaba's video model ~$0.10/video

Audio Generation (4 models)

Short Name Model Description Price
chatterbox-tts Chatterbox TTS High-quality text-to-speech ~$0.01/gen
minimax-speech MiniMax Speech 02 HD HD multi-voice synthesis ~$0.02/gen
beatoven-music Beatoven Music AI music from text ~$0.05/gen
beatoven-sfx Beatoven SFX Sound effects ~$0.03/gen

3D Generation (2 models)

Short Name Model Description Price
meshy-v6 Meshy V6 Image to 3D model ~$0.15/model
trellis-2 Trellis 2 Fast image to 3D with textures ~$0.10/model

Utility (2 models)

Short Name Model Description Price
remove-bg Background Removal Remove image background ~$0.005/image
upscale Aura SR Upscale 4x image upscaling ~$0.01/image

Available Tools

Synchronous (block until result, best for fast models)

Tool Description
generate_image Generate images from text prompts
edit_image Edit/transform existing images
generate_video Generate video from text and/or image
generate_audio Text-to-speech, music, and sound effects
generate_3d Generate 3D models from images
remove_background Remove image backgrounds
upscale_image Upscale images to higher resolution
run_model Run any fal.ai model with custom arguments
list_models List all available models from the catalog

Asynchronous queue API (for long-running jobs — video, 3D, large batches)

The synchronous tools block while the model runs. For models that take longer than the MCP tool-call timeout (~60 s), use the queue API instead: submit returns immediately with a request_id, then poll and fetch separately.

Tool Description
submit_job(model, arguments, media_type, prefix, webhook_url?) Submit a job, return request_id immediately
poll_job(request_id, with_logs?) Check status: IN_QUEUE (with queue_position), IN_PROGRESS (with logs), or COMPLETED
fetch_job(request_id) Once COMPLETED, fetch result and download files locally
cancel_job(request_id) Cancel a queued or in-progress job
list_jobs(status_filter?, limit?) List locally tracked jobs (most recent first)

Utilities

Tool Description
read_file_base64(path) Read a local file and return {mime_type, size, data_url, base64}. Useful for inlining downloaded images into artifact UIs that can't load file:// due to CSP.

Job metadata (request_id → model_id, media_type, prefix, status, files) is persisted in jobs.json next to server.py, so poll_job and fetch_job only need the request_id.

Example flow:

submit_job(model="kling-v3-pro", arguments={"prompt":"a fox jumping","duration":"5"}, media_type="video", prefix="fox")
  → {"request_id": "019dd...", "status": "SUBMITTED"}
poll_job("019dd...")           → {"status": "IN_PROGRESS", ...}
poll_job("019dd...")           → {"status": "COMPLETED"}
fetch_job("019dd...")          → {"files": [{"local_path": "~/Downloads/fal-ai/videos/fox_..."}]}

Installation

Prerequisites

  • Python 3.10+
  • A fal.ai account with an API key

1. Get your fal.ai API key

Go to fal.ai Dashboard > Keys and create an API key.

2. Set up the server

git clone https://github.com/Szotasz/fal-ai-mcp-server.git
cd fal-ai-mcp-server
python -m venv .venv
source .venv/bin/activate   # On Windows: .venv\Scripts\activate
pip install -r requirements.txt

3. Set your API key

export FAL_KEY="your-api-key-here"

Usage with Claude Code

claude mcp add fal-ai \
  -e FAL_KEY=your-api-key-here \
  -- /path/to/fal-ai-mcp-server/.venv/bin/python /path/to/fal-ai-mcp-server/server.py

Usage with Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "fal-ai": {
      "command": "/path/to/fal-ai-mcp-server/.venv/bin/python",
      "args": ["/path/to/fal-ai-mcp-server/server.py"],
      "env": {
        "FAL_KEY": "your-api-key-here"
      }
    }
  }
}

Replace /path/to/fal-ai-mcp-server with the actual path where you cloned the repo.

Output

Generated files are automatically downloaded to ~/Downloads/fal-ai/ organized by type:

  • images/ — generated and edited images
  • videos/ — generated videos
  • audio/ — speech, music, and sound effects
  • 3d/ — 3D models
  • other/ — everything else

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选