RunAPI Qwen Image MCP Server
OfficialClick on "Deploy 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 Qwen Image MCP ServerGenerate an image of a sunset over the ocean."
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/qwen-image-mcp is a focused Model Context Protocol server for the Qwen Image model line on RunAPI.
It gives MCP-compatible assistants direct access to 3 endpoints and 3 model variants without loading the full RunAPI catalog.
Use this per-model server when an agent should stay scoped to Qwen Image. Use @runapi.ai/mcp when one assistant should discover every RunAPI model line.
Related MCP server: imagen-4-mcp
Install
Add it to Claude Code:
claude mcp add qwen-image -s user -- npx -y @runapi.ai/qwen-image-mcpUse project scope when the server should be shared with a repository:
claude mcp add qwen-image -s project -- npx -y @runapi.ai/qwen-image-mcpCodex, Cursor, Windsurf, VS Code, Roo Code, and other MCP hosts can use the same stdio command:
{
"mcpServers": {
"qwen-image": {
"command": "npx",
"args": ["-y", "@runapi.ai/qwen-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 Qwen Image edit image task and optionally wait for a terminal status. Returns the task id, status, and output URLs. |
| Yes | Create a Qwen Image remix image task and optionally wait for a terminal status. Returns the task id, status, and output URLs. |
| Yes | Create a Qwen 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 Qwen Image model and endpoint. |
Models
Qwen Image covers 3 model variants across 3 endpoints. Each tool accepts the models listed for it:
Tool | Models |
|
|
|
|
|
|
Model availability can change between releases. Use check_pricing or the Qwen 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 Qwen 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 Qwen Image pricing, then create the task if it matches my request.The assistant calls check_pricing and can link to the Qwen 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 |
Qwen Image model page | |
npm package | |
GitHub repository | |
RunAPI MCP overview | |
RunAPI docs |
License
Licensed under the Apache License, Version 2.0.
Available Tools
6 toolscheck_pricingB
Look up RunAPI pricing for the qwen-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 are provided, so the description carries the burden. The description implies a read-only lookup ('look up') but doesn't explicitly state it makes no changes, doesn't disclose any side effects, authentication needs, or response characteristics. It's a low-risk read operation, so the minimal disclosure is moderately acceptable, but richer behavioral context would help.
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 that is appropriately sized for a simple lookup tool. No wasted words. It could add slightly more context, but for the tool's apparent simplicity, this length is appropriate.
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 a 2-param tool with full schema coverage and no output schema, the description is reasonably complete. However, no output schema exists, so the description could have disclosed what the pricing response looks like (per-unit costs, tiers, currency), which would help the agent interpret results. This is a moderate gap for a pricing lookup 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?
Both parameters have 100% schema description coverage with enums and helpful descriptions. The description adds no additional parameter detail beyond what the schema provides, so the baseline of 3 applies. With no params that require extra explanation and schema coverage at 100%, the description adequately distributes responsibility.
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 RunAPI pricing for the qwen-image model line. Verb (look up) + resource (RunAPI pricing) + scope (qwen-image) is specific. However, it doesn't distinguish itself from sibling tools, though the siblings are mostly functional endpoint tools (edit_image, remix_image, text_to_image) that are clearly different in nature.
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. It doesn't explain that it's complementary to the sibling endpoint tools (e.g., check pricing before calling edit_image). No explicit alternatives or when-not-to-use scenarios are given. The timing/value of checking pricing before invoking an operation is implied but never stated.
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 Qwen Image task on RunAPI (edit image). Returns a task id, status, and output URLs.
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Integer seed for reproducible results. | |
| wait | No | Poll until the task reaches a terminal status. | |
| model | No | RunAPI model slug for this model line. | |
| prompt | Yes | Edit instruction for the source image. | |
| timeout_ms | No | ||
| aspect_ratio | No | Output aspect ratio. | |
| callback_url | No | Webhook URL for asynchronous task updates. | |
| output_format | No | Output image format. | |
| poll_interval_ms | No | ||
| source_image_url | Yes | Public HTTPS source image URL (JPEG, PNG, or WebP; maximum 10 MB). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full disclosure burden. It does mention it creates an asynchronous task and returns task id/status/output URLs, giving some sense of async behavior. However, it doesn't disclose rate limits, auth requirements, wait versus callback behavior, or what happens to the source image. Some context is added but not comprehensive.
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 efficient sentence conveying the core purpose and return shape. It's appropriately front-loaded and contains no filler. It could perhaps add a sentence on usage guidance, but as written it's compact and readable.
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?
This is a complex tool with 10 parameters and no output schema, but the description doesn't explain parameter interactions, async task semantics (wait/poll/callback options), or how results are retrieved. It mentions returning output URLs but doesn't connect to the async task model or the get_task sibling. Given the complexity and lack of output schema, more explanation is warranted.
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 80%, so the schema already documents most parameters. The description adds the overall behavioral context (returns task id/status) but doesn't elaborate on parameters beyond what the schema describes. With high schema coverage, baseline 3 is appropriate — description adds modest value but doesn't compensate for the 20% uncovered.
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 Qwen Image task), the resource (RunAPI edit image), and the return payload (task id, status, output URLs). It distinguishes from siblings like text_to_image and remix_image which cover generation/remix rather than editing. However, it doesn't explicitly contrast with the sibling edit-related tools.
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. It doesn't clarify how it differs from remix_image (which may also modify existing images), nor does it state prerequisites like needing an existing image URL. Usage context is only implied through the tool name and description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_taskB
Fetch the current status and latest result payload for a qwen-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 of disclosure. It clearly states this is a read operation ('Fetch') and specifies what it returns: current status and latest result payload. For a read tool, this is reasonably transparent about its purpose, though it doesn't mention whether it blocks until completion, whether it can be polled repeatedly, error behavior for invalid task IDs, or how 'status' values correspond to states. It's adequate but not rich in behavioral detail.
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?
A single, efficient sentence that covers what is fetched and for what resource type. No wasted words, no redundancy. Appropriate length for a simple read tool.
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?
This is a read/retrieval tool with no output schema and no annotations. Given that context, the description explains it returns 'status' and 'latest result payload', which is the essential expected return. However, without an output schema or annotations, it would benefit from clarifying the relationship to sibling tools (it's the async counterpart to edit_image/remix_image/text_to_image) and whether the result payload structure varies by action. It's mostly complete for a simple polling-style tool but lacks some useful context about the task lifecycle.
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 both task_id and action are already documented in the schema. The description adds the context that this relates to a 'qwen-image task' and that the result is 'latest', but it doesn't add meaning beyond the schema for the parameters themselves. Since schema coverage is complete, baseline 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 uses a specific verb ('Fetch') plus a clear resource ('status and latest result payload for a qwen-image task'). It's clear what the tool does. However, it doesn't explicitly distinguish from siblings — though the read-only nature versus the create/edit siblings is fairly evident from the name and phrasing. It's clear and specific, just not explicitly differentiated from siblings.
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?
There is no explicit guidance on when to use this tool versus alternatives. It's implied that this is the retrieval/polling counterpart to the creation tools (edit_image, remix_image, text_to_image) given the action enum, but the description never states 'use this after creating a task to check progress' or mentions polling semantics. The context must be inferred from sibling names rather than stated directly.
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 the behavioral burden. It discloses the interactive browser flow and the file write side effect (config.json). However, it does not mention that it may overwrite existing credentials or that it could block waiting for user input, though these are implied.
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 front-loads the action ('Authenticate RunAPI') and provides necessary details without extraneous information.
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 login tool with one optional parameter and no output schema, the description covers the core purpose and side effect. It lacks an explicit statement that this is a prerequisite for other tools, but that is implied.
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% (the only parameter 'force' has a description). The tool description adds no additional meaning about parameters beyond the schema, so the baseline of 3 applies.
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 with a specific verb ('Authenticate'), target resource ('RunAPI'), method ('browser PKCE login flow'), and side effect (saving to config.json). It is distinct from sibling tools, none of which relate to authentication.
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 (to authenticate RunAPI) but does not explicitly say when to run it (e.g., before other RunAPI tools) or when to use the 'force' parameter. Since there are no alternative auth tools among siblings, 'vs alternatives' is not applicable.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
remix_imageA
Create a Qwen Image task on RunAPI (remix image). Returns a task id, status, and output URLs.
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Integer seed for reproducible results. | |
| wait | No | Poll until the task reaches a terminal status. | |
| model | No | RunAPI model slug for this model line. | |
| prompt | Yes | Prompt describing the requested remix. | |
| strength | No | Creative deviation from the source image, from 0 (faithful) to 1 (creative). | |
| timeout_ms | No | ||
| callback_url | No | Webhook URL for asynchronous task updates. | |
| output_format | No | Output image format. | |
| poll_interval_ms | No | ||
| source_image_url | Yes | Public HTTPS source image URL (JPEG, PNG, or WebP; maximum 10 MB). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral disclosure burden. It mentions that the tool returns a task id and is asynchronous by nature (implying task-based workflow), referencing polling via wait/poll params. However, it does not disclose rate limits, auth requirements, cost implications, or the asynchronous execution model explicitly. It adds modest context beyond the schema.
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 efficient sentence that packs the core purpose (create task, API provider, operation) and the return signature without any waste. Front-loaded with the primary action verb. Every word earns 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?
Given no output schema and 2 undocumented params, the description could do marginally more to explain the task lifecycle and how the returned task id relates to get_task. However, with 10 parameters at 80% schema coverage, the schema does most of the documentational work, and the description correctly anchors the async task model. The sibling get_task exists to fill the task-tracking 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 80% with 10 parameters, so most parameters are already documented in the schema. The description's mention of return values (task id, status, output URLs) complements the undocumented params like wait, timeout_ms, and poll_interval_ms by situating them in a task lifecycle. For 2 undocumented params (timeout_ms, poll_interval_ms), the description's task-frame reference provides useful context. The description doesn't need to repeat schema details.
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 states a specific verb ('Create'), resource ('a Qwen Image task on RunAPI'), and operation ('remix image'), clearly distinguishing it as the remix variant among siblings like text_to_image and edit_image. It also notes the return signature (task id, status, output URLs). It could be slightly stronger by explaining the distinction from edit_image explicitly, but the purpose is clear.
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 remix operation (requires source_image_url, mentions 'remix image' in the name), but does not explicitly state when to use this vs edit_image or text_to_image. It does not describe when not to use it or any prerequisites (like needing a public HTTPS URL — though that is in the schema). No explicit 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_imageB
Create a Qwen Image task on RunAPI (text to image). Returns a task id, status, and output URLs.
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Integer seed for reproducible results. | |
| wait | No | Poll until the task reaches a terminal status. | |
| model | No | RunAPI model slug for this model line. | |
| prompt | Yes | Image generation prompt. | |
| timeout_ms | No | ||
| aspect_ratio | No | Output aspect ratio. | |
| callback_url | No | Webhook URL for asynchronous task updates. | |
| output_format | No | Output image format. | |
| poll_interval_ms | No |
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 of behavioral disclosure. It states the tool returns a task id, status, and output URLs, and mentions 'task' semantics (implying async operation), but does not disclose the wait/polling behavior, rate limits, cost implications, or reversibility. For a task-based image generation tool with zero annotations, more behavioral context is expected.
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 that establishes purpose and return value in under 30 words. It is front-loaded with the key information (what it does, what it returns). While it could add usage guidance, for conciseness and structure this is appropriately sized and efficiently worded with zero waste.
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?
The tool has 9 parameters, no output schema, and no annotations, making it fairly complex. The description explains the task-based async model and return payload shape (task id, status, URLs), which is helpful context. However, it doesn't clarify the relationship between wait/poll_interval_ms/timeout_ms/callback_url parameters or when async vs sync operation is preferred. For a tool with this many configurable async behaviors, more contextual guidance would be valuable.
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 78%, which is above the 80% baseline... actually at 78%. The description adds 'Returns a task id, status, and output URLs' framing but does not explain individual parameters beyond what the schema already provides. Parameters like timeout_ms, poll_interval_ms, and callback_url are self-explanatory in schema but the description's task-based framing adds marginal context about how they relate to each other. The description compensates slightly but doesn't deeply enrich parameter semantics.
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 states a specific verb+resource: 'Create a Qwen Image task on RunAPI (text to image)'. It clearly indicates the tool generates an image from text and returns a task id, status, and output URLs. It differentiates from siblings (edit_image, remix_image) by specifying 'text to image' generation, though it could be more explicit about distinguishing itself from the editing/remix siblings.
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 indicates this tool creates a text-to-image task with optional wait behavior, but does not explicitly say when to use this vs edit_image or remix_image, nor when to use the wait parameter vs callback_url. The schema implies polling capabilities but the description doesn't provide clear guidance on selecting this tool over siblings or choosing among the async patterns (wait, callback_url).
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.
6 tool updates
v0.1.1- First observed
check_pricing - First observed
edit_image - First observed
get_task - First observed
login - First observed
remix_image - First observed
text_to_image
TDQS
Scored across 6 tools
The three image generation tools (text_to_image, edit_image, remix_image) could be confused since they all create Qwen Image tasks returning similar payloads, but their action-prefix names do clearly distinguish the three modes. login, get_task, and check_pricing are distinct concerns. Only the generation trio has mild boundary ambiguity.
All tools consistently follow a clear snake_case verb-first convention: login, edit_image, remix_image, text_to_image (verb or noun phrase prefix), get_task, check_pricing. There is a uniform action-oriented pattern with no mixed casing or style deviations.
Six tools is a well-scoped surface for an image-generation API wrapper: auth, three generation modes, task status polling, and pricing lookup. Each tool earns its place and none feel redundant or unnecessary.
The surface covers the core lifecycle: authentication, generation in three modes, task polling, and pricing. Minor gaps exist—no explicit cancel/delete task or batch operations—but the primary workflows are fully supported and there are no dead ends.
Maintenance
Related MCP Connectors
MCP server for Qwen Image 3 AI image generation
MCP server for Pixapi: check live credit pricing and balance, then generate images and video.
Generate images with any major model — one API key, one prepaid balance, one MCP.
Create images & video from any MCP agent — 17 models, spend limits, one URL.
Related MCP Servers
- AlicenseAqualityAmaintenanceMCP server for GPT-4o Image model line, enabling text-to-image task creation, status polling, and pricing checks via RunAPI.4110 npmApache 2.0
- AlicenseAqualityAmaintenanceRunAPI MCP server for the Imagen 4 model line. Create tasks, poll their status, and check pricing through a single RunAPI API key.565 npmApache 2.0
- AlicenseAqualityAmaintenanceEnables image editing, remixing, and text-to-image generation using Qwen 2 models via RunAPI. Supports task polling and pricing checks.572 npmApache 2.0
- AlicenseBqualityAmaintenanceProvides AI agents with Midjourney API access for image and video generation, task polling, and pricing checks through a focused MCP server.1055 npm1Apache 2.0