Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

A Model Context Protocol (MCP) server for interacting with fal.ai models and services, enabling listing, searching, generating content, managing queues, and uploading files.

README.md

fal.ai MCP Server

A Model Context Protocol (MCP) server for interacting with fal.ai models and services.

Features

  • List all available fal.ai models
  • Search for specific models by keywords
  • Get model schemas
  • Generate content using any fal.ai model
  • Support for both direct and queued model execution
  • Queue management (status checking, getting results, cancelling requests)
  • File upload to fal.ai CDN

Requirements

  • Python 3.10+
  • fastmcp
  • httpx
  • aiofiles
  • A fal.ai API key

Installation

Manual Installation (Recommended)

  1. Clone this repository:
git clone https://github.com/am0y/mcp-fal.git
cd mcp-fal
  1. Create a virtual environment and install dependencies:
python -m venv venv
venv/Scripts/pip install -r requirements.txt  # Windows
# OR
venv/bin/pip install -r requirements.txt      # Linux/Mac
  1. Set your fal.ai API key as an environment variable:
export FAL_KEY="YOUR_FAL_API_KEY_HERE"

Docker Installation (Experimental)

  1. Clone this repository:
git clone https://github.com/am0y/mcp-fal.git
cd mcp-fal
  1. Copy the environment template and add your API key:
cp .env.example .env
# Edit .env and add your fal.ai API key
  1. Start the server:
docker-compose up -d

Usage

[!IMPORTANT] For MCP Integration (VS Code, Claude Desktop, Antigravity) ✅ Use Option 2 (Direct Python Execution) - This is the correct and recommended approach. ❌ Do NOT use Docker - MCP servers use stdio transport and must be spawned by MCP clients. Docker containers will exit immediately because there's no stdin connection.

[!NOTE] Why Docker doesn't work for MCP MCP servers communicate via standard input/output (stdio). They're designed to be spawned as child processes by MCP clients, not run as standalone services. When you try to run an MCP server in Docker, it starts, finds no stdin connection, and exits immediately.

---

Option 1: Virtual Environment Setup (Recommended for MCP Integration)

Prerequisites: Python 3.10+ installed

Step 1: Create Virtual Environment

# Create virtual environment
python -m venv venv

# Activate it (optional, for manual testing)
venv\Scripts\activate  # Windows
source venv/bin/activate  # Linux/Mac

Step 2: Install Dependencies

# Windows
venv/Scripts/pip install -r requirements.txt

# Linux/Mac
venv/bin/pip install -r requirements.txt

Step 3: Set Up API Key

Create a .env file in the project root: ``bash cp .env.example .env ``

Edit .env and add your fal.ai API key: `` FAL_KEY=your_actual_fal_api_key_here ``

---

Option 2: Testing the Server Locally

For local testing and development (not required for MCP integration):

FastMCP Dev Mode

Launch the MCP Inspector web interface to test tools interactively:

fastmcp dev main.py

Direct Execution

Run the server directly (will wait for stdio input):

venv/Scripts/python main.py  # Windows
venv/bin/python main.py      # Linux/Mac

---

MCP Integration Configuration

After setting up the virtual environment above, configure your MCP client:

For Claude Desktop

Edit %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (Mac): ``json { "mcpServers": { "fal": { "command": "d:/Projects/python/mcp-fal/venv/Scripts/python.exe", "args": ["d:/Projects/python/mcp-fal/main.py"], "env": { "FAL_KEY": "your_fal_api_key_here" } } } } ``

For VS Code/Antigravity (MCP settings): ``json { "mcpServers": { "fal": { "command": "d:/Projects/python/mcp-fal/venv/Scripts/python.exe", "args": ["d:/Projects/python/mcp-fal/main.py"], "env": { "FAL_KEY": "your_fal_api_key_here" } } } } ``

For Linux/Mac, use: ``json { "mcpServers": { "fal": { "command": "/absolute/path/to/mcp-fal/venv/bin/python", "args": ["/absolute/path/to/mcp-fal/main.py"], "env": { "FAL_KEY": "your_fal_api_key_here" } } } } ``

Key Point: Use the venv Python interpreter (venv/Scripts/python.exe on Windows or venv/bin/python on Linux/Mac) so all dependencies are available.

Security Tip: Instead of hardcoding your API key, you can: 1. Set FAL_KEY as a system environment variable 2. Use "FAL_KEY": "${env:FAL_KEY}" in the config to reference it 3. Or create a .env file in the project directory and the server will load it automatically

API Reference

Tools

  • models(page=None, total=None) - List available models with optional pagination
  • search(keywords) - Search for models by keywords
  • schema(model_id) - Get OpenAPI schema for a specific model
  • generate(model, parameters, queue=False) - Generate content using a model
  • result(url) - Get result from a queued request
  • status(url) - Check status of a queued request
  • cancel(url) - Cancel a queued request
  • upload(path - Upload a file to fal.ai CDN

---

Appendix: Docker Setup (Experimental)

[!WARNING] This Docker setup is experimental and does NOT work for MCP integration. MCP servers use stdio transport and must be spawned by MCP clients. Docker containers will exit immediately because there's no stdin connection. This is kept for educational purposes and potential future experimentation.

Docker Files Included

  • Dockerfile - Python 3.10-slim image with dependencies
  • docker-compose.yml - Compose configuration with auto-restart
  • .dockerignore - Excludes unnecessary files from build

Building the Docker Image

docker-compose build

Running (Will Exit Immediately)

docker-compose up -d

The container will start and exit immediately because MCP servers require an active stdin connection.

Why This Doesn't Work

MCP servers communicate via standard input/output (stdio). They're designed to be spawned as child processes by MCP clients, not run as standalone services. When run in Docker without an active stdin connection, the server starts, finds no input stream, and exits.

---

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Search servers.