Metadata-Version: 2.4
Name: fal-ai-mcp-server
Version: 0.1.0
Summary: An MCP (Model Contex Protocol) Server to use the fal.ai APIs to generate images and videos. 
Author-email: Piet Brömmel <piet.broemmel@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/piebro/fal-ai-mcp-server
Project-URL: Bug Tracker, https://github.com/piebro/fal-ai-mcp-server/issues
Keywords: mcp,server
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ruff
Requires-Dist: mcp
Requires-Dist: fal_client
Requires-Dist: requests
Dynamic: license-file

# Fal AI MCP Server

An MCP (Model Context Protocol) Server to use the fal.ai APIs to generate images and videos.

## Usage

Install [uv](https://docs.astral.sh/uv/) and add the server to an MCP config using `uvx`:

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

or clone the repo and use `uv` with a directory:

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

## Development

### Testing

Clone the repo and use [mcp-client-for-testing](https://github.com/piebro/mcp-client-for-testing) to test the tools of the server.

```bash
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_IMAGE_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:

```bash
uv run ruff format
uv run ruff check --fix
```

### Building with uv

Build the package using uv:

```bash
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:
   ```bash
   git checkout main
   git pull origin main
   git describe --tags
   ```

2. Create and push a new Git tag:
   ```bash
   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](LICENSE) file for details.
