Skip to main content

listing-image-mcp

商品生图 MCP 服务。产出商品主图组(多图类型)+ 详情页图,供智能体在「视觉生成」环节调用。 每张生成图都带 ai_generated=True 元信息(合规:AI 生成内容标识)。

工具

generate_image(prompt, reference_image_urls, size, count, watermark, output_format, output_dir) —— 统一生图入口:

模式 触发 说明
文生图 reference_image_urls 为空 纯文本生成
单图生图 1 张参考图 实物图保商品一致
多图生图 2-14 张参考图 多张实物图 + 可选爆款构图参考
组图 count>1 一次生成一组内容关联、风格统一的图

工作区交付(v0.2 起)

图片写到「工作区」,由环境变量 WORKSPACE_ROOT(工作区绝对根目录,平台注入)+ 入参 output_dir(工作区相对路径)共同决定。

  • output_dir 必须是工作区相对路径(如 方案/某商品-视觉素材/主图),留空则写工作区根;禁止绝对路径。
  • 返回每张图的 file_name + workspace_path(工作区可见相对路径)+ url + 尺寸 + ai_generated + reference_used + status
  • 落盘即校验、失败即阻断、禁止 mock 占位输出——拿不到真实图片就诚实报错,不伪造成功。

后端(可插拔)

  • mock(默认)—— 仅本地联调;交付路径禁用ready() 恒为 False,未配真实密钥时直接报错)。
  • seedream —— 字节系 Seedream 5.0 lite(火山方舟)。

启动(STDIO MCP)

uvx listing-image-mcp

环境变量

变量 必填 说明
WORKSPACE_ROOT 工作区交付时 工作区绝对根目录(由平台注入),缺省则生成失败
IMAGE_BACKEND mock(默认,交付禁用)/ seedream
ARK_API_KEY seedream 时 火山方舟 API Key
ARK_BASE_URL 默认 https://ark.cn-beijing.volces.com/api/v3
ARK_MODEL 默认 doubao-seedream-5-0-lite-260128
IMAGE_OUTPUT_DIR 后端兜底保存目录,默认 ~/.listing_image_mcp/generated
IMAGE_MAIN_SIZE 主图默认尺寸,默认 2048x2048
IMAGE_DETAIL_SIZE 详情页默认尺寸,默认 1920x2560

Seedream 5.0 lite 已核实要点

  • 端点:POST {ARK_BASE_URL}/images/generations
  • 模型:doubao-seedream-5-0-lite-260128
  • 参考图:image 字段,单字符串或字符串数组(2-14 张);接受 URL / base64 data URL / 本地路径(自动转 base64)
  • 组图:sequential_image_generation = "auto"
  • 尺寸:最小 3,686,400 像素(1920x1920),更小会 400,本包自动抬升
  • 水印:watermark=false 即无平台水印

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

listing_image_mcp-0.2.0.tar.gz (75.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

listing_image_mcp-0.2.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file listing_image_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: listing_image_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 75.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for listing_image_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f0342b82b0a43cb28be096c76c9962236dd4e9859439e8c529f0b2421c220de4
MD5 0e8c99e36dcbf2fd25e17cc10c7529d2
BLAKE2b-256 b84682071f46901c72881093661013702720aacab72ade257cc5649d50e966d2

See more details on using hashes here.

File details

Details for the file listing_image_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: listing_image_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for listing_image_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e926d7eda4c038e74adf7742f7a78f015865803520026402cb3d85e8d8c2eac
MD5 6c18720544fbb4b55483483f06aff008
BLAKE2b-256 71dbc3d21cc93525344cf4b3cdbb7ec3fac2515b8036cfb9ebab2824da16a3c9

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page