An MCP (Model Contex Protocol) Server to use the fal.ai APIs to generate images and videos.
Project description
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:
-
Checkout the main branch and get the current version:
git checkout main git pull origin main git describe --tags
-
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fal_ai_mcp_server-0.1.2.tar.gz.
File metadata
- Download URL: fal_ai_mcp_server-0.1.2.tar.gz
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07f12217e7900c4d48768451c8eb9d96a1a96a2c663981f27127a04ca35e0c00
|
|
| MD5 |
b5c580403d41138df594b62200996549
|
|
| BLAKE2b-256 |
b67cb6d25d43104e7801a0a654141dc1bcbd505f85a996fe85cc318d23c50c53
|
Provenance
The following attestation bundles were made for fal_ai_mcp_server-0.1.2.tar.gz:
Publisher:
publish.yml on piebro/fal-ai-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fal_ai_mcp_server-0.1.2.tar.gz -
Subject digest:
07f12217e7900c4d48768451c8eb9d96a1a96a2c663981f27127a04ca35e0c00 - Sigstore transparency entry: 203349795
- Sigstore integration time:
-
Permalink:
piebro/fal-ai-mcp-server@b8513fffe1cc8e0afff0d58bb965f5c4f45731c5 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/piebro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b8513fffe1cc8e0afff0d58bb965f5c4f45731c5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fal_ai_mcp_server-0.1.2-py3-none-any.whl.
File metadata
- Download URL: fal_ai_mcp_server-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6576d76969168d6ac26f181fb0317be7a6819b033ac31420a04c9a21d7f2d3fd
|
|
| MD5 |
323ec4c8ccb829fe4427485de4465583
|
|
| BLAKE2b-256 |
02c91e59b0e07495a3378a076aa74e8fa05af2f847e4084da2038a03d3e57935
|
Provenance
The following attestation bundles were made for fal_ai_mcp_server-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on piebro/fal-ai-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fal_ai_mcp_server-0.1.2-py3-none-any.whl -
Subject digest:
6576d76969168d6ac26f181fb0317be7a6819b033ac31420a04c9a21d7f2d3fd - Sigstore transparency entry: 203349797
- Sigstore integration time:
-
Permalink:
piebro/fal-ai-mcp-server@b8513fffe1cc8e0afff0d58bb965f5c4f45731c5 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/piebro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b8513fffe1cc8e0afff0d58bb965f5c4f45731c5 -
Trigger Event:
push
-
Statement type: