fal
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@falgenerate an image of a sunset using stable-diffusion-v2"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: @monsoft/mcp-fal-ai
Requirements
Python 3.10+
fastmcp
httpx
aiofiles
A fal.ai API key
Installation
Manual Installation (Recommended)
Clone this repository:
git clone https://github.com/am0y/mcp-fal.git
cd mcp-falCreate 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/MacSet your fal.ai API key as an environment variable:
export FAL_KEY="YOUR_FAL_API_KEY_HERE"Docker Installation (Experimental)
Clone this repository:
git clone https://github.com/am0y/mcp-fal.git
cd mcp-falCopy the environment template and add your API key:
cp .env.example .env
# Edit .env and add your fal.ai API keyStart the server:
docker-compose up -dUsage
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.
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/MacStep 2: Install Dependencies
# Windows
venv/Scripts/pip install -r requirements.txt
# Linux/Mac
venv/bin/pip install -r requirements.txtStep 3: Set Up API Key
Create a .env file in the project root:
cp .env.example .envEdit .env and add your fal.ai API key:
FAL_KEY=your_actual_fal_api_key_hereOption 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.pyDirect Execution
Run the server directly (will wait for stdio input):
venv/Scripts/python main.py # Windows
venv/bin/python main.py # Linux/MacMCP 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):
{
"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):
{
"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:
{
"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.exeon Windows orvenv/bin/pythonon Linux/Mac) so all dependencies are available.
Security Tip: Instead of hardcoding your API key, you can:
Set
FAL_KEYas a system environment variableUse
"FAL_KEY": "${env:FAL_KEY}"in the config to reference itOr create a
.envfile in the project directory and the server will load it automatically
API Reference
Tools
models(page=None, total=None)- List available models with optional paginationsearch(keywords)- Search for models by keywordsschema(model_id)- Get OpenAPI schema for a specific modelgenerate(model, parameters, queue=False)- Generate content using a modelresult(url)- Get result from a queued requeststatus(url)- Check status of a queued requestcancel(url)- Cancel a queued requestupload(path- Upload a file to fal.ai CDN
Appendix: Docker Setup (Experimental)
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 dependenciesdocker-compose.yml- Compose configuration with auto-restart.dockerignore- Excludes unnecessary files from build
Building the Docker Image
docker-compose buildRunning (Will Exit Immediately)
docker-compose up -dThe 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
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for interacting with fal.ai models and services. Uses the latest streaming MCP support.Last updated82MIT
- AlicenseBqualityDmaintenanceAn MCP server that integrates with fal.ai to provide AI agents with tools for image generation, text processing, audio synthesis, and model management via a unified interface.Last updated835MIT
- Alicense-qualityDmaintenanceA FastMCP server that exposes core fal.ai model API operations, enabling model catalogue browsing, search, schema retrieval, inference, queue management, and CDN uploads through natural language.Last updated4MIT
- Alicense-qualityDmaintenanceA Model Context Protocol server that enables Claude Desktop and other MCP clients to generate images, videos, music, and audio using Fal.ai models.Last updated52MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
MCP (Model Context Protocol) server for Appwrite
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/am0y/mcp-fal'
If you have feedback or need assistance with the MCP directory API, please join our Discord server