The fal.ai MCP Server is a Model Context Protocol server that allows you to interact with fal.ai models and services. It provides a convenient way to access, search, and use various AI models available on the fal.ai platform.
To get started with the fal.ai MCP server:
git clone https://github.com/am0y/mcp-fal.git
cd mcp-fal
pip install fastmcp httpx aiofiles
export FAL_KEY="YOUR_FAL_API_KEY_HERE"
To run the server in development mode with the MCP Inspector web interface:
fastmcp dev main.py
This launches an interactive web interface where you can test all available tools.
To integrate the server with Claude Desktop:
fastmcp install main.py -e FAL_KEY="YOUR_FAL_API_KEY_HERE"
This makes all server capabilities available directly within the Claude Desktop application.
For a more traditional approach, you can run the server directly:
python main.py
List all models:
models(page=None, total=None) # Optional pagination parameters
Search for specific models:
search(keywords) # Find models matching specific keywords
Get model schema:
schema(model_id) # Retrieve the OpenAPI schema for a specific model
generate(model, parameters, queue=False) # Run a model with parameters
Set queue=True
for queued execution of longer-running models.Check request status:
status(url) # Check the current status of a queued request
Retrieve results:
result(url) # Get results from a completed queued request
Cancel requests:
cancel(url) # Cancel an in-progress queued request
upload(path) # Upload a file to the fal.ai CDN for use with models
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.