Skip to main content
Glama
runapi-ai
by runapi-ai

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-mcp

Use project scope when the server should be shared with a repository:

claude mcp add gpt-image -s project -- npx -y @runapi.ai/gpt-image-mcp

Codex, 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

edit_image

Yes

Create a GPT Image edit image task and optionally wait for a terminal status. Returns the task id, status, and output URLs.

text_to_image

Yes

Create a GPT Image text to image task and optionally wait for a terminal status. Returns the task id, status, and output URLs.

get_task

Yes

Fetch the current status and latest payload for an existing task.

check_pricing

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

edit_image

gpt-image-1.5

text_to_image

gpt-image-1.5

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:

  1. RUNAPI_API_KEY environment variable, useful for headless and CI hosts

  2. ~/.config/runapi/config.json, created by the MCP login tool or runapi login

  3. No 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.


Resource

URL

GPT Image model page

https://runapi.ai/models/gpt-image

npm package

@runapi.ai/gpt-image-mcp

GitHub repository

runapi-ai/gpt-image-mcp

RunAPI MCP overview

runapi.ai/mcp

RunAPI docs

runapi.ai/docs


License

Licensed under the Apache License, Version 2.0.

Available Tools

5 tools
check_pricingB

Look up RunAPI pricing for the gpt-image model line.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoModel slug. Defaults to the line's primary model.
actionNoEndpoint name. Defaults to the endpoint that offers the model.

TDQS

B3.1/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
waitNoPoll until the task reaches a terminal status.
modelNoRunAPI model slug for this model line.
promptYes
qualityYes
timeout_msNo
aspect_ratioYes
callback_urlNo
poll_interval_msNo
source_image_urlsYes

TDQS

B3.1/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters1/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYesAsynchronous endpoint the task was created on.
task_idYesTask id returned when the task was created.

TDQS

A3.7/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
forceNoRe-run browser login when the current credential comes from the local config file.

TDQS

A3.9/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
waitNoPoll until the task reaches a terminal status.
modelNoRunAPI model slug for this model line.
promptYes
qualityYes
timeout_msNo
aspect_ratioYes
callback_urlNo
poll_interval_msNo

TDQS

C2.6/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness1/5

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.

Parameters1/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

  1. 3 tool updatesv0.1.8
    • Changededit_image5 fields changed
      • addedInput schema / properties / callback_url
        Added value: +{
        +  "type": "string"
        +}
      • addedInput schema / properties / prompt / type
        Added value: +"string"
      • addedInput schema / properties / source_image_urls / items
        Added value: +{}
      • addedInput schema / properties / source_image_urls / type
        Added value: +"array"
      • changedInput schema / required
        Previous value: -[
        -  "quality",
        -  "aspect_ratio"
        -]New value: +[
        +  "prompt",
        +  "source_image_urls",
        +  "aspect_ratio",
        +  "quality"
        +]
    • Changedget_task1 field changed
      • changedInput schema / properties / action / description
        Previous value: -"Endpoint the task was created on."New value: +"Asynchronous endpoint the task was created on."
    • Changedtext_to_image3 fields changed
      • addedInput schema / properties / callback_url
        Added value: +{
        +  "type": "string"
        +}
      • addedInput schema / properties / prompt / type
        Added value: +"string"
      • changedInput schema / required
        Previous value: -[
        -  "quality",
        -  "aspect_ratio"
        -]New value: +[
        +  "prompt",
        +  "aspect_ratio",
        +  "quality"
        +]
  2. 1 tool updatev0.1.6
    • Addedlogin
  3. 4 tool updatesv0.1.0
    • First observedcheck_pricing
    • First observededit_image
    • First observedget_task
    • First observedtext_to_image

TDQS

B3.4/5.0
Disambiguation5/5

Each tool targets a distinct purpose: pricing, two different image generation modes (edit vs text-to-image), task status retrieval, and authentication. No overlaps.

Naming Consistency4/5

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.

Tool Count5/5

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.

Completeness4/5

Core workflows (pricing, generation, status polling) are present, but missing task management like listing or cancellation, which are minor gaps.

Maintenance

ActivitySlowing
ResponsivenessSyncing

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

Related MCP Servers

Latest Blog Posts

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