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

feedmob-kuma-doubao-image-mcp

v1.0.1

Published

MCP server for Doubao image generation (text-to-image and image-to-image)

Readme

Doubao Image MCP Server 🎨

npm version License: MIT MCP

这是一个基于 Model Context Protocol (MCP) 的图像生成服务,深度集成了字节跳动 豆包(Doubao)SeeDream 大模型的图像生成能力。

通过此服务器,您可以直接在 Claude Desktop、Cursor 或任何支持 MCP 的客户端中调用豆包的文生图和图生图能力。


✨ 功能特性

  • 🚀 文生图 (Text-to-Image): 输入一段文字描述,即可生成高质量、高分辨率的创意图像。
  • 🖼️ 图生图 (Image-to-Image): 基于参考图(URL 或 Base64)和修改指令,生成风格一致或更具创意的新图。
  • 🛠️ 多模型支持: 默认支持 doubao-seedream-4-5-251128,同时兼容 4.0 和 SeedEdit 系列。
  • 📏 灵活尺寸: 支持 1K (1024x1024), 2K (2048x2048), 4K (4096x4096) 等多种导出比例。
  • 📜 实时日志: 完整的后台运行日志(输出至 stderr),方便调试和排错。

🚀 快速开始

1. 环境准备

2. 安装并运行

您可以选择直接使用 npx 预览运行,或者全局安装。

方案 A:使用 npx (推荐用于测试)

export ARK_API_KEY="您的_API_KEY"
npx feedmob-kuma-doubao-image-mcp

方案 B:全局安装

npm install -g feedmob-kuma-doubao-image-mcp

🔧 客户端配置 (Claude Desktop)

为了在 Claude Desktop 中使用,请修改您的配置文件。

配置文件路径

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

配置内容

mcpServers 部分添加以下配置:

{
  "mcpServers": {
    "doubao-image": {
      "command": "npx",
      "args": ["-y", "feedmob-kuma-doubao-image-mcp"],
      "env": {
        "ARK_API_KEY": "您的_火山引擎_API_KEY"
      }
    }
  }
}

注意:如果您已经全局安装了,可以将 command 改为 feedmob-kuma-doubao-image-mcp 并移除 args 中的 -y 参数。


🛠️ 可用工具 (Tools)

1. text_to_image (文生图)

根据文本描述生成全新的创意图片。

主要参数:

  • prompt (String): 必填。图像的详细描述词(支持中英文)。
  • size (Enum): 可选。生成的图片尺寸,支持 1K, 2K, 4K (默认 2K)。
  • model (String): 可选。使用的模型 ID。
  • watermark (Boolean): 可选。是否在图片中包含水印(默认 false)。

2. image_to_image (图生图)

基于一张或多张参考图片和提示词进行二次创作或修改。

主要参数:

  • prompt (String): 必填。对修改内容的具体描述。
  • image (String/Array): 必填。参考图片的 URL 链接或 Base64 编码字符串。
  • size (Enum): 可选。1K, 2K, 4K (默认 2K)。
  • model (String): 可选。

⚙️ 环境变量

| 变量名 | 说明 | 是否必填 | | :--- | :--- | :--- | | ARK_API_KEY | 豆包 火山引擎 ARK 平台的 API 密钥 | 是 |


🛠️ 本地开发

如果您想基于此工程进行二次开发:

  1. 克隆仓库

    git clone https://github.com/your-username/doubao-image-mcp.git
    cd doubao-image-mcp
  2. 安装依赖

    npm install
  3. 脚本说明

    • npm run dev: 使用 tsx 直接运行源码(开发调试)。
    • npm run build: 编译 TypeScript 为生产环境 JavaScript(dist 目录)。
    • npm run prepare: 发布前的自动构建钩子。

🐛 故障排除 (Troubleshooting)

  • 找不到 API Key: 请确保在启动服务的 Shell 环境中设置了 ARK_API_KEY,或者在客户端配置的 env 部分正确配置了该变量。
  • Claude 显示连接失败:
    • 检查 npx 是否安装。
    • 检查配置文件路径是否正确。
    • 检查 stdout/stderr 冲突(注:MCP 协议要求 stdout 纯净,此服务器日志均已重定向至 stderr)。
  • 图片无法显示: 豆包生成的链接通常具有时效性,请及时点击链接查看或保存。

📄 开源协议

本项目采用 MIT License 许可协议。

🤝 贡献与反馈

欢迎提交 Issue 或 Pull Request 来完善这个插件!


Powered by Doubao SeeDream & MCP