Image Generation MCP Server

by dfeirstein

2 stars
355 downloads
Not rated
GitHub

About

Model Context Protocol (MCP) server enabling AI clients (Cline, Claude Desktop) to generate images using OpenAI (DALL-E 3, gpt-image-1) and save them directly to the user's project directory.

Details

Author
dfeirstein
GitHub stars
2
Downloads
355
Categories
Media

- Generates images from text prompts using OpenAI models.
- Edits and combines existing images via reference images.
- Supports optional branding guidelines via brandSignature.
- Allows specifying image size, quality, and background type.
- Supports consistent visual styling through styleDefinitionJSON.
- Saves images to a target project’s public directory.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Image Generation MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via NPX (npx -y @dfeirstein/image-server@latest) or clone the repository and run node dist/index.js. Configure your MCP client’s settings file (e.g., claude_desktop_config.json) with the server command and your OpenAI API key. The server exposes the create_image tool and serves documentation as MCP resources at docs/prompt-recipes and docs/readme.

create_image

Generates an image using OpenAI (DALL-E 3 / gpt-image-1) based on a detailed text prompt. For best results, provide vivid descriptions incorporating style, composition, lighting, and mood. Can also edit or combine existing images by providing referenceImagePaths. Refer to 'docs/prompt-recipes.md' for extensive examples, templates, and tips for various image types (hero backgrounds, icons, illustrations, photos). Key parameters include 'prompt', 'brandSignature' (use project palette), 'size' (e.g., 1024x1024, 1536x1024), 'quality', 'model', 'filename', 'outputPath', 'targetProjectDir', and 'referenceImagePaths' (for editing/combining images).

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "image generation mcp server": {
            "image-creator-mcp": {
                "command": "npx",
                "args": [
                    "-y",
                    "@dfeirstein/image-server@latest"
                ]
            }
        }
    }
}

McpServers

{
    "image-creator-mcp": {
        "command": "npx",
        "args": [
            "-y",
            "@dfeirstein/image-server@latest"
        ]
    }
}

Image Generation MCP Server

This is a Model Context Protocol (MCP) server that allows compatible clients (like Cline, Claude Desktop, etc.) to generate images using OpenAI's API (gpt-image-1, dall-e-3, dall-e-2).

It provides a create_image tool that takes a text prompt and other parameters, generates the image, and saves it to a specified project's public directory.

Features

Generates images from text prompts using OpenAI models (gpt-image-1, dall-e-3, dall-e-2).
Edits and combines existing images using reference images with OpenAI's gpt-image-1 model.
Supports optional branding guidelines via a brandSignature parameter.
Allows specifying image size, quality, and background type (transparent or opaque).
Supports consistent visual styling through the styleDefinitionJSON parameter.
Saves generated images to a target project directory specified by the LLM client.
Includes detailed documentation within the source code (src/index.ts) for LLM usage guidance.
Provides unit tests for verification.

Prerequisites

1. Node.js: Version 18 or higher recommended.
2. npm: Comes with Node.js.
3. OpenAI API Key: You need an API key from OpenAI. Visit platform.openai.com/api-keys to create one. Note that usage of gpt-image-1 might require API Organization Verification.

Installation

Option 1: NPX Installation (Recommended)

The easiest way to install and use the image server is with NPX. This approach automatically provides updates whenever the server is restarted:

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.