# GPT Image 2 MCP Server

> Generate and save images through ChatGPT web or the OpenAI API via MCP.

- **URL**: https://followmcp.com/en/servers/gpt-image-2-mcp
- **Category**: Other
- **Origin**: Community
- **Stars**: 95
- **FMRS Score**: 32/100 (Grade D)
- **Source**: https://github.com/lownamlee/gpt-image-2-mcp
- **Transports**: stdio (local process)
- **Runtimes**: Node.js 20+
- **Auth**: API key / credential required

## 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.

## 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
- 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.

## Client config (JSON)
```json
{"mcpServers":{"gpt-image-2":{"command":"npx","args":["-y","@ramlyburger/gpt-image-2-mcp"],"env":{"GPT_IMAGE_BACKEND":"chatgpt-web"}}}}
```

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