mcp-fal
by: am0y
A Model Context Protocol (MCP) server for interacting with fal.ai models and services.
📌Overview
Purpose: The MCP Server is designed to facilitate interaction with fal.ai models and services through the Model Context Protocol.
Overview: This framework provides a comprehensive set of tools to manage, search, and utilize fal.ai models efficiently, allowing developers to integrate advanced AI capabilities into their applications with ease.
Key Features:
-
Model Management: Lists all available fal.ai models and supports keyword searching, enabling users to quickly find and access the desired models.
-
Content Generation: Facilitates content generation using selected models, with options for both direct execution and queued processing for better resource management.
-
Queue Management: Offers status checking, results retrieval, and cancellation of queued requests, streamlining the handling of multiple model executions.
-
File Upload Capability: Allows users to upload files to fal.ai's CDN, enhancing the versatility of model interactions.
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
- Clone this repository:
git clone https://github.com/am0y/mcp-fal.git
cd mcp-fal
- Install the required packages:
pip install fastmcp httpx aiofiles
- Set your fal.ai API key as an environment variable:
export FAL_KEY="YOUR_FAL_API_KEY_HERE"
Usage
Running the Server
Run the server in development mode with:
fastmcp dev main.py
This launches the MCP Inspector web interface to test the tools interactively.
Installing in Claude Desktop
To use the server with Claude Desktop:
fastmcp install main.py -e FAL_KEY="YOUR_FAL_API_KEY_HERE"
This makes the server available to Claude in the Desktop app.
Running Directly
You can also run the server directly:
python main.py
API Reference
Tools
models(page=None, total=None)
- List available models with optional paginationsearch(keywords)
- Search for models by keywordsschema(model_id)
- Get OpenAPI schema for a specific modelgenerate(model, parameters, queue=False)
- Generate content using a modelresult(url)
- Get result from a queued requeststatus(url)
- Check status of a queued requestcancel(url)
- Cancel a queued requestupload(path)
- Upload a file to fal.ai CDN
License
MIT License