MCP cover image
See in Github
2025-03-31

1

Github Watches

0

Github Forks

1

Github Stars

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.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • apappascs
  • Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.

  • modelcontextprotocol
  • Serveurs de protocole de contexte modèle

  • Mintplex-Labs
  • L'application tout-en-un desktop et Docker AI avec chiffon intégré, agents AI, constructeur d'agent sans code, compatibilité MCP, etc.

  • ShrimpingIt
  • Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX

  • n8n-io
  • Plateforme d'automatisation de workflow à code équitable avec des capacités d'IA natives. Combinez le bâtiment visuel avec du code personnalisé, de l'auto-hôte ou du cloud, 400+ intégrations.

  • open-webui
  • Interface AI conviviale (prend en charge Olllama, Openai API, ...)

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 LLM 资料总结 (数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Résumé des meilleures ressources LLM du monde.

    Reviews

    5 (1)
    Avatar
    user_muFNjJoO
    2025-04-17

    As a dedicated user of the fal_api_mcp_server, I can confidently say that this server has significantly streamlined our API management process. Created by the talented taimo3810, it offers seamless integration and robust performance. Highly recommend checking it out on GitHub if you're looking for reliability and efficiency in your MCP applications!