z-image-mcp
This server provides AI agents with tools to create and monitor Z Image text-to-image generation tasks on RunAPI, and check pricing.
Generate images from text (
text_to_image): Submit a text prompt and aspect ratio (1:1, 4:3, 3:4, 16:9, 9:16) to create an image generation task. Supports optional polling until completion (wait: true/false), configurable timeout, and poll interval. Returns a task ID, status, and output image URLs.Check task status (
get_task): Retrieve the current status and latest result payload for a previously created task using its task ID.Look up pricing (
check_pricing): Fetch the current pricing snapshot for the Z Image model and its text-to-image endpoint — 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., "@z-image-mcpgenerate an image of a sunset over mountains"
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/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-mcpUse project scope when the server should be shared with a repository:
claude mcp add z-image -s project -- npx -y @runapi.ai/z-image-mcpCodex, 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 |
| Yes | Create a Z 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 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 |
|
|
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:
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 |
Z Image model page | |
npm package | |
GitHub repository | |
RunAPI MCP overview | |
RunAPI docs |
License
Licensed under the Apache License, Version 2.0.
Available Tools
3 toolscheck_pricingA
Look up RunAPI pricing for the z-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?
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | Task id returned when the task was created. | |
| action | No | Endpoint the task was created on. Defaults to the line's only endpoint. |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| aspect_ratio | Yes | ||
| wait | No | Poll until the task reaches a terminal status. | |
| timeout_ms | No | ||
| poll_interval_ms | No | ||
| model | No | RunAPI model slug for this model line. |
TDQS
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.
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.
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.
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.
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.
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.
3 tool updates
v0.1.0- First observed
check_pricing - First observed
get_task - First observed
text_to_image
TDQS
Scored across 3 tools
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.
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.
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.
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
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 images and videos from prompts, with options for image mixing, reference images, and start/…
130+ AI models for image, video, music, and audio — 18 model families, one RunAPI account.
- MorphedOAuthapp.morphed
Create AI images and videos, manage projects and credits, and use workspace campaign context.
Generate reproducible image, video, and audio assets with leading models and your own provider keys.
Related MCP Servers
AlicenseAqualityBmaintenanceEnables AI video and image generation through the Runway API. Supports video generation from images and text prompts, image creation, video upscaling and editing, and task management.72522MIT- AlicenseBqualityAmaintenanceEnables creating and managing GPT Image tasks (edit and text-to-image) via RunAPI, with options to poll status and check pricing.5107Apache 2.0
- 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 users to create image editing and text-to-image tasks, poll their status, and check pricing for the Nano Banana model line through a RunAPI API key.468Apache 2.0