GPT Image MCP Server
This server provides AI agents with focused access to GPT Image generation capabilities via RunAPI, supporting image creation, editing, task management, and pricing lookups.
text_to_image: Generate images from a text prompt using thegpt-image-1.5model, with control over quality (mediumorhigh) and aspect ratio (1:1,2:3, or3:2).edit_image: Submit source image URLs along with a prompt to produce edited/modified images, with the same quality and aspect ratio options.get_task: Fetch the current status and result payload for a previously created task using its task ID.check_pricing: Retrieve the current pricing snapshot for the GPT Image model line, optionally filtered by model variant or endpoint.
Additional options:
Both
text_to_imageandedit_imagesupport awaitparameter — set totrueto poll until the task completes and receive output URLs immediately, orfalseto get just the task ID and check back later.Polling behavior is configurable via
timeout_msandpoll_interval_msparameters.
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., "@GPT Image MCP ServerCreate a text-to-image of a futuristic city skyline."
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-mcp is a focused Model Context Protocol server for the GPT Image 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. Use @runapi.ai/mcp when one assistant should discover every RunAPI model line.
Related MCP server: grok-imagine-mcp
Install
Add it to Claude Code:
claude mcp add gpt-image -s user -- npx -y @runapi.ai/gpt-image-mcpUse project scope when the server should be shared with a repository:
claude mcp add gpt-image -s project -- npx -y @runapi.ai/gpt-image-mcpCodex, Cursor, Windsurf, VS Code, Roo Code, and other MCP hosts can use the same stdio command:
{
"mcpServers": {
"gpt-image": {
"command": "npx",
"args": ["-y", "@runapi.ai/gpt-image-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 edit image task and optionally wait for a terminal status. Returns the task id, status, and output URLs. |
| Yes | Create a GPT Image 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 model and endpoint. |
Models
GPT Image 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 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 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 pricing, then create the task if it matches my request.The assistant calls check_pricing and can link to the GPT Image 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 model page | |
npm package | |
GitHub repository | |
RunAPI MCP overview | |
RunAPI docs |
License
Licensed under the Apache License, Version 2.0.
Available Tools
5 toolscheck_pricingB
Look up RunAPI pricing for the gpt-image 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 carries the full burden of behavioral disclosure, but it only states the basic purpose. It does not indicate whether the tool is read-only, what data is returned, if authentication is required, or any side effects. The agent lacks critical behavioral information.
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 conveys the core function with no extraneous words. It is front-loaded and efficient, earning its place.
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 lookup tool with optional parameters and no output schema, the description is adequate but not complete. It omits details about what the returned pricing information includes (e.g., per-token costs, endpoint-specific rates). The description could be improved by mentioning the output format or the scope of pricing data 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?
Schema description coverage is 100%, so the schema already documents both parameters with enums and descriptions. The description adds minimal value beyond confirming the model line scope. The default behavior (primary model, default endpoint) is implied but not explicitly stated, and there is no elaboration on how parameters affect the result.
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 tool looks up pricing for the gpt-image model line. It identifies the resource (pricing) and action (look up), and the sibling tools (edit_image, text_to_image) are clearly different in purpose, so no confusion. However, 'Look up' is somewhat generic and could be more specific like 'Retrieve pricing information'.
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 vs alternatives. It does not mention prerequisites, when to omit parameters, or when to use sibling tools for specific actions. The agent is left to infer usage without explicit context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
edit_imageB
Create a GPT Image 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 | Yes | ||
| quality | Yes | ||
| timeout_ms | No | ||
| aspect_ratio | Yes | ||
| callback_url | No | ||
| poll_interval_ms | No | ||
| source_image_urls | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions returning a task id and status, hinting at asynchronous behavior, but does not explain polling, wait semantics, callback_url, or how output URLs become available. It omits authentication requirements, rate limits, and whether the operation is blocking. The description provides minimal insight into the task lifecycle.
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 front-loads the action ('Create a GPT Image task') and includes essential context (edit image, return values). There is no redundancy or wasted words, exemplifying efficient structure.
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 9 parameters, no output schema, and no annotations, the description is too sparse to be complete. It does not explain the overall workflow (e.g., pairing with get_task to retrieve results), the async behavior controlled by wait, or how callback_url and poll_interval_ms function. The description leaves significant gaps for a complex task-based tool.
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 description coverage is only 22% (2 of 9 parameters have descriptions). The tool description adds no parameter details beyond the name 'edit image,' failing to clarify required parameters like prompt, source_image_urls, aspect_ratio, or quality. It does not compensate for the low schema coverage, leaving the agent without meaningful guidance on how to construct valid requests.
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 tool's function: 'Create a GPT Image task on RunAPI (edit image).' This distinguishes it from sibling tools like text_to_image by explicitly indicating it handles image editing. It also states return values (task id, status, output URLs), making the purpose unambiguous.
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 image editing but provides no explicit guidance on when to use this tool versus alternatives like text_to_image. It does not mention prerequisites (e.g., needing a source image URL) or complementary tools like get_task for retrieval. Guidance is only implicit through the tool's name and the phrase 'edit image.'
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 task.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Asynchronous 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?
No annotations are provided, so the description carries the full burden. It discloses the non-mutating nature via the verb 'fetch' and scopes to gpt-image tasks, but does not mention expected behaviors like polling intervals, error handling, or that the task might still be processing. This is acceptable but not rich.
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 is direct and free of unnecessary wording. It front-loads the core purpose and earns its place without 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 and no annotations, the description conveys the primary function but omits details about what the status values might be or whether the result payload is always present. This is a minor gap given the low complexity.
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 schema covers 100% of parameters with descriptions for task_id and action. The description does not add meaning beyond the schema, but the schema already provides clear semantics for both parameters, 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 tool fetches the current status and latest result payload for a gpt-image task. The verb 'fetch' and specific resource ('status and latest result payload') distinguish it from sibling creation tools like edit_image and text_to_image.
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 the tool is used to poll an asynchronous gpt-image task for its status/result, but it does not explicitly state when to use it versus alternatives or provide exclusions. The context of siblings suggests it is the retrieval counterpart to the creation endpoints, but this is not made explicit.
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?
The description discloses key behavioral traits: it opens a browser (interactive), performs a PKCE flow, and writes to a config file. This goes beyond what annotations (none) provide. However, it does not mention potential issues like browser dependency or timeouts, so it is not a perfect score.
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, well-structured sentence that conveys all essential information without any unnecessary words. It is concise and front-loaded with the 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?
Given the absence of an output schema, the description does not explain what the tool returns (e.g., success confirmation or API key). It focuses on the side effect (saving to config) but omits the immediate output. For a login tool, this is a notable gap, though the description is otherwise comprehensive.
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 covers 100% of parameters, with the 'force' parameter already described in the schema. The description does not add additional meaning about the parameter beyond what the schema provides; it is separate. Thus 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 tool's purpose: authenticating RunAPI via a browser PKCE login flow and saving the API key to a config file. It uses specific verbs ('Authenticate', 'opening', 'saving') and identifies the resource ('RunAPI') and the output location. This distinguishes it from sibling tools which deal with pricing, image editing, etc.
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 does not explicitly state when to use the tool or when to avoid it. It implies it is for initial authentication, but lacks guidance on scenarios such as already having a valid key or needing to re-authenticate. No mention of alternatives or prerequisites is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
text_to_imageC
Create a GPT Image 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 | Yes | ||
| quality | Yes | ||
| timeout_ms | No | ||
| aspect_ratio | Yes | ||
| callback_url | No | ||
| poll_interval_ms | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must fully disclose behavior, but it only mentions return values (task id, status, output URLs). It omits important details like potential blocking behavior (wait parameter), polling mechanics, asynchronous task lifecycle, and any rate limits or auth requirements. This is insufficient transparency for a task-creation tool.
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, front-loaded sentence that directly states the core purpose and returns. It contains no redundancy or filler, making it appropriately concise for a tool whose complexity is not conveyed elsewhere.
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, asynchronous behavior, no annotations, and no output schema—the description is drastically under-specified. It lacks usage guidance, parameter semantics, and behavioral disclosures beyond a minimal return statement, rendering it incomplete for effective tool selection and invocation.
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 description coverage is only 25%, and the tool description does not explain any of the 8 parameters. With 3 required parameters (prompt, aspect_ratio, quality) and additional control parameters (wait, timeout_ms, callback_url, poll_interval_ms), the lack of parameter meaning in both schema and description makes it impossible for an agent to correctly set values without external knowledge.
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 a specific action ('Create a GPT Image task') and resource (RunAPI, text to image), which distinguishes it from sibling tools like edit_image and get_task. It is not explicitly contrasted with those tools, but the creation/generation purpose is evident.
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 explicit guidance on when to use this tool versus alternatives. It implies usage for generating text-to-image tasks but does not mention exclusions, prerequisites, or comparisons to edit_image or get_task, leaving the agent without clear selection criteria.
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.
3 tool updates
v0.1.8- Changed
edit_image5 fields changed- added
Input schema / properties / callback_urlAdded value: +{ + "type": "string" +} - added
Input schema / properties / prompt / typeAdded value: +"string" - added
Input schema / properties / source_image_urls / itemsAdded value: +{} - added
Input schema / properties / source_image_urls / typeAdded value: +"array" - changed
Input schema / requiredPrevious value: -[ - "quality", - "aspect_ratio" -]New value: +[ + "prompt", + "source_image_urls", + "aspect_ratio", + "quality" +]
- Changed
get_task1 field changed- changed
Input schema / properties / action / descriptionPrevious value: -"Endpoint the task was created on."New value: +"Asynchronous endpoint the task was created on."
- Changed
text_to_image3 fields changed- added
Input schema / properties / callback_urlAdded value: +{ + "type": "string" +} - added
Input schema / properties / prompt / typeAdded value: +"string" - changed
Input schema / requiredPrevious value: -[ - "quality", - "aspect_ratio" -]New value: +[ + "prompt", + "aspect_ratio", + "quality" +]
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 targets a distinct purpose: pricing, two different image generation modes (edit vs text-to-image), task status retrieval, and authentication. No overlaps.
Tool names are predominantly verb_noun in snake_case (check_pricing, edit_image, get_task), but login is a lone verb and text_to_image uses a noun phrase pattern, breaking full consistency.
Five tools cover the essential operations for an image generation server: authentication, pricing, two generation types, and result retrieval. The count is well-scoped for this domain.
Core workflows (pricing, generation, status polling) are present, but missing task management like listing or cancellation, which are minor gaps.
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
Create AI images and videos, manage projects and credits, and use workspace campaign context.
Create images and videos from prompts, with options for image mixing, reference images, and start/…
Generate images with your own ChatGPT subscription (Plus, Pro or Team), without spending API credits
Create and manage AI image and video generations through Quriov's fixed public MCP tools.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables image generation and editing using OpenAI's GPT Image API (gpt-image-1, 1.5, 2) with support for multi-image generation, history management, and batch processing.121151MIT
- AlicenseBqualityAmaintenanceEnables AI image and video generation tasks (text-to-image, image-to-video, edit, upscale, etc.) via RunAPI, with support for polling and pricing lookups.10280Apache 2.0
- AlicenseAqualityAmaintenanceEnables image editing, remixing, and text-to-image generation using Qwen 2 models via RunAPI. Supports task polling and pricing checks.572Apache 2.0
- AlicenseAqualityAmaintenanceEnables background removal and upscaling of images using Recraft models via RunAPI, with task polling and pricing lookup.568Apache 2.0
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-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server