mcpField
F
Fal AI MCP Server

Fal AI MCP Server

Local
github.com/piebroMedia & Design4Updated 78w ago

About Fal AI MCP Server

Fal AI MCP Server is a barebones server for using fal.ai APIs to generate images and videos. It is intended for users who want to connect fal.ai models to an MCP client and extend the server with other endpoints.

Key features

  1. 01Generate images through fal.ai APIs
  2. 02Generate videos through fal.ai APIs
  3. 03Extend with additional models and endpoints

Use cases

  1. 01Generate images from an MCP client
  2. 02Generate videos from an MCP client
  3. 03Adapt the server for other fal.ai endpoints

MCP support

Exposes fal.ai image- and video-generation APIs to MCP clients through a server configured with an FAL_KEY.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"fal-ai-mcp-server-piebro": {
"command": "uvx",
"args": [
"fal-ai-mcp-server"
],
"env": {
"FAL_KEY": "<FAL_KEY>",
"SAVE_MEDIA_DIR": "<SAVE_MEDIA_DIR>"
}
}
}
}
Run commanduvx fal-ai-mcp-server
Environment variables to set
FAL_KEYSecret
SAVE_MEDIA_DIR

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypifal-ai-mcp-server

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Fal AI MCP Server

An MCP (Model Context Protocol) server to use the fal.ai APIs to generate images and videos. This is a barebones server that anyone can extend to use different fal.ai models and API endpoints.

Usage

Install uv and add the server to an MCP config using uvx:

{
    "name": "fal-ai-mcp-server",
    "command": "uvx",
    "args": [
        "fal-ai-mcp-server"
    ],
    "env": {
        "FAL_KEY": "your-key",
        "SAVE_MEDIA_DIR": "path/to/save/images"
    }
}

or clone the repo and use uv with a directory:

{
    "name": "fal-ai-mcp-server",
    "command": "uv",
    "args": [
        "--directory",
        "path/to/root/dir/",
        "run",
        "main.py"
    ],
    "env": {
        "FAL_KEY": "your-key",
        "SAVE_MEDIA_DIR": "path/to/save/images"
    }
}

Development

Testing

Clone the repo and use mcp-client-for-testing to test the tools of the server.

uvx mcp-client-for-testing \
    --config '
    [
        {
            "name": "fal-ai-mcp-server",
            "command": "uv",
            "args": [
                "--directory", 
                "path/to/root/dir/", 
                "run", 
                "main.py"
            ],
            "env": {
                "FAL_KEY": "your-key",
                "SAVE_MEDIA_DIR": "path/to/save/images"
            }
        }
    ]
    ' \
    --tool_call '{"name": "echo_tool", "arguments": {"message": "Hello, world!"}}'
Formatting and Linting

The code is formatted and linted with ruff:

uv run ruff format
uv run ruff check --fix
Building with uv

Build the package using uv:

uv build
Releasing a New Version

To release a new version of the package to PyPI, create and push a new Git tag:

  1. Checkout the main branch and get the current version:

    git checkout main
    git pull origin main
    git describe --tags
    
  2. Create and push a new Git tag:

    git tag v0.2.0
    git push origin v0.2.0
    

The GitHub Actions workflow will automatically build and publish the package to PyPI when a new tag is pushed. The python package version number will be derived directly from the Git tag.

License

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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.