← Back to directory
G

GPT Image 2 MCP Server

Community
Generate and save images through ChatGPT web or the OpenAI API via MCP.
Category
Other #647 of 678
Stars
★ 95 Popular
Transport
stdio (local process)
Runtime
Node.js 20+
Credentials
API key / credential required
License
MIT
Last commit
Tools
3
32FMRS · D

The README describes three MCP tools, a stdio server, two image-generation backends, and local file output. The server manifest was not cached, so additional configuration or capabilities cannot be verified from it.

Strongest · Documentation 8/20 Weakest · Reliability 4/20

Reliability
4/20
Security and permissions
8/20
Maintenance
5/20
Documentation
8/20
Setup experience
7/20
Why each score
Reliability 4/20
The README describes three tools, input validation, backend selection, and file output, but these claims are not corroborated by source files or tests. The manifest is not cached, and there is no verifiable evidence for startup, the MCP handshake, or error handling. The available static material is insufficient to confirm that tool behavior matches the implementation, so the score is low.
Security and permissions 8/20
The material mentions an API key, a reusable ChatGPT sign-in profile, browser automation, network requests, and local file writes, giving some visibility into data and side-effect scope. However, no source evidence explains key protection, browser-profile isolation, file permissions, or data-flow controls. Nothing provided demonstrates a red-line behavior, but the missing security details warrant deductions.
Maintenance 5/20
The supplied metadata says the repository is not archived, has an MIT license, and has one open issue. There is no evidence of release or commit activity, dependency updates, a security response channel, or maintainer governance. Stars do not affect this score.
Documentation 8/20
The README provides backend choices, a client configuration, tool names, output locations, environment variables, and development commands. However, parameter limits, costs, troubleshooting, and security boundaries are not sufficiently covered, and key implementation details are not verified against source files.
Setup experience 7/20
The README gives an npx configuration for Node.js 20 or newer and instructions for setting an API key, suggesting a short setup path. Actual installation compatibility, platform behavior, and MCP initialization have no verifiable execution evidence; the browser sign-in flow also depends on manual verification.

Static review · not runReviewed 2026-11-29

Read the FMRS scoring method →

Fit and risk

What it can accessWrites / deletes local filesUses the networkControls a browser

Best for

  • Users who want to generate and save images through an MCP client.
  • Users who can sign in to ChatGPT web or have an OpenAI API key.

Not for

  • Users who need image editing, batch workflows, or other capabilities not described in the README.
  • Users unable to sign in to ChatGPT web who also lack an OpenAI API key.

Required permissions

  • ChatGPT web mode requires a ChatGPT account and sign-in at chatgpt.com; first use may require login or verification.
  • API mode requires OPENAI_API_KEY.
  • The server needs local disk access to write generated images and metadata.json; web mode also stores a local sign-in profile.

Risks and side effects

  • Generated images and metadata are written to local disk; the output directory name is derived from the prompt.
  • Web mode opens Chrome or Edge and reuses a local ChatGPT sign-in profile, which should be protected.
  • Auto mode falls back to web mode only when the API backend is unavailable.

Setup

Before you start

Runtime:Node.js 20+

OPENAI_API_KEY optionalsecret Set this for the api backend; obtain the key from OpenAI.
Other optional settings (4)
GPT_IMAGE_BACKEND optional Selects api, chatgpt-web, or auto; the quick-start configuration uses chatgpt-web.
CHATGPT_WEB_PROFILE_DIR optional Optional path for the local ChatGPT sign-in profile.
CHATGPT_WEB_LOGIN_TIMEOUT_SECONDS optional Optional timeout in seconds for ChatGPT web sign-in.
CHATGPT_HIDE_WINDOW optional Optional; set to 0 to keep the ChatGPT window visible after sign-in.

Add the example configuration to your MCP client. On first use in chatgpt-web mode, the server opens ChatGPT so you can sign in or complete verification. For api mode, set OPENAI_API_KEY and set GPT_IMAGE_BACKEND to api.

MCP config · JSON
{"mcpServers":{"gpt-image-2":{"command":"npx","args":["-y","@ramlyburger/gpt-image-2-mcp"],"env":{"GPT_IMAGE_BACKEND":"chatgpt-web"}}}}

Works in clients that read an "mcpServers" key. For clients such as VS Code that use a different key, the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "gpt-image-2": {
      "command": "npx",
      "args": [
        "-y",
        "@ramlyburger/gpt-image-2-mcp"
      ],
      "env": {
        "GPT_IMAGE_BACKEND": "chatgpt-web"
      }
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

~/.codex/config.toml
[mcp_servers.gpt-image-2]
command = "npx"
args = ["-y", "@ramlyburger/gpt-image-2-mcp"]

[mcp_servers.gpt-image-2.env]
GPT_IMAGE_BACKEND = "chatgpt-web"

Append to ~/.codex/config.toml (OpenAI Codex CLI uses TOML).

Terminal
claude mcp add gpt-image-2 -e GPT_IMAGE_BACKEND=chatgpt-web -- npx -y @ramlyburger/gpt-image-2-mcp

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

Confirm that generate_image, backend_status, and browser_visibility appear in the client’s tool list. Call backend_status to check readiness, or request an image and confirm the result includes a saved file path.

Troubleshooting

  1. On first run, check that a browser opens and complete ChatGPT sign-in or verification.
  2. Check that GPT_IMAGE_BACKEND is set to api, chatgpt-web, or auto.
  3. For API mode, check that OPENAI_API_KEY is set; use backend_status to inspect readiness and output_root.
  4. Check that the local output directory is writable, and review the paths and metadata returned by generate_image.

Things to try

Once connected, you can ask your AI assistant things like:

  • Generate an image of a lighthouse by the sea at sunset.
  • Check whether the current image-generation backend is ready.
  • Start the ChatGPT session and keep the browser window visible.

Tools 3

generate_image writes
Generate images from a prompt, with optional backend, count, size, quality, output format, conversation mode, and timeout settings.
backend_status read-only
Check readiness and configuration for a selected backend; requesting auto can report on both backends.
browser_visibility writes
Control the ChatGPT window's visibility and optionally start a ChatGPT session.

Use cases

Generate images from MCP client prompts and save them locally.
Choose between ChatGPT web and direct OpenAI API image generation.

Overview

GPT Image 2 MCP Server is a TypeScript MCP server that exposes image generation tools to compatible MCP clients. It supports ChatGPT web mode, OpenAI API mode, and an automatic mode that tries the API first, then saves generated images and JSON metadata to a local directory.

Similar servers

Source revision 9240da04df2a Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/gpt-image-2-mcp.svg)](https://followmcp.com/en/servers/gpt-image-2-mcp)