Image-Generation-MCP-Server logo

Image Generation MCP Server

by GongRzhe

0 forks
5 stars
Free

What is Image-Generation-MCP-Server

Image-Generation-MCP-Server, developed by GongRzhe, is a powerful server designed to generate images using the advanced Replicate Flux model. As part of the Model Context Protocol (MCP) framework, this server allows AI systems to connect with various data sources and tools securely. By utilizing the server, users can transform text prompts into vivid images, all within a structured and secure environment.

How to Use Image-Generation-MCP-Server

Setup Instructions:

To get started with the Image-Generation-MCP-Server, users need to configure their environment and obtain necessary credentials. The server setup involves editing the configuration file found at:

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

In the configuration file, you will need to specify the command to run the server and provide your Replicate API token. This token is crucial for authentication and can be obtained by registering and generating it from your Replicate account.

Configuration Parameters:

  • Environment Variables:

    • REPLICATE_API_TOKEN (required): Your unique token for accessing the Replicate API.
    • MODEL (optional): Specifies the model for image generation. By default, it uses "black-forest-labs/flux-schnell".
  • Server Options:

    • disabled: Toggle the server's availability (false for enabled, true for disabled).
    • autoApprove: List of tool names that can execute without further user confirmation.

Using the Tools:

The primary tool available is generate_image, which creates images based on text descriptions. Users can customize the image generation by specifying parameters like aspect ratio, output format, and the number of images.

Example Usage:

const result = await use_mcp_tool({
  server_name: "image-gen",
  tool_name: "generate_image",
  arguments: {
    prompt: "A beautiful sunset over mountains",
    aspect_ratio: "16:9",
    output_format: "png",
    num_outputs: 1
  }
});

The above command will yield an array of URLs directing to the generated images.

Key Features of Image-Generation-MCP-Server

  • Image Generation: Transforms textual descriptions into high-quality images using the Flux model.
  • Customizable Output: Adjust parameters such as aspect ratio, output format (webp, jpg, png), and the number of images.
  • Secure Authentication: Utilizes the Replicate API token for secure operations.
  • Integrated with MCP: Seamlessly connects with other AI systems using the Model Context Protocol, providing enhanced flexibility and security.
  • User-Friendly Configuration: Straightforward setup and configuration allow users to quickly start generating images without extensive technical knowledge.

Image-Generation-MCP-Server is an ideal tool for those looking to harness the power of AI-driven image generation in a secure and efficient manner. Whether you're creating art, visual content for projects, or simply exploring AI capabilities, this server offers robust features in a user-friendly package.

How to Use

To use the Image-Generation-MCP-Server, follow these steps:

  1. Visit https://github.com/GongRz...
  2. Follow the setup instructions to create an account (if required)
  3. Connect the MCP server to your Claude Desktop application
  4. Start using Image-Generation-MCP-Server capabilities within your Claude conversations

Additional Information

Created

February 23, 2025

Company

GongRzhe

Start building your own MCP Server

Interested in creating your own MCP Server? Check out the official documentation and resources.

Learn More