# qwen-2-mcp [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/runapi-ai/qwen-2-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 803  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/qwen-2-mcp

## Description
RunAPI MCP server for Qwen 2: create tasks, poll status, and check pricing.

## Tools
Capabilities this server exposes over MCP:

- **login** — Authenticate RunAPI by opening a browser PKCE login flow and saving the API key to ~/.config/runapi/config.json.
- **edit_image** — Create a Qwen 2 task on RunAPI (edit image). Returns a task id, status, and output URLs.
- **text_to_image** — Create a Qwen 2 task on RunAPI (text to image). Returns a task id, status, and output URLs.
- **get_task** — Fetch the current status and latest result payload for a qwen-2 task.
- **check_pricing** — Look up RunAPI pricing for the qwen-2 model line.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "qwen-2-mcp": {
    "command": "npx",
    "args": ["-y","@runapi.ai/qwen-2-mcp"],
    "env": {
      "RUNAPI_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `RUNAPI_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What qwen-2-mcp does

qwen-2-mcp exposes RunAPI’s Qwen 2 model line through the Model Context Protocol. It focuses on two image operations: generating an image from text and editing an existing image. The server supports the `qwen-2-text-to-image` and `qwen-2-edit-image` model variants.

Alongside task creation, the server provides task lookup and pricing inspection. A completed or polled task can return its identifier, state, latest payload, and output URLs. Pricing lookup is available without signing in, which lets an agent inspect cost before submitting an authenticated job.

This per-model package is intended for assistants that need Qwen 2 specifically. RunAPI also offers a separate broader MCP package for agents that need to discover other model lines.

## How it works

The server communicates with MCP hosts over standard input/output. Hosts start the package with `npx`, and agents invoke the exposed tools as needed. Image requests create asynchronous RunAPI tasks rather than requiring the operation to finish during submission.

`edit_image` and `text_to_image` can optionally wait for a terminal task state. When waiting is disabled, the create operation returns the task ID so the agent can continue later with `get_task`. That lookup tool fetches the current status and most recent task payload.

The available model is tied to the operation: image editing uses `qwen-2-edit-image`, while text-to-image requests use `qwen-2-text-to-image`. Model availability may change, so `check_pricing` or the Qwen 2 model page can be used to inspect the current catalog.

## Setup and configuration

For Claude Code, install the server with:

```bash
claude mcp add qwen-2 -s user -- npx -y @runapi.ai/qwen-2-mcp
```

Project scope can be selected instead when the MCP configuration should be associated with a repository. Other compatible hosts can use the same stdio command through an MCP configuration:

```json
{
  "mcpServers": {
    "qwen-2": {
      "command": "npx",
      "args": ["-y", "@runapi.ai/qwen-2-mcp"]
    }
  }
}
```

Authentication is resolved from `RUNAPI_API_KEY` first, then from `~/.config/runapi/config.json`. The configuration file may be created through the RunAPI login flow or `runapi login`; a headless setup can provide an object containing an `apiKey` value. Keep real credentials out of source control. Pricing requests work without a key, while task creation and status retrieval require authentication.

## Tools and capabilities

- `edit_image`: Starts a Qwen 2 image-editing task and can wait for a terminal result.
- `text_to_image`: Starts a Qwen 2 text-to-image task and can wait for a terminal result.
- `get_task`: Retrieves the current state and latest payload for an existing task.
- `check_pricing`: Looks up pricing for a Qwen 2 model and endpoint without authentication.

The task tools return IDs, statuses, and output URLs where available. Agents can first inspect pricing, submit a task without waiting, and poll it later.

## Limitations and notes

The package is limited to the Qwen 2 model line and its two documented image endpoints. It does not provide the complete RunAPI catalog. Authentication is required for creating tasks and checking their progress, and asynchronous jobs may require a later `get_task` call when submitted without waiting. Model availability and pricing can change between releases, so agents should query pricing when current catalog information matters.

_Full upstream README: https://allmcps.com/mcp/qwen-2-mcp/readme_

