ai-image-gen-mcp

ai-image-gen-mcp

76

The project is an MCP server designed for generating images using a model from Replicate. It allows configuring image parameters, saving outputs to a directory, and includes robust error handling. Compatible with MCP clients like Cursor, it ensures full compliance with the MCP protocol.

Image Generation MCP Server

An implementation of a Model Context Protocol server for image generation using Replicate's model. It is compatible with Cursor's MCP feature and other MCP clients.

Features

  • Generate images from text prompts
  • Configurable image parameters
  • Save images to a directory
  • Complies with MCP protocol
  • Error handling and validation

Prerequisites

  • Node.js 16+
  • Replicate API token
  • TypeScript SDK

Setup

  1. Clone repository
  2. Install dependencies
  3. Configure API token
  4. Build the project

Usage

Follow instructions for setting up MCP server in Cursor.

API Parameters

Parameters include prompt, output directory, fast mode, resolution, number of outputs, aspect ratio, format, quality, and denoising steps.

Error Handling

Handles validation, API, server, and unknown errors with detailed responses.

License

ISC