# Image-Generation-MCP-Server

> MCP Server

This repository provides an MCP server for image generation using the Replicate Flux model, enabling users to generate images through Claude Desktop with either NPX or local installation, requiring a

## Overview

- **Category:** AI
- **Language:** JavaScript
- **Stars:** 51
- **Forks:** 0
- **Owner:** GongRzhe
- **GitHub:** https://github.com/GongRzhe/Image-Generation-MCP-Server
- **Created:** 2025-02-23T10:47:53+00:00
- **Updated:** 2025-03-28T02:45:08+00:00
- **Source:** https://model-context-protocol.com/servers/image-generation-replicate-flux-mcp-server

## Setup

## Setup

### Configure Claude Desktop

Edit your Claude Desktop configuration file:

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

#### Option 1: NPX Configuration (Recommended)
This method runs the server directly from npm without needing local files:

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

#### Option 2: Local Installation Configuration
If you installed the package locally:

```json
{
  "mcpServers": {
    "image-gen": {
      "command": "node",
      "args": ["/path/to/image-gen-server/build/index.js"],
      "env": {
        "REPLICATE_API_TOKEN": "your-replicate-api-token",
        "MODEL": "alternative-model-name"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}
```

### Get Your Replicate API Token

1.  Sign up/login at https://replicate.com
2.  Go to https://replicate.com/account/api-tokens
3.  Create a new API token
4.  Copy the token and replace `your-replicate-api-token` in the MCP settings

## Tools

## Available Tools

1.  `generate_image` (Generates images using the Flux model based on text prompts.)
