Skip to main content

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.

Metadata

Release files for fal-ai-mcp-server 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fal-ai-mcp-server 0.1.2
File Size Uploaded
fal_ai_mcp_server-0.1.2.tar.gz 25.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fal-ai-mcp-server 0.1.2
File Interpreter ABI Platform
fal_ai_mcp_server-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 31.7 kB

Release files / fal_ai_mcp_server-0.1.2.tar.gz

Download URL fal_ai_mcp_server-0.1.2.tar.gz
Size 25.9 kB
Tags Source
SHA-256 checksum
How to use checksums
07f12217e7900c4d48768451c8eb9d96a1a96a2c663981f27127a04ca35e0c00
BLAKE2b-256 checksum
How to use checksums
b67cb6d25d43104e7801a0a654141dc1bcbd505f85a996fe85cc318d23c50c53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 27, 2025.

Transparency log

Release files / fal_ai_mcp_server-0.1.2-py3-none-any.whl

Download URL fal_ai_mcp_server-0.1.2-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6576d76969168d6ac26f181fb0317be7a6819b033ac31420a04c9a21d7f2d3fd
BLAKE2b-256 checksum
How to use checksums
02c91e59b0e07495a3378a076aa74e8fa05af2f847e4084da2038a03d3e57935
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 27, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page