Sponsored by Deepsite.site

fal-api-mcp-server

Created By
taimo38108 months ago
Content

fal-api-mcp-server

A Model Context Protocol (MCP) server that provides image generation capabilities using fal.ai's FLUX.1 Pro model.

Components

Resources

This server does not provide any persistent resources as fal.ai is primarily a stateless model execution service.

Tools

The server implements one tool:

  • generate_image: Generates images based on text prompts using fal.ai FLUX.1 Pro
    • Required parameters:
      • prompt: The text prompt to generate the image from
    • Optional parameters:
      • image_size: The desired image size (default: "landscape_4_3")
        • Options: "square_hd", "square", "portrait_4_3", "portrait_16_9", "landscape_4_3", "landscape_16_9"
      • num_images: The number of images to generate (default: 1)
      • enable_safety_checker: Enable the safety checker (default: true)
      • safety_tolerance: Safety tolerance level 1-6, higher is more permissive (default: "2")
      • output_format: Output image format, "jpeg" or "png" (default: "jpeg")

Configuration

This server requires a fal.ai API key to function properly. You can obtain an API key by signing up at fal.ai.

The API key should be provided as an environment variable:

FAL_KEY=your_fal_ai_api_key

You can set this environment variable in your shell, or create a .env file in the same directory as the server with the above content.

Demo

https://github.com/user-attachments/assets/564a0fc3-9204-4399-b1ea-ab6a5c9f2d84

Quickstart

Install

Claude Desktop

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

Development/Unpublished Servers Configuration
"mcpServers": {
  "fal-api-mcp-server": {
    "command": "uv",
    "args": [
      "--directory",
      "/path/to/fal-api-mcp-server",
      "run",
      "fal-api-mcp-server"
    ],
    "env": {
      "FAL_KEY": "your_fal_ai_api_key"
    }
  }
}
Published Servers Configuration
"mcpServers": {
  "fal-api-mcp-server": {
    "command": "uvx",
    "args": [
      "fal-api-mcp-server"
    ],
    "env": {
      "FAL_KEY": "your_fal_ai_api_key"
    }
  }
}

Usage

Once the server is configured and running, you can use it with Claude to generate images. Example prompts:

  • "Generate an image of a mountain landscape at sunset"
  • "Create a portrait of a cyberpunk character with neon lights"
  • "Show me a futuristic cityscape with flying cars"

Claude will use the fal.ai FLUX.1 Pro model to generate the requested images.

Development

Building and Publishing

To prepare the package for distribution:

  1. Sync dependencies and update lockfile:
uv sync
  1. Build package distributions:
uv build

This will create source and wheel distributions in the dist/ directory.

  1. Publish to PyPI:
uv publish

Note: You'll need to set PyPI credentials via environment variables or command flags:

  • Token: --token or UV_PUBLISH_TOKEN
  • Or username/password: --username/UV_PUBLISH_USERNAME and --password/UV_PUBLISH_PASSWORD

Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.

You can launch the MCP Inspector via npm with this command:

npx @modelcontextprotocol/inspector uv --directory /path/to/fal-api-mcp-server run fal-api-mcp-server

Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Playwright McpPlaywright MCP server
DeepChatYour AI Partner on Desktop
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
ChatWiseThe second fastest AI chatbot™
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
WindsurfThe new purpose-built IDE to harness magic
Serper MCP ServerA Serper MCP Server
Amap Maps高德地图官方 MCP Server
CursorThe AI Code Editor
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Tavily Mcp