Flux ImageGen MCP Server
An MCP server for generating images using the Pollinations AI API.
Flux ImageGen MCP Server
A specialized Model Context Protocol (MCP) server for image generation and manipulation, powered by Pollinations AI.
Developer
- Author: Falah.G.Salieh
- Copyright: Ā© 2025 All rights reserved
Overview
ImageGen MCP Server is a streamlined server implementation that provides powerful image generation capabilities through the Model Context Protocol (MCP). This server specializes in three core functionalities:
- Image URL Generation
- Direct Image Generation
- Model Listing and Management
Features
- š¼ļø Image Generation: Create stunning images from text prompts
- šØ Multiple Models: Support for various image generation models
- š§ Flexible Configuration: Easy to set up and customize
- š High Performance: Optimized for quick response times
- š MCP Compatible: Fully compliant with Model Context Protocol
Installation
# Clone the repository
git clone https://github.com/yourusername/flux-imagegen-mcp-server.git
# Install dependencies
npm install
Configuration
Claude Desktop Configuration
To use this server with Claude Desktop, update your configuration file at:
C:\Users\[YourUsername]\AppData\Roaming\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "mcpollinations": {
      "command": "cmd",
      "args": [
        "/c",
        "node",
        "PATH_TO_YOUR_SERVER\\server.js"
      ],
      "tools": [
        "generateImageUrl",
        "generateImage",
        "listImageModels"
      ]
    }
  }
}
Replace PATH_TO_YOUR_SERVER with your actual server path.
Available Tools
1. Generate Image URL (generateImageUrl)
Generates a URL for an image based on a text prompt.
{
  "prompt": "A beautiful sunset over mountains",
  "model": "flux",  // optional, defaults to 'flux'
  "width": 1024,    // optional
  "height": 1024,   // optional
  "enhance": true,  // optional
  "safe": false     // optional
}
2. Generate Image (generateImage)
Generates and saves an image directly from a text prompt.
{
  "prompt": "A serene lake reflecting mountains",
  "model": "flux",
  "width": 1024,
  "height": 1024,
  "enhance": true,
  "safe": false,
  "outputPath": "./output",
  "fileName": "mountain_lake",
  "format": "png"
}
3. List Image Models (listImageModels)
Returns a list of available image generation models.
// Example response:
{
  "models": [
    {
      "id": "flux",
      "name": "Flux",
      "description": "Default image generation model"
    },
    // ... other models
  ]
}
Running the Server
# Start the server
node server.js
Environment Requirements
- Node.js >= 16.0.0
- NPM >= 7.0.0
- Windows/Linux/MacOS compatible
Development
To contribute or modify the server:
- Fork the repository
- Create your feature branch
- Make your changes
- Submit a pull request
Error Handling
The server provides detailed error messages for common issues:
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable error message",
    "details": { /* Additional error details */ }
  }
}
Examples
Basic Image Generation
// Generate an image URL
const response = await generateImageUrl({
  prompt: "A futuristic city at night",
  model: "flux",
  width: 1024,
  height: 1024
});
// Generate and save an image
const image = await generateImage({
  prompt: "A peaceful garden with butterflies",
  outputPath: "./images",
  fileName: "garden_scene"
});
Download Image Example
// Download an image from URL
const downloadResult = await downloadImage({
  imageUrl: "https://example.com/image.jpg",
  fileName: "downloaded-image",
  format: "png"
});
Support
For issues and feature requests, please create an issue in the repository or contact the developer:
- Email: [Your contact email]
- GitHub: [Your GitHub profile]
License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ā¤ļø by Falah.G.Salieh Ā© 2025 All rights reserved
Related Servers
- Nuxt MCP- MCP server helping models to understand your Vite/Nuxt app better. 
- Lingo.dev- Make your AI agent speak every language on the planet, using Lingo.dev Localization Engine. 
- RubyGems- Fetch metadata for Ruby gems from the rubygems.org API. 
- Context Portal MCP (ConPort)- A server for managing structured project context using SQLite, with support for vector embeddings for semantic search and Retrieval Augmented Generation (RAG). 
- Remote DCInside MCP Server (Authless)- An example of a remote MCP server without authentication, deployable on Cloudflare Workers. 
- Unreal Engine Code Analyzer- Analyzes Unreal Engine source code to provide context for AI assistants. 
- MockLoop- An AI-native API testing platform for generating scenarios, executing tests, and analyzing results. 
- FluidMCP CLI- A command-line tool to run MCP servers from a single file, with support for automatic dependency resolution, environment setup, and package installation from local or S3 sources. 
- 4o-image- Generate and edit images using text prompts with the 4o-image API. 
- Sui Butler- An MCP server for the Sui blockchain ecosystem that bridges AI intelligence for simplified development. Supports both zkLogin and Private Key modes.