spartanz51/imagegen-mcp
MCP server for OpenAI Image Generation & Editing — text-to-image, image-to-image (with mask), no extra plugins.
[](https://www.npmjs.com/package/imagegen-mcp)
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 (see OpenAI documentation).
text-to-image generation using models like DALL-E 2, DALL-E 3, and gpt-image-1 (if available/enabled).image-to-image editing using DALL-E 2 and gpt-image-1 (if available/enabled).Here's an example of generating an image directly in Cursor using the text-to-image tool integrated via MCP:
<div align="center"> </div>
You can run the server directly from npm using npx (requires Node.js and npm):
npx imagegen-mcp [options]See the Running the Server section for more details on options and running locally.
You can easily integrate this server with Cursor to use its image generation capabilities directly within the editor:
File > Preferences > Cursor Settings (or use the shortcut Ctrl+, / Cmd+,).Loading reviews...