FAL AI Image Generation MCP server

Integrates with FAL AI to generate images from text prompts using models like 'fal-ai/recraft-v3', enabling real-time visual content creation for design and content generation tasks.
Back to servers
Provider
sshtunnelvision
Release date
Mar 05, 2025
Language
Python
Stats
166 stars

This MCP server provides logo generation capabilities using FAL AI, with tools for image generation, background removal, and automatic scaling - all accessible through a simple server interface that integrates with Cursor IDE.

Installation

Prerequisites

  • Python 3.8+
  • FAL AI API key
  • Active internet connection

Setup Instructions

  1. Install uv (Universal Virtualenv):

    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  2. Create and activate a virtual environment:

    uv venv
    source .venv/bin/activate  # On Unix/macOS
    # or
    .venv\Scripts\activate     # On Windows
    
  3. Install dependencies:

    uv pip install -r requirements.txt
    
  4. Set up environment variables:

    • Create a .env file in the root directory
    • Add your FAL AI API key:
      FAL_KEY=your_fal_ai_key_here
      

Running the Server

Start the server with:

python run_server.py

The server will be available at http://127.0.0.1:7777

Troubleshooting

If you encounter a FileNotFoundError on Windows:

  • Ensure you're running the command from the project's root directory
  • Make sure you've activated your virtual environment with .venv\Scripts\activate
  • Run the server from the root directory using python run_server.py

Configuring with Cursor IDE

  1. Open Cursor Settings
  2. Navigate to the MCP section
  3. Add the following configuration:
    • URL: http://127.0.0.1:7777/sse
    • Connection Type: SSE
    • Enable the connection

Usage Tips

  • Always reference @logo-creation.mdc in your Cursor Composer for consistent results
  • All generated logos will be saved in the downloads directory
  • Each logo is automatically generated in three sizes:
    • Original size
    • 32x32 pixels
    • 128x128 pixels
  • All logos maintain transparency in their final PNG format

Generated Image Formats

The server automatically processes logos to provide:

  • Transparent background removal
  • Multiple size variants
  • PNG format with transparency preserved

Custom Image Generation

You can use the generate_image tool to create any type of image, not just logos. The prompts are structured based on examples in the server configuration.

How to add this MCP server to Cursor

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.

Adding an MCP server to Cursor globally

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"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later