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 🙏

© 2025 – Pkg Stats / Ryan Hefner

jimeng-apicore-mcp

v1.0.0

Published

即梦AI MCP服务器 - APICore渠道版,为Claude Code提供AI图像生成能力

Readme

jimeng-apicore-mcp

即梦AI MCP服务器 - APICore版。为Claude Code提供强大的AI图像生成能力,通过APICore平台调用即梦AI (Doubao Seedream 4.0)。

功能特性

  • ✨ 文生图:根据文字描述生成图片
  • 🎨 图生图:基于参考图片生成新图片
  • 🖼️ 批量生成:单个prompt生成多张图片(1-4张)
  • 📚 组图生成:自动生成一组相关图片(最多15张)
  • 🎯 多参考图:支持多张参考图融合生成
  • 💾 自动保存:生成的图片自动下载到本地
  • 🎭 艺术风格:7种预设风格(realistic、anime、cartoon等)
  • ⚡ 质量控制:draft/standard/high三种质量模式
  • 📦 多种输出:支持URL和Base64两种格式

安装

NPM安装(推荐)

npm install -g jimeng-apicore-mcp

源码安装

git clone https://github.com/chengfeng/jimeng-apicore-mcp.git
cd jimeng-apicore-mcp
npm install

配置

1. 获取API密钥

APICore平台 注册并获取API密钥。

2. 配置Claude Code

NPM安装后配置

claude mcp add-json jimeng-apicore '{
  "command": "npx",
  "args": ["jimeng-apicore-mcp"],
  "env": {
    "APICORE_API_KEY": "sk-你的密钥",
    "JIMENG_OUTPUT_DIR": "/path/to/save/images"
  }
}'

源码安装后配置

claude mcp add-json jimeng-apicore '{
  "command": "node",
  "args": ["/path/to/jimeng-apicore-mcp/index.js"],
  "env": {
    "APICORE_API_KEY": "sk-你的密钥",
    "JIMENG_OUTPUT_DIR": "/path/to/save/images"
  }
}'

3. 环境变量说明

  • APICORE_API_KEY: APICore平台的API密钥(必需)
  • JIMENG_OUTPUT_DIR: 图像保存目录(可选,默认为当前目录下的jimeng_images)

使用示例

基础用法

// 文生图
jimeng("一只可爱的猫咪")

// 图生图
jimeng("改为夜晚风格", {image: "http://example.com/image.jpg"})

// 批量生成(同一prompt生成多张)
jimeng("猫咪", {n: 4})

// 多prompt批量生成
jimeng(["猫", "狗", "兔子"])

高级功能

// 组图生成(自动判断数量)
jimeng("生成3张不同角度的猫咪", {
  sequential_image_generation: "auto",
  max_images: 3
})

// 指定艺术风格和质量
jimeng("山水画", {
  style: "chinese_painting",
  quality: "high"
})

// 多参考图融合
jimeng("融合两种风格", {
  image: ["url1.jpg", "url2.jpg"]
})

// Base64格式输出
jimeng("生成图标", {
  size: "1:1",
  response_format: "b64_json"
})

参数说明

| 参数 | 类型 | 说明 | 默认值 | |-----|------|------|--------| | prompt | string/array | 描述文本(必需,最大1000字符) | - | | image | string/array | 参考图片URL | null | | size | string | 图片尺寸比例 | "1:1" | | n | number | 每个prompt生成数量(1-4) | 1 | | watermark | boolean | 是否添加水印 | false | | stream | boolean | 是否流式传输 | false | | style | string | 艺术风格预设 | null | | quality | string | 生成质量 | "standard" | | sequential_image_generation | string | 组图模式 | "disabled" | | max_images | number | 组图最大数量(1-15) | 15 | | response_format | string | 输出格式 | "url" |

支持的尺寸

  • 1:1 (2048x2048)
  • 4:3 (2304x1728)
  • 3:4 (1728x2304)
  • 16:9 (2560x1440)
  • 9:16 (1440x2560)
  • 3:2 (2496x1664)
  • 2:3 (1664x2496)
  • 21:9 (3024x1296)

艺术风格

  • realistic - 写实风格
  • anime - 动漫风格
  • cartoon - 卡通风格
  • watercolor - 水彩风格
  • oil_painting - 油画风格
  • sketch - 素描风格
  • chinese_painting - 中国画风格

质量模式

  • draft - 快速预览质量
  • standard - 标准质量(默认)
  • high - 高质量(更精细,耗时更长)

注意事项

  1. 需要在APICore控制台确认已开通 doubao-seedream-4-0 服务
  2. prompt长度限制为1000字符
  3. 组图生成时,参考图数量 + 生成图数量不能超过15张
  4. 批量生成(n参数)最多支持4张
  5. 生成高质量或多张图片时需要更长时间
  6. 图片会自动保存到指定目录,便于后续使用

技术特点

  • 原生高分辨率输出(最高4K)
  • 强大的中英文理解能力
  • 精准的小文字生成
  • 优秀的布局效果
  • 快速推理(比3.0快10倍)

License

MIT