npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@trustao/qwen-image-edit-mcp

v1.0.0

Published

MCP server for Qwen Image Edit API (Alibaba Cloud DashScope / Bailian)

Downloads

125

Readme

@trustao/qwen-image-edit-mcp

将阿里云百炼 千问图像编辑 API 封装为 MCP 服务,可通过 npx 一键接入 Cursor / Claude Desktop 等客户端。

支持:修改图内文字、增删或移动物体、改变主体动作、风格迁移、画面细节增强、多图融合(1–3 张输入,最多 6 张输出)。

快速配置(npx)

Cursor

在 MCP 设置中添加:

{
  "mcpServers": {
    "qwen-image-edit": {
      "command": "npx",
      "args": ["-y", "@trustao/qwen-image-edit-mcp"],
      "env": {
        "DASHSCOPE_API_KEY": "sk-your-api-key"
      }
    }
  }
}

推荐同时配置业务空间 ID(使用专属域名,更稳定):

{
  "mcpServers": {
    "qwen-image-edit": {
      "command": "npx",
      "args": ["-y", "@trustao/qwen-image-edit-mcp"],
      "env": {
        "DASHSCOPE_API_KEY": "sk-your-api-key",
        "DASHSCOPE_WORKSPACE_ID": "your-workspace-id",
        "DASHSCOPE_REGION": "beijing"
      }
    }
  }
}

Claude Desktop

编辑 claude_desktop_config.json,写入同上 mcpServers 配置。

环境变量

| 变量 | 必填 | 说明 | | --- | --- | --- | | DASHSCOPE_API_KEY | 是 | 百炼 API Key。获取方式 | | DASHSCOPE_WORKSPACE_ID | 否 | 业务空间 ID,启用专属域名 | | DASHSCOPE_REGION | 否 | beijing(默认)或 singapore两地 API Key 不可混用 | | DASHSCOPE_BASE_URL | 否 | 完全自定义 Base URL(覆盖地域/Workspace) | | QWEN_IMAGE_EDIT_MODEL | 否 | 默认模型,默认 qwen-image-2.0-pro |

提供的 Tools

edit_image

调用千问图像编辑模型。

| 参数 | 必填 | 说明 | | --- | --- | --- | | images | 是 | 1–3 张图:公网 URL / oss:// 临时 URL / Base64 data:image/...;base64,... | | prompt | 是 | 编辑指令(仅一条) | | model | 否 | 模型名,默认见环境变量 | | n | 否 | 输出张数 1–6(qwen-image-edit 仅支持 1) | | negative_prompt | 否 | 反向提示词 | | size | 否 | "宽*高",如 "1024*1024"qwen-image-edit 不支持) | | prompt_extend | 否 | 提示词智能改写,默认 API 侧为 true | | watermark | 否 | 是否加水印,默认 false | | seed | 否 | 随机种子 |

list_models

列出支持的模型与当前连接配置。

本地开发

npm install
npm run build
npm start

本地调试 MCP 配置示例:

{
  "mcpServers": {
    "qwen-image-edit": {
      "command": "node",
      "args": ["/absolute/path/to/qwenimgmcp/dist/index.js"],
      "env": {
        "DASHSCOPE_API_KEY": "sk-your-api-key"
      }
    }
  }
}

或使用未发布包:

{
  "mcpServers": {
    "qwen-image-edit": {
      "command": "npx",
      "args": ["-y", "/absolute/path/to/qwenimgmcp"],
      "env": {
        "DASHSCOPE_API_KEY": "sk-your-api-key"
      }
    }
  }
}

调用示例

单图编辑:

请用 edit_image:
- images: ["https://example.com/photo.png"]
- prompt: 把天空改成晚霞,保持人物不变
- model: qwen-image-2.0-pro
- size: 1024*1024

多图融合:

请用 edit_image:
- images: ["https://.../city.png", "https://.../character.png"]
- prompt: 使用图一城市照片为底图,将图二卡通形象放在建筑物周围…

注意事项

  • 输出图像 URL 约 24 小时有效,请及时下载保存。
  • 北京与新加坡地域的 API Key、请求地址相互独立,不可跨地域调用。
  • 输入图建议宽高在 384–3072 像素,单张不超过 10MB。
  • 官方文档:千问图像编辑

License

MIT