Back to MCP Catalog

Image Generation with Flux MCP Server

Art & CultureJavaScript
Generate images using Replicate's Flux model via text prompts
Available Tools

generate_image

Generates images using the Flux model based on text prompts

prompt

This MCP server provides seamless integration with Replicate's Flux image generation model, allowing you to create high-quality images directly from text prompts within your AI assistant. The server connects to Replicate's API and handles all the complexity of image generation requests and responses. With this tool, you can enhance your creative workflows by generating visual content on demand. Whether you need concept art, illustrations, or visual references, this MCP server delivers images based on your textual descriptions without requiring you to switch between different applications.

Overview

The Image Generation MCP Server allows you to generate images using Replicate's Flux model directly from your AI assistant. This server acts as a bridge between your assistant and Replicate's powerful image generation capabilities.

Prerequisites

Before using this MCP server, you'll need:

  1. A Replicate account and API token
  2. Claude Desktop or another compatible MCP client

Getting a Replicate API Token

  1. Sign up or log in at https://replicate.com
  2. Navigate to https://replicate.com/account/api-tokens
  3. Create a new API token
  4. Copy the token for use in your configuration

Installation Options

Option 1: Using Smithery (Recommended)

The easiest way to install this MCP server is through Smithery:

npx -y @smithery/cli install @GongRzhe/Image-Generation-MCP-Server --client claude

Option 2: Using NPX (No Local Installation)

You can run the server directly without installing it locally:

# Configure your client to use npx to run the server
# No local installation needed

Option 3: Local Installation

If you prefer a local installation:

# Global installation
npm install -g @gongrzhe/image-gen-server

# Or local installation
npm install @gongrzhe/image-gen-server

Configuration

Claude Desktop Configuration

Edit your Claude Desktop configuration file:

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

Add the following configuration:

{
  "mcpServers": {
    "image-gen": {
      "command": "npx",
      "args": ["@gongrzhe/image-gen-server"],
      "env": {
        "REPLICATE_API_TOKEN": "your-replicate-api-token"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Replace your-replicate-api-token with your actual Replicate API token.

Environment Variables

  • REPLICATE_API_TOKEN (required): Your Replicate API token
  • MODEL (optional): Alternative Replicate model to use. Defaults to "black-forest-labs/flux-schnell"

Configuration Parameters

  • disabled: Set to false to enable the server, true to disable it
  • autoApprove: Array of tool names that can be executed without user confirmation. Empty array means all tool calls require confirmation.

Usage

Once configured, you can ask your AI assistant to generate images based on text prompts. The assistant will use the generate_image tool to create images according to your specifications.

Example prompts:

  • "Generate an image of a mountain landscape at sunset"
  • "Create a picture of a futuristic city with flying cars"
  • "Make an illustration of a fantasy character with magical powers"

The generated images will be displayed directly in your conversation with the assistant.

Related MCPs

Video Jungle
Art & CulturePython

Upload, edit, search, and generate videos with AI assistance

Rijksmuseum
Art & CultureTypeScript

Access and explore the Rijksmuseum's art collection through natural language

AniList
Art & CultureTypeScript

Access and interact with anime, manga, character, and user data from AniList

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.