Repository navigation
Add Qwen Image plugin #564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
acedatacloud-dev
wants to merge
4
commits into
cursor:main
Choose a base branch
from
AceDataCloud:codex/qwen-image-plugin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+202
−0
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5acaacd
feat(third_party): add Qwen Image plugin
acedatacloud-dev e18b10b
refactor: reuse hosted Qwen Image MCP
acedatacloud-dev 8b68d86
docs: keep unfinished Qwen tasks polling
acedatacloud-dev 1395caa
docs: tag shared Cursor README activation links
acedatacloud-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "name": "qwen-image", | ||
| "displayName": "Qwen Image", | ||
| "version": "1.0.1", | ||
| "minClientVersions": { | ||
| "cursor": "3.13.0" | ||
| }, | ||
| "description": "Generate or edit Qwen Image pictures through Ace Data Cloud and retrieve completed results.", | ||
| "author": { | ||
| "name": "Ace Data Cloud Dev", | ||
| "email": "dev@acedata.cloud" | ||
| }, | ||
| "homepage": "https://platform.acedata.cloud/models", | ||
| "repository": "https://github.com/AceDataCloud/QwenImageCursor", | ||
| "license": "MIT", | ||
| "logo": "assets/logo.png", | ||
| "keywords": ["qwen image", "qwen", "image generation", "acedatacloud", "mcp"], | ||
| "category": "integrations", | ||
| "tags": ["qwen", "image", "mcp"], | ||
| "variables": { | ||
| "type": "object", | ||
| "properties": { | ||
| "ACEDATACLOUD_API_TOKEN": { | ||
| "type": "string", | ||
| "title": "Ace Data Cloud API token", | ||
| "description": "Service API key from https://platform.acedata.cloud/console/applications with Qwen Image access." | ||
| } | ||
| }, | ||
| "required": ["ACEDATACLOUD_API_TOKEN"] | ||
| }, | ||
| "mcpServers": "./mcp.json" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Changelog | ||
|
|
||
| ## 1.0.1 | ||
|
|
||
| - Reuse the existing hosted Qwen Image MCP instead of bundling a local Node server. The hosted server exposes generation, editing, model listing, and same-task retrieval tools. | ||
| - Clarify that `finished_at: null` remains pending even if an interim response says `success: false`. | ||
|
|
||
| ## 1.0.0 | ||
|
|
||
| - Initial Qwen Image Cursor plugin with a small local MCP server for generation and same-task retrieval. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2026 Ace Data Cloud | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # Qwen Image for Cursor | ||
|
|
||
| Generate and edit Qwen Image pictures through [Ace Data Cloud](https://platform.acedata.cloud?utm_source=opensource&utm_medium=referral&utm_campaign=evergreen&utm_content=qwen_image_cursor_shared_readme_platform_en) in Cursor. This focused plugin reuses the existing hosted Qwen Image MCP for generation, editing, model listing, and same-task retrieval. The live MCP schemas define available actions and arguments. | ||
|
|
||
| [简体中文教程](readme/README_zh_Hans.md) · [Copyable first-run prompt](examples/first-image.md) · [Current pricing](https://platform.acedata.cloud/models?utm_source=opensource&utm_medium=referral&utm_campaign=evergreen&utm_content=qwen_image_cursor_shared_readme_pricing_en) | ||
|
|
||
| ## 1. Install | ||
|
|
||
| In Cursor 3.24, open **Customize → Browse Marketplace**, search for **Qwen Image**, confirm the **Ace Data Cloud Dev** author and Qwen Image logo, then click **Add**. Earlier Cursor versions may put Plugins under Settings. If the official listing is not live, copy this directory to `~/.cursor/plugins/local/qwen-image/`, then open **Customize → Plugins** and confirm the **Local** label. Local installation does not prove Marketplace publication. | ||
|
|
||
| ## 2. Get the right API key | ||
|
|
||
| 1. Sign in at [Ace Data Cloud Applications](https://platform.acedata.cloud/console/applications?utm_source=opensource&utm_medium=referral&utm_campaign=evergreen&utm_content=qwen_image_cursor_shared_readme_api_key_en). | ||
| 2. Open **General application** or a Qwen Image-specific application. Copy an existing service API key, or use **Manage Keys → Create** for a separate Cursor key. | ||
| 3. Check Qwen Image access, [current pricing](https://platform.acedata.cloud/models?utm_source=opensource&utm_medium=referral&utm_campaign=evergreen&utm_content=qwen_image_cursor_shared_readme_pricing_en), and balance. If **Allowed APIs** restrictions are enabled, include both `/qwen-image/images` and `/qwen-image/tasks`. | ||
|
|
||
| Use a service API key, not a platform management token. Do not put it in prompts or repository files. | ||
|
|
||
| ## 3. Configure the plugin | ||
|
|
||
| Open **Customize → Plugins → Qwen Image → Configure**, paste the key string into **Ace Data Cloud API token**, and click **Save**. Wait for Save to finish, then reopen Configure to confirm a masked value. Team administrators can configure the same variable in **Dashboard → Plugins → Configure**. Cursor uses `ACEDATACLOUD_API_TOKEN` in the hosted MCP Authorization header; the plugin adds `Bearer ` itself. | ||
|
|
||
| The transport is hosted HTTP; no local Node server is required: | ||
|
|
||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "qwen-image": { | ||
| "type": "http", | ||
| "url": "https://qwen-image.mcp.acedata.cloud/mcp", | ||
| "headers": {"Authorization": "Bearer ${ACEDATACLOUD_API_TOKEN}"} | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## 4. Make and retrieve the first image | ||
|
|
||
| Paste the [first-image prompt](examples/first-image.md) into Cursor Agent. It checks `qwen_image_list_models`, then requests one `qwen_image_generate` call with model `qwen-image-3.0` when available, size `1024*1024`, count `1`, and no watermark. Use the live tool schema for supported values. | ||
|
|
||
| The paid generation returns a task ID while work may still be pending. Keep it. Call `qwen_image_get_task` with that **same** ID until `finished_at` is non-null. While `finished_at` is null, continue querying even if `response.success` is false. Once finished, `response.success: true` includes `response.data[].image_url`; `false` is a terminal failure. If the chat is interrupted, begin a new chat with “Query Qwen Image task <task_id>; do not generate again.” Open the returned HTTPS image and check it. | ||
|
|
||
| In **Ace Data Cloud → Usage/Billing**, match the one generation to its deducted Credits record. Task queries do not submit another generation. The plugin is free; API calls follow current service pricing. | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| | Symptom | Action | | ||
| | --- | --- | | ||
| | Plugin not listed | Check the exact Qwen Image entry and author. A local plugin is separate from the public Marketplace. | | ||
| | MCP is not connected | Check the saved key and hosted endpoint, then reconnect the plugin. The plugin needs no local runtime. | | ||
| | 401 or 403 | Check the service key, expiration, Qwen Image access, balance, and both Allowed APIs. Paste only the key, without `Bearer `. If the same key works through the Ace API but Cursor reports an invalid token, confirm Save finished and restart Cursor before retrying a read-only task query. | | ||
| | Invalid model or size | Use a currently supported model and `WIDTH*HEIGHT` size such as `1024*1024`. | | ||
| | Pending or interrupted task | Query the original task ID; do not regenerate to poll. | | ||
| | Timeout or 5xx | Check the task and usage history before deciding whether another paid request is needed. | | ||
| | Image URL fails | Check terminal success and use the URL returned by that task. | | ||
|
|
||
| [Source](https://github.com/AceDataCloud/QwenImageCursor) · [Report a problem](https://github.com/AceDataCloud/QwenImageCursor/issues) · dev@acedata.cloud. The logo reuses the existing Ace Data Cloud Qwen Image integration asset. This is a tool plugin; it does not register a Cursor chat-model provider. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # First Qwen Image result | ||
|
|
||
| Copy this into Cursor Agent after installing the plugin and configuring its API key. The prompt contains no credential. | ||
|
|
||
| > Use the Qwen Image plugin to make one 1024×1024 image of a single blue paper sphere on a cream background, as a clean studio product photograph with no text. Check `qwen_image_list_models`; use `qwen-image-3.0`, `n: 1`, and `watermark: false` if available to this account. Call `qwen_image_generate` only once, save its task ID, then use `qwen_image_get_task` with the same ID until `finished_at` is non-null. A `response.success: false` while `finished_at` is null is still pending; do not generate again to poll. On completion, open the returned HTTPS image URL and tell me the original task ID. If it is still pending, give me that ID so I can resume. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "mcpServers": { | ||
| "qwen-image": { | ||
| "type": "http", | ||
| "url": "https://qwen-image.mcp.acedata.cloud/mcp", | ||
| "headers": { | ||
| "Authorization": "Bearer ${ACEDATACLOUD_API_TOKEN}" | ||
| } | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # Cursor Qwen Image 插件 | ||
|
|
||
| 通过 [Ace Data Cloud](https://platform.acedata.cloud?utm_source=opensource&utm_medium=referral&utm_campaign=evergreen&utm_content=qwen_image_cursor_shared_readme_platform_zh_hans) 在 Cursor 中生成或编辑 Qwen Image 图片。插件复用现有托管 Qwen Image MCP,提供生成、编辑、模型列表及同任务查询工具;可用参数以在线工具 schema 为准。 | ||
|
|
||
| [English guide](../README.md) · [可复制的首跑提示词](../examples/first-image.md) · [当前价格](https://platform.acedata.cloud/models?utm_source=opensource&utm_medium=referral&utm_campaign=evergreen&utm_content=qwen_image_cursor_shared_readme_pricing_zh_hans) | ||
|
|
||
| ## 1. 安装 | ||
|
|
||
| 在 Cursor 3.24 打开 **Customize → Browse Marketplace**,搜索 **Qwen Image**,确认作者 **Ace Data Cloud Dev** 和服务图标,再点击 **Add**。较早版本可能将 Plugins 放在 Settings。官方条目尚未出现时,可把本目录复制到 `~/.cursor/plugins/local/qwen-image/`,再到 **Customize → Plugins** 查看 **Local** 标签;本地安装不代表 Marketplace 已上架。 | ||
|
|
||
| ## 2. 获取服务 API Key | ||
|
|
||
| 1. 登录 [Ace Data Cloud 应用管理](https://platform.acedata.cloud/console/applications?utm_source=opensource&utm_medium=referral&utm_campaign=evergreen&utm_content=qwen_image_cursor_shared_readme_api_key_zh_hans)。 | ||
| 2. 打开 **General application** 或 Qwen Image 专用应用,复制已有服务 Key;也可通过 **Manage Keys → Create** 新建 Cursor 专用 Key。 | ||
| 3. 确认 Qwen Image 权限、[当前价格](https://platform.acedata.cloud/models?utm_source=opensource&utm_medium=referral&utm_campaign=evergreen&utm_content=qwen_image_cursor_shared_readme_pricing_zh_hans)和余额。若启用了 **Allowed APIs**,同时允许 `/qwen-image/images` 和 `/qwen-image/tasks`。 | ||
|
|
||
| 使用服务 API Key,不要使用平台管理 token;也不要把 Key 写进提示词或仓库。 | ||
|
|
||
| ## 3. 配置插件 | ||
|
|
||
| 打开 **Customize → Plugins → Qwen Image → Configure**,将 Key 原文填入 **Ace Data Cloud API token** 并点击 **Save**。等待保存完成,重新打开 Configure,确认字段显示遮蔽值。团队管理员也可通过 **Dashboard → Plugins → Configure** 配置同一变量。Cursor 将 `ACEDATACLOUD_API_TOKEN` 用于托管 MCP 的 Authorization 请求头;插件自行加上 `Bearer ` 前缀。 | ||
|
|
||
| 插件通过 `https://qwen-image.mcp.acedata.cloud/mcp` 连接托管 HTTP MCP,无需本地 Node 服务。若工具没有出现,检查 Key 并重连插件。 | ||
|
|
||
| ## 4. 生成并取回首张图片 | ||
|
|
||
| 在 Cursor Agent 中复制[首跑提示词](../examples/first-image.md)。它先查询 `qwen_image_list_models`,再调用一次 `qwen_image_generate`;账户可用时选 `qwen-image-3.0`、尺寸 `1024*1024`、数量 `1`、无水印。实际参数以在线工具 schema 为准。 | ||
|
|
||
| 付费生成可能先返回 task ID,此时图片仍在处理。保存这个 ID,沿同一 ID 调用 `qwen_image_get_task`,直到 `finished_at` 非空。`finished_at` 为 null 时,即使 `response.success` 为 false 也要继续查同一任务;结束后 `response.success: true` 的结果包含 `response.data[].image_url`,false 才是终态失败。聊天中断时新开聊天说“查询 Qwen Image 任务 <task_id>,不要重新生成”。打开最终 HTTPS 图片检查。 | ||
|
|
||
| 到 **Ace Data Cloud → Usage/Billing** 核对这一次生成对应的 Credits 扣费。任务查询不会再提交生成。插件免费,API 调用按当前服务价格计费。 | ||
|
|
||
| ## 排障 | ||
|
|
||
| | 现象 | 处理 | | ||
| | --- | --- | | ||
| | 找不到插件 | 核对 Qwen Image 条目和作者;本地插件与官方市场是两条渠道。 | | ||
| | MCP 未连接 | 检查保存的 Key 与托管端点,重连插件;无需本地运行时。 | | ||
| | 401 或 403 | 检查服务 Key、有效期、权限、余额和两个 Allowed APIs;配置值不要带 `Bearer `。若同一 Key 直连 Ace API 成功而 Cursor 仍报 token invalid,确认 Save 已完成,重启 Cursor 后先重试旧任务只读查询。 | | ||
| | 模型或尺寸错误 | 用当前支持的模型,尺寸写成 `WIDTH*HEIGHT`,例如 `1024*1024`。 | | ||
| | pending 或任务中断 | 沿原 task ID 查询,不要为轮询再次生成。 | | ||
| | 超时或 5xx | 先检查原任务和用量记录,再决定是否需要另一笔付费请求。 | | ||
| | 图片无法打开 | 确认终态成功,使用该任务最终返回的地址。 | | ||
|
|
||
| [源码](https://github.com/AceDataCloud/QwenImageCursor) · [问题反馈](https://github.com/AceDataCloud/QwenImageCursor/issues) · dev@acedata.cloud。图标复用 Ace Data Cloud 现有 Qwen Image 集成资源。本插件提供工具,不注册 Cursor 聊天模型 Provider。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| name: qwen-image | ||
| description: Generate or edit Qwen Image pictures through Ace Data Cloud in Cursor and resume an existing Qwen Image task. Use when the user asks for a Qwen Image result. | ||
| --- | ||
|
|
||
| # Qwen Image in Cursor | ||
|
|
||
| Use the existing Ace Data Cloud hosted Qwen Image MCP. Its live tool schemas are the source of truth for available models, arguments, and results. | ||
|
|
||
| 1. Check [current pricing and balance](https://platform.acedata.cloud/models), confirm Qwen Image access, and use `qwen_image_list_models` when the requested model is unclear. | ||
| 2. Call `qwen_image_generate` or `qwen_image_edit` once for the requested paid action. Keep the returned task ID even if the result is still pending. | ||
| 3. Call `qwen_image_get_task` with that same ID until `finished_at` is non-null. An interim `response.success: false` with `finished_at: null` is still pending. Once finished, inspect `response.success`; after an interruption, resume with the old ID and never generate again just to poll. | ||
| 4. On success, open a returned `response.data[].image_url` HTTPS link and report the task ID and result. A pending response is not a finished image. | ||
|
cursor[bot] marked this conversation as resolved.
|
||
|
|
||
| The API key is configured in **Customize → Plugins → Qwen Image → Configure** as `ACEDATACLOUD_API_TOKEN`. Do not place it in chat or files. See the [first-run guide](../../README.md). | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.