@runapi.ai/gpt-image-2-mcp
OfficialThis MCP server provides access to the GPT Image 2 model on RunAPI, enabling AI agents to generate and edit images, monitor task progress, and check pricing.
Generate images from text (
text_to_image): Create a new image from a text prompt, with control over aspect ratio (e.g.,1:1,16:9,21:9), output resolution (1k,2k,4k), and whether to wait for the result or receive a task ID to poll later.Edit existing images (
edit_image): Submit one or more source image URLs along with a prompt to produce an edited image, with the same aspect ratio, resolution, and polling options.Poll task status (
get_task): Retrieve the current status and result payload (including output URLs) for a previously created task by providing its task ID and the endpoint it was created on (edit_imageortext_to_image).Check pricing (
check_pricing): Look up current pricing for the GPT Image 2 model and its endpoints — no API key required.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@runapi.ai/gpt-image-2-mcpGenerate an image of a futuristic city at night"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Why This Package?
@runapi.ai/gpt-image-2-mcp is a focused Model Context Protocol server for the GPT Image 2 model line on RunAPI.
It gives MCP-compatible assistants direct access to 2 endpoints and 1 model variant without loading the full RunAPI catalog.
Use this per-model server when an agent should stay scoped to GPT Image 2. Use @runapi.ai/mcp when one assistant should discover every RunAPI model line.
Related MCP server: Nano-Banana MCP Server
Install
Add it to Claude Code:
claude mcp add gpt-image-2 -s user -- npx -y @runapi.ai/gpt-image-2-mcpUse project scope when the server should be shared with a repository:
claude mcp add gpt-image-2 -s project -- npx -y @runapi.ai/gpt-image-2-mcpCodex, Cursor, Windsurf, VS Code, Roo Code, and other MCP hosts can use the same stdio command:
{
"mcpServers": {
"gpt-image-2": {
"command": "npx",
"args": ["-y", "@runapi.ai/gpt-image-2-mcp"]
}
}
}check_pricing works before sign-in. For task creation and status polling, ask your assistant to call the login tool. It opens a browser login and saves credentials to ~/.config/runapi/config.json, the same file used by runapi login.
Headless and CI hosts can still set RUNAPI_API_KEY before starting the MCP host.
Ready-made examples are in examples/ for Claude, Cursor, Windsurf, VS Code, and Roo Code.
Tools
Tool | Auth | Purpose |
| Yes | Create a GPT Image 2 edit image task and optionally wait for a terminal status. Returns the task id, status, and output URLs. |
| Yes | Create a GPT Image 2 text to image task and optionally wait for a terminal status. Returns the task id, status, and output URLs. |
| Yes | Fetch the current status and latest payload for an existing task. |
| No | Look up current pricing for a GPT Image 2 model and endpoint. |
Models
GPT Image 2 covers 1 model variant across 2 endpoints. Each tool accepts the models listed for it:
Tool | Models |
|
|
|
|
Model availability can change between releases. Use check_pricing or the GPT Image 2 model page for the current catalog view.
Agent Prompts
Ask your assistant in natural language; it can inspect pricing, create the task, and return the task id plus output URLs.
Create a task
Run a GPT Image 2 edit image task with RunAPI.The assistant can call check_pricing, then edit_image, and return the task id, status, and output URLs.
Submit without waiting
Create the task but don't wait for it to finish.The assistant calls the create tool with wait: false and returns the task id. Check on it later with get_task.
Check pricing before creating
Check current GPT Image 2 pricing, then create the task if it matches my request.The assistant calls check_pricing and can link to the GPT Image 2 model page for the canonical catalog entry.
Configuration
The server resolves auth in this order:
RUNAPI_API_KEYenvironment variable, useful for headless and CI hosts~/.config/runapi/config.json, created by the MCPlogintool orrunapi loginNo key, which still allows
check_pricing
The config file is normally managed by login. A pre-provisioned headless config can use:
{
"apiKey": "your_runapi_key"
}Do not commit real API keys.
Links
Resource | URL |
GPT Image 2 model page | |
npm package | |
GitHub repository | |
RunAPI MCP overview | |
RunAPI docs |
License
Licensed under the Apache License, Version 2.0.
Available Tools
5 toolscheck_pricingA
Look up RunAPI pricing for the gpt-image-2 model line.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model slug. Defaults to the line's primary model. | |
| action | No | Endpoint name. Defaults to the endpoint that offers the model. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. It correctly characterizes it as a lookup, implying read-only, but does not mention permissions, rate limits, or whether results are cached. The minimal description is adequate but does not exceed expectations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that directly states the tool's function with no unnecessary words or repetitions. It is optimally concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple pricing lookup with optional parameters, the description captures the core purpose. However, it does not mention that parameters are optional or that defaults apply, which could leave an agent unsure about what happens if no arguments are provided.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% coverage with parameter descriptions already defining defaults and enums. The tool description adds no new meaning about how parameters affect pricing results, so it meets the baseline but provides no extra value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('look up') and resource ('pricing'), and identifies the exact model line ('gpt-image-2'). It clearly distinguishes from sibling tools like edit_image or text_to_image, which perform actions rather than lookups.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
While the sibling names imply this is for pricing queries rather than image editing, the description provides no explicit guidance on when to use this tool versus alternatives, nor any conditions or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
edit_imageC
Create a GPT Image 2 task on RunAPI (edit image). Returns a task id, status, and output URLs.
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Poll until the task reaches a terminal status. | |
| model | No | RunAPI model slug for this model line. | |
| prompt | No | ||
| timeout_ms | No | ||
| aspect_ratio | No | ||
| poll_interval_ms | No | ||
| output_resolution | No | ||
| source_image_urls | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must fully disclose behavioral traits. It mentions the return of a task ID, status, and output URLs, but fails to cover important aspects such as the asynchronous nature of task creation, the need for polling (evident from parameters like 'wait' and 'poll_interval_ms'), authentication requirements, or rate limits. The description is insufficient for an agent to anticipate the tool's full behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, succinct sentence that communicates the core action and return values without extraneous detail. It front-loads the purpose ('Create a GPT Image 2 task') and efficiently includes the parenthetical clarification. Every word adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (8 parameters, no output schema, no annotations), the description is woefully incomplete. It does not address the editing workflow, the meaning of output fields, or the interplay between parameters. The agent lacks critical context to use the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 8 parameters, with only 2 having descriptions (25% coverage). The tool description adds no parameter-level information, failing to compensate for the low schema coverage. The description does not explain the role of key parameters like 'prompt', 'source_image_urls', or 'aspect_ratio' in the editing context, leaving the agent without necessary guidance.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool creates a GPT Image 2 task for editing images, using the verb 'Create' and the resource 'GPT Image 2 task'. However, it does not explicitly differentiate from the sibling tool 'text_to_image', which likely generates images. The parenthetical 'edit image' hints at the distinction but lacks explicit comparison.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'text_to_image' or 'get_task'. It omits any prerequisites, context, or conditions for appropriate usage, leaving the agent without decision-support information.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_taskA
Fetch the current status and latest result payload for a gpt-image-2 task.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Endpoint the task was created on. | |
| task_id | Yes | Task id returned when the task was created. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full transparency burden. It indicates a read-only operation ('Fetch'), which is appropriate, but it does not disclose any behavioral traits such as error handling, rate limits, or authorization requirements. The description is minimal and lacks depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence of 13 words. It is front-loaded with the action and resource, making it easy to process quickly. Every word is meaningful with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple fetch tool with no output schema, the description adequately states what is returned (status and latest result payload). However, it does not explain the format or potential error conditions. Given the tool's simplicity, it is mostly complete but could be slightly more detailed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Both parameters (task_id and action) are fully described in the input schema (100% coverage). The description does not add additional meaning beyond what the schema provides, so a baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Fetch' and the specific resource 'current status and latest result payload for a gpt-image-2 task'. It effectively distinguishes this tool from siblings like check_pricing, edit_image, and text_to_image by specifying its role as a status retrieval tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when a task has been created and its status is needed, but it lacks explicit guidance on when not to use it or mention of alternative tools. No exclusions or prerequisites are provided, leaving some ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
loginA
Authenticate RunAPI by opening a browser PKCE login flow and saving the API key to ~/.config/runapi/config.json.
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Re-run browser login when the current credential comes from the local config file. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses the browser flow and config file saving, offering good transparency. However, it could detail side effects like overwriting existing credentials or the behavior if already authenticated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no extraneous words, effectively communicating the tool's action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple authentication tool, the description is fairly complete, covering action and effect. It could mention return values or that subsequent calls are authenticated, but this is not a major gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the description adds no value beyond the schema's description of the 'force' parameter. Baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Authenticate' and the resource 'RunAPI', specifying the PKCE login flow and file path. It uniquely distinguishes from sibling tools like check_pricing and edit_image, which handle unrelated tasks.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for authentication but does not provide explicit guidance on when to use this tool versus alternatives, nor does it mention prerequisites or when to avoid it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
text_to_imageB
Create a GPT Image 2 task on RunAPI (text to image). Returns a task id, status, and output URLs.
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Poll until the task reaches a terminal status. | |
| model | No | RunAPI model slug for this model line. | |
| prompt | No | ||
| timeout_ms | No | ||
| aspect_ratio | No | ||
| poll_interval_ms | No | ||
| output_resolution | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavior. It indicates the tool creates an asynchronous task (via the return of a task id) and supports polling via wait/timeout parameters. However, it does not explicitly state the asynchronous nature, authorization requirements, or potential side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that covers the core purpose and outputs without unnecessary verbosity. It could be slightly more structured but is effective.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 7 parameters and no output schema or annotations, the description is minimal. It fails to explain the asynchronous workflow, output format details, or parameter dependencies, leaving gaps for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With only 29% schema description coverage, the description adds no additional parameter information. Parameters like aspect_ratio and output_resolution are left unexplained, and the description does not compensate for the schema's lack of detail.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Create a GPT Image 2 task'), the resource ('on RunAPI'), and the expected outputs ('Returns a task id, status, and output URLs'). It is distinct from sibling tools like edit_image and get_task.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives such as edit_image or check_pricing. The description does not specify prerequisites or scenarios where this tool is appropriate or inappropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v0.1.6- Added
login
4 tool updates
v0.1.0- First observed
check_pricing - First observed
edit_image - First observed
get_task - First observed
text_to_image
TDQS
Each tool serves a clearly distinct purpose: pricing lookup, edit image, task polling, authentication, and text-to-image. No overlap or ambiguity.
Most tools follow a verb_noun pattern (check_pricing, edit_image, get_task), but 'login' is a single verb, which is a minor deviation from the pattern. Still fairly consistent.
With 5 tools, the server is well-scoped for its purpose. It covers essential operations without being too sparse or bloated.
Covers core workflows: auth, pricing, two generation types, and task retrieval. Minor gaps like lacking a cancel or list tasks tool, but overall sufficient for typical usage.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for NanoBanana AI image generation and editing
MCP server for Flux AI image generation
An MCP server that integrates with Discord to provide AI-powered features.
MCP server for Qwen Image 3 AI image generation
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceAn MCP server that enables text-to-image generation and editing using OpenAI's gpt-image-1 model, supporting multiple output formats, quality settings, and background options.69-
- AlicenseAqualityDmaintenanceAn MCP server that provides AI image generation and editing capabilities using Google's Gemini 2.5 Flash Image API. It allows users to create new images from text, modify existing files, and perform iterative edits through natural language prompts.6758MIT
- FlicenseAqualityDmaintenanceMCP server for AI image generation supporting text-to-image and image-to-image editing via any OpenAI-compatible service, with configurable models, aspect ratios, and sizes.2-
- AlicenseAqualityDmaintenanceAn MCP server that generates and edits images using OpenAI's GPT Image model, allowing users to create images from text descriptions and edit existing images through natural language.117MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/runapi-ai/gpt-image-2-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server