Skip to main content
Glama

Why This Package?

@runapi.ai/z-image-mcp is a focused Model Context Protocol server for the Z Image model line on RunAPI. It gives MCP-compatible assistants direct access to 1 endpoint and 1 model variant without loading the full RunAPI catalog.

Use this per-model server when an agent should stay scoped to Z Image. Use @runapi.ai/mcp when one assistant should discover every RunAPI model line.


Related MCP server: GPT Image MCP Server

Install

Add it to Claude Code:

claude mcp add z-image -s user -- npx -y @runapi.ai/z-image-mcp

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

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

Codex, Cursor, Windsurf, VS Code, Roo Code, and other MCP hosts can use the same stdio command:

{
  "mcpServers": {
    "z-image": {
      "command": "npx",
      "args": ["-y", "@runapi.ai/z-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

text_to_image

Yes

Create a Z 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 Z Image model and endpoint.


Models

Z Image covers 1 model variant across 1 endpoint. Each tool accepts the models listed for it:

Tool

Models

text_to_image

z-image

Model availability can change between releases. Use check_pricing or the Z 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 Z Image text to image task with RunAPI.

The assistant can call check_pricing, then text_to_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 Z Image pricing, then create the task if it matches my request.

The assistant calls check_pricing and can link to the Z 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

Z Image model page

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

npm package

@runapi.ai/z-image-mcp

GitHub repository

runapi-ai/z-image-mcp

RunAPI MCP overview

runapi.ai/mcp

RunAPI docs

runapi.ai/docs


License

Licensed under the Apache License, Version 2.0.

Available Tools

3 tools
check_pricingA

Look up RunAPI pricing for the z-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

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided; description indicates a read operation (look up) which is benign, but lacks details on any side effects, permissions needed, or other behavioral traits.

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?

Single sentence with no redundant words; efficient and front-loaded with the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool is simple with few parameters and no output schema; description covers the basic purpose adequately, though return value format is not mentioned.

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 has 100% coverage with enums; description adds minimal meaning beyond schema (specifies model line), but does not explain action parameter further.

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?

Description clearly states the tool looks up RunAPI pricing specifically for the z-image model line, which is distinct from sibling tools like text_to_image (generation) and get_task (tasks).

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?

Implies usage when needing pricing for z-image, but no explicit when-to-use or when-not-to-use guidance, nor mention of alternatives for other pricing queries.

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 z-image task.

ParametersJSON Schema
NameRequiredDescriptionDefault
task_idYesTask id returned when the task was created.
actionNoEndpoint the task was created on. Defaults to the line's only endpoint.

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 full burden. It discloses a fetch operation (read-only), but does not mention behavior on missing tasks, permissions, or other side effects. The description is minimally adequate.

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 with no wasted words. It efficiently conveys the tool's purpose.

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?

Despite having 2 params and no output schema, the description provides basic context. However, it lacks details on response format, error handling, or typical usage flow, keeping it from being fully complete.

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 adequately. The tool description adds context linking action to the 'z-image task', but does not significantly enhance meaning beyond the schema.

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 action 'Fetch' and the resource 'current status and latest result payload for a z-image task'. It is specific and distinguishes the tool from siblings (check_pricing, text_to_image) by focusing on task status retrieval.

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 this tool versus alternatives. While it implies post-creation task checking, no when-not-to-use or alternative guidance 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 Z Image task on RunAPI (text to image). Returns a task id, status, and output URLs.

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

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided. Description only mentions return fields (task id, status, output URLs) but not side effects, authorization needs, rate limits, or any behavioral traits beyond the basic creation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, efficient, and front-loaded with key action and output. However, overly concise, missing needed details.

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?

For a tool with 6 parameters, no output schema, and async behavior, the description omits important context like job lifecycle, polling behavior, and response structure. Incomplete for robust usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only 33% of parameters have descriptions in schema. Description adds no parameter-level details, leaving prompt, aspect_ratio, timeout, etc. unexplained beyond their schema definitions.

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?

Description clearly states the verb 'Create', resource 'Z Image task on RunAPI', and purpose 'text to image'. It distinguishes from siblings (check_pricing, get_task) by specifying the action and output.

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?

No guidance on when to use this tool versus alternatives. Siblings are provided but no differentiation or conditions for use.

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.

  1. 3 tool updatesv0.1.0
    • First observedcheck_pricing
    • First observedget_task
    • First observedtext_to_image

TDQS

B3.4/5.0

Scored across 3 tools

Disambiguation5/5

Each tool serves a distinct purpose: check_pricing for price lookups, get_task for status retrieval, and text_to_image for generation. There is no functional overlap.

Naming Consistency4/5

All tools use lowercase snake_case, but 'text_to_image' is a descriptive noun phrase rather than a verb_noun pattern like the other two. This is a minor deviation from an otherwise consistent style.

Tool Count3/5

With only three tools, the server feels minimal for an image generation service. While each tool is justified, the count is at the low end of what would be expected, leaving some workflows uncovered.

Completeness3/5

The server covers creation (text_to_image) and status checking (get_task), plus pricing. However, missing operations like listing all tasks or canceling a task are notable gaps that agents may encounter.

Maintenance

ActivitySlowing
ResponsivenessNo issues

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