Skip to main content
Glama
runapi-ai

RunAPI Qwen Image MCP Server

Official
by runapi-ai

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

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

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

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

edit_image

Yes

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

remix_image

Yes

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

text_to_image

Yes

Create a Qwen 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 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

edit_image

qwen-image-edit-image

remix_image

qwen-image-remix-image

text_to_image

qwen-image-text-to-image

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:

  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

Qwen Image model page

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

npm package

@runapi.ai/qwen-image-mcp

GitHub repository

runapi-ai/qwen-image-mcp

RunAPI MCP overview

runapi.ai/mcp

RunAPI docs

runapi.ai/docs


License

Licensed under the Apache License, Version 2.0.

Available Tools

6 tools
check_pricingB

Look up RunAPI pricing for the qwen-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.2/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 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.

Conciseness4/5

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.

Completeness3/5

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.

Parameters3/5

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.

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

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

ParametersJSON Schema
NameRequiredDescriptionDefault
seedNoInteger seed for reproducible results.
waitNoPoll until the task reaches a terminal status.
modelNoRunAPI model slug for this model line.
promptYesEdit instruction for the source image.
timeout_msNo
aspect_ratioNoOutput aspect ratio.
callback_urlNoWebhook URL for asynchronous task updates.
output_formatNoOutput image format.
poll_interval_msNo
source_image_urlYesPublic HTTPS source image URL (JPEG, PNG, or WebP; maximum 10 MB).

TDQS

B3.1/5.0
Behavior3/5

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.

Conciseness4/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose4/5

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.

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

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

TDQS

B3.2/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 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.

Conciseness4/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

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

TDQS

A4/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

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

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
seedNoInteger seed for reproducible results.
waitNoPoll until the task reaches a terminal status.
modelNoRunAPI model slug for this model line.
promptYesPrompt describing the requested remix.
strengthNoCreative deviation from the source image, from 0 (faithful) to 1 (creative).
timeout_msNo
callback_urlNoWebhook URL for asynchronous task updates.
output_formatNoOutput image format.
poll_interval_msNo
source_image_urlYesPublic HTTPS source image URL (JPEG, PNG, or WebP; maximum 10 MB).

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

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose4/5

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.

Usage Guidelines3/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
seedNoInteger seed for reproducible results.
waitNoPoll until the task reaches a terminal status.
modelNoRunAPI model slug for this model line.
promptYesImage generation prompt.
timeout_msNo
aspect_ratioNoOutput aspect ratio.
callback_urlNoWebhook URL for asynchronous task updates.
output_formatNoOutput image format.
poll_interval_msNo

TDQS

B3.2/5.0
Behavior2/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 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.

Conciseness4/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines3/5

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.

  1. 6 tool updatesv0.1.1
    • First observedcheck_pricing
    • First observededit_image
    • First observedget_task
    • First observedlogin
    • First observedremix_image
    • First observedtext_to_image

TDQS

A3.6/5.0

Scored across 6 tools

Disambiguation4/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers