MCP.so
登录

MCP OpenAI Image Generation Server

@spartanz51

基本信息

分类

AI 与智能体

传输方式

stdio

作者

spartanz51

关于 MCP OpenAI Image Generation Server

MCP server for OpenAI Image Generation & Editing — text-to-image, image-to-image (with mask), no extra plugins.

MCP OpenAI Image Generation Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "image-generator-gpt-image-15": {
      "command": "npx imagegen-mcp --models gpt-image-1",
      "env": {
        "OPENAI_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

MCP OpenAI Image Generation Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is 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. It exposes image generation and editing capabilities as MCP tools, enabling integration with MCP-compatible clients. The server is intended for developers who want to use OpenAI's image models through the MCP standard.

How to use MCP OpenAI Image Generation Server?

The server can be run directly via npx imagegen-mcp [options]. It requires Node.js v18 or later and an OpenAI API key set in the OPENAI_API_KEY environment variable. After cloning the repository, install dependencies with npm install, build with npm run build, and run with node dist/index.js [options]. The server uses the StdioServerTransport to communicate via standard input/output.

Key features of MCP OpenAI Image Generation Server

  • Exposes OpenAI image generation through MCP tools
  • Supports text-to-image generation with multiple models
  • Supports image-to-image editing with optional masks
  • Configurable via environment variables and command-line arguments
  • Handles parameters like size, style, quality, and format
  • Saves generated images to temporary files and returns paths

Use cases of MCP OpenAI Image Generation Server

  • Generating images from text prompts directly in MCP-compatible editors
  • Editing existing images by providing a prompt and optional mask
  • Integrating AI image creation into development workflows and IDEs

常见问题

1

What are the prerequisites to use this server?

Node.js v18 or later, npm or yarn, and a valid OpenAI API key with access to the selected image generation models.

2

How does the server communicate with clients?

The server uses the standard MCP `StdioServerTransport`, communicating via standard input and output streams.

3

Which models are supported for image generation?

The server supports DALL-E 2, DALL-E 3, and gpt-image-1 (if available/enabled) for text-to-image. Image-to-image editing supports DALL-E 2 and gpt-image-1.

4

Are there any model-specific limitations?

DALL-E 3 only supports generating a single image per request (`n=1`). The `style` parameter (`vivid`/`natural`) is only applicable to DALL-E 3. Models are selected via the `--models` command-line argument, and the API key must have access to the chosen models.

5

How are generated images returned to the client?

Each generated image is saved to a temporary file, and the server returns the file path along with the base64 data of the image.

评论

AI 与智能体 分类下的更多 MCP 服务器