# gpt-image-2-mcp [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/runapi-ai/gpt-image-2-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 900  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/gpt-image-2-mcp

## Description
RunAPI MCP server for GPT Image 2: create tasks, poll status, and check pricing.

## Tools
Capabilities this server exposes over MCP:

- **login** — Authenticate RunAPI by opening a browser PKCE login flow and saving the API key to ~/.config/runapi/config.json.
- **edit_image** — Create a GPT Image 2 task on RunAPI (edit image). Returns a task id, status, and output URLs.
- **text_to_image** — Create a GPT Image 2 task on RunAPI (text to image). Returns a task id, status, and output URLs.
- **get_task** — Fetch the current status and latest result payload for a gpt-image-2 task.
- **check_pricing** — Look up RunAPI pricing for the gpt-image-2 model line.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "gpt-image-2-mcp": {
    "command": "npx",
    "args": ["-y","@runapi.ai/gpt-image-2-mcp"],
    "env": {
      "RUNAPI_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `RUNAPI_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What gpt-image-2-mcp does

gpt-image-2-mcp exposes RunAPI access to the GPT Image 2 model through the Model Context Protocol. Its scope is limited to GPT Image 2 rather than the broader RunAPI catalog, making it suitable when an assistant should work with one image model and its supported operations.

The server supports two task-creation workflows: generating an image from text and editing an existing image. Both return a task identifier, status information, and output URLs when available. The creation tools can either wait for a terminal result or submit the task for later inspection.

## How it works

The server runs as a standard stdio MCP process. MCP hosts start it with `npx`, and an assistant invokes the exposed tools through its normal tool-calling interface. A task can be submitted with waiting disabled, then checked later using its task ID and `get_task`.

Authentication is needed for task creation and status retrieval. The server can use a RunAPI API key from the environment or credentials stored in RunAPI's configuration file. The MCP `login` flow opens a browser-based login and stores credentials at `~/.config/runapi/config.json`; the same file can also be managed by `runapi login`. Pricing lookup is available without signing in.

## Setup and configuration

For Claude Code, the package can be registered with:

```bash
claude mcp add gpt-image-2 -s user -- npx -y @runapi.ai/gpt-image-2-mcp
```

Use project scope instead when sharing the MCP registration with a repository. Other supported hosts can use the same stdio command with `npx` and the `@runapi.ai/gpt-image-2-mcp` package as its argument.

Headless or CI environments can provide `RUNAPI_API_KEY` before starting the MCP host. Alternatively, a pre-provisioned configuration file can contain an `apiKey` value. API keys should not be committed to source control.

## Tools and capabilities

- `text_to_image` submits a GPT Image 2 text-to-image task. It can wait for completion and returns the task ID, status, and output URLs.
- `edit_image` submits an image-editing task with the same optional waiting behavior and result fields.
- `get_task` retrieves the latest status and payload for an existing task.
- `check_pricing` looks up pricing for a GPT Image 2 model and endpoint without authentication.

Both image-generation tools use the `gpt-image-2` model variant. An assistant can check pricing before creating a task, submit work without waiting, and retrieve it later with the returned identifier.

## Limitations and notes

This package is intended for GPT Image 2 and does not provide the complete RunAPI model catalog. Model availability can change between package releases, so pricing lookup or the GPT Image 2 model page should be used for the current catalog view.

Task creation and status polling require RunAPI authentication, while pricing checks do not. The server returns output URLs when the relevant task result makes them available; submitting with waiting disabled returns the task ID for later polling instead of waiting for a terminal status.

_Full upstream README: https://allmcps.com/mcp/gpt-image-2-mcp/readme_

