imagegen-mcp
13
This project provides an implementation of an MCP server that wraps OpenAI's Image Generation and Editing APIs. It supports generating and editing images using models like DALL-E and GPT-image, with easy integration into tools like Cursor.
MCP OpenAI Image Generation Server
This project provides a server implementation based on the Model Context Protocol (MCP) that acts as a wrapper around OpenAI's Image Generation and Editing APIs.
Features
- Exposes OpenAI image generation capabilities through MCP tools.
- Supports
text-to-image
generation using models like DALL-E 2, DALL-E 3, and gpt-image-1. - Supports
image-to-image
editing using DALL-E 2 and gpt-image-1. - Configurable via environment variables and command-line arguments.
- Handles various parameters like size, quality, style, and format.
- Saves generated or edited images to temporary files and returns the path along with the base64 data.
Quick Run with npx
Run the server directly from npm using npx
requiring Node.js and npm.
Prerequisites
- Node.js (v18 or later recommended)
- npm or yarn
- An OpenAI API key
Integration with Cursor
Provides integration steps for use within the Cursor editor.
Setup
Instructions on cloning the repository, installing dependencies, configuring environment variables, and running the server.
MCP Tools
Describes available tools such as text-to-image
and image-to-image
and their parameters.