npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@iflow-mcp/jerryzhao173985-openai-image-gen-mcp

v1.0.0

Published

MCP server for OpenAI image generation

Downloads

21

Readme

OpenAI Image Generation MCP

A Model Context Protocol (MCP) server for OpenAI image generation API. This MCP enables AI assistants like Claude to generate and edit images using OpenAI's GPT-image-1 model.

Table of Contents

Features

  • Generate images using OpenAI's image generation models
  • Edit existing images with text prompts and optional masks
  • Automatically save generated images to local storage
  • Optionally upload generated images to Cloudflare ImgBed
  • Health check endpoint to verify server status
  • Multiple ways to provide API key (env var, command line, direct)

Installation

  1. Clone the repository and install dependencies:
git clone https://github.com/yourusername/openai-image-gen-mcp.git
cd openai-image-gen-mcp
npm install
  1. Build the TypeScript project:
npm run build

Quick Start

1. Using the Run Script (Recommended for Production)

The easiest way to start the full-featured MCP server:

./run-with-key.sh

This script has the API key embedded and starts the MCP server with all features.

2. Using Direct API Key (For Testing)

node hardcoded-key.js

This is a simplified version with the API key directly embedded in the code.

3. Using Environment Variables

export OPENAI_API_KEY=your-api-key
./start.sh

Configuration

Claude MCP Configuration

To connect Claude to this MCP, use this configuration file:

{
  "mcpServers": {
    "openai-image-gen": {
      "command": "node",
      "args": ["/Users/jerry/openai-image-gen-mcp/build/index.js"]
    }
  }
}

⚠️ IMPORTANT: Use the full-featured compiled version (build/index.js) for production. The simplified versions are for testing and education only.

Available Tools

The MCP provides these tools to Claude:

  1. oai_generate_image - Generate images from text prompts
  2. oai_edit_image - Edit existing images with text prompts
  3. health_check - Verify the server's health status

Example usage in Claude:

Generate an image of a sunset over mountains with a lake in the foreground.

Claude will use the appropriate MCP tool to create the image.

Detailed Documentation

For more detailed information, please see:

Directory Structure

openai-image-gen-mcp/
├── build/              # Compiled JavaScript code
├── docs/               # Documentation files
├── output/             # Generated images
├── src/                # TypeScript source code
│   ├── config.js       # Configuration management
│   └── index.ts        # Main MCP server implementation
├── *.sh                # Helper scripts
├── *.js                # Simplified versions and utilities
└── *.json              # Configuration files

Troubleshooting

If you encounter problems:

  1. Check that your API key is valid and properly formatted
  2. Ensure the output directory exists and is writable
  3. Run the health check to verify server status
  4. Check logs for detailed error information
  5. Try the simplified version to isolate issues

For more help, see the Troubleshooting section in the guidelines.