fal.ai

by am0y

57 stars
316 downloads
Not rated
GitHub

About

Bridges AI systems with fal.ai's machine learning models and services, enabling image generation, media processing, and specialized AI capabilities through direct or queued execution modes with authentication and file management support.

Details

Author
am0y
Repository
am0y/mcp-fal
GitHub stars
57
Downloads
316
License
MIT License
Categories
Developer Tools, Design, File Management, AI, Media, Search, Security, Frontend, Infrastructure, Other
Tags
#integration

- 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

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name fal.ai
    Command (node, npx, python, etc.) /absolute/path/to/mcp-fal/venv/bin/python
    Arguments
    • Argument 1 /absolute/path/to/mcp-fal/main.py
    Environment
    • FAL_KEY your_fal_api_key_here

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

> [!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.

---

1. Clone this repository:

git clone https://github.com/am0y/mcp-fal.git
cd mcp-fal

2. Create a virtual environment and install dependencies:

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

1. Clone this repository:

bash
git clone https://github.com/am0y/mcp-fal.git
cd mcp-fal

2. Copy the environment template and add your API key:
bash
cp .env.example .env

Prerequisites: Python 3.10+ installed


python -m venv venv

bash

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

> [!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-compose up -d

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

models

List available models with optional pagination. Parameters: page (optional int), total (optional int)

search

Search for models by keywords. Parameters: keywords (string)

schema

Get OpenAPI schema for a specific model. Parameters: model_id (string)

generate

Generate content using a model. Parameters: model (string), parameters (object), queue (optional boolean)

result

Get result from a queued request. Parameters: url (string)

status

Check status of a queued request. Parameters: url (string)

cancel

Cancel a queued request. Parameters: url (string)

upload

Upload a file to fal.ai CDN. Parameters: path (string)

- 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

---

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "fal.ai": {
            "env": {
                "FAL_KEY": "your_fal_api_key_here"
            },
            "args": [
                "/absolute/path/to/mcp-fal/main.py"
            ],
            "command": "/absolute/path/to/mcp-fal/venv/bin/python"
        }
    }
}

Linux

{
    "env": {
        "FAL_KEY": "your_fal_api_key_here"
    },
    "args": [
        "/absolute/path/to/mcp-fal/main.py"
    ],
    "command": "/absolute/path/to/mcp-fal/venv/bin/python"
}

Macos

{
    "env": {
        "FAL_KEY": "your_fal_api_key_here"
    },
    "args": [
        "/absolute/path/to/mcp-fal/main.py"
    ],
    "command": "/absolute/path/to/mcp-fal/venv/bin/python"
}

Windows

{
    "env": {
        "FAL_KEY": "your_fal_api_key_here"
    },
    "args": [
        "d:/Projects/python/mcp-fal/main.py"
    ],
    "command": "d:/Projects/python/mcp-fal/venv/Scripts/python.exe"
}

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

2. Create a virtual environment and install dependencies:
```bash
python -m venv venv
venv/Scripts/pip install -r requirements.txt # Windows

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.