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

image-create-mcp

v1.2.0

Published

MCP server for AI image generation with multi-provider support (OpenAI, Gemini, OpenRouter)

Readme

Image Create MCP

npm version License: MIT

AI 图片生成 MCP 服务器。通过对话式接口调用图像生成模型,自动解析返回的 base64 或图床 URL 格式。

功能特性

  • 自定义配置组:可配置任意数量的 API 端点,名称自定义
  • 对话式接口:统一使用 /chat/completions 格式
  • 自动解析:自动识别返回的 base64 或 ![image](url) 格式
  • 自动保存:将生成的图片保存到指定目录

安装

Claude Code 安装

claude mcp add image-create-mcp -s user -- npx image-create-mcp

安装后编辑 ~/.claude.json 添加环境变量。

手动配置

{
  "mcpServers": {
    "image-create-mcp": {
      "command": "cmd",
      "args": ["/c", "npx", "image-create-mcp"],
      "env": {
        "PROVIDER_MYAPI_API_KEY": "sk-xxx",
        "PROVIDER_MYAPI_API_URL": "https://api.example.com/v1/chat/completions",
        "PROVIDER_MYAPI_MODEL": "gpt-image-1"
      }
    }
  }
}

环境变量

配置组格式

每个配置组需要 3 个环境变量,格式为 PROVIDER_{NAME}_{FIELD}

| 变量 | 说明 | |------|------| | PROVIDER_{NAME}_API_KEY | API 密钥 | | PROVIDER_{NAME}_API_URL | 完整请求地址 | | PROVIDER_{NAME}_MODEL | 默认模型名称 |

{NAME} 可以是任意名称(大写字母、数字、下划线),例如:

# 配置组 "main"
PROVIDER_MAIN_API_KEY=sk-xxx
PROVIDER_MAIN_API_URL=https://api.example.com/v1/chat/completions
PROVIDER_MAIN_MODEL=gpt-image-1

# 配置组 "backup"
PROVIDER_BACKUP_API_KEY=sk-yyy
PROVIDER_BACKUP_API_URL=https://backup.example.com/v1/chat/completions
PROVIDER_BACKUP_MODEL=dall-e-3

通用配置

| 变量 | 说明 | 默认值 | |------|------|--------| | IMAGE_GEN_OUTPUT_DIR | 默认输出目录 | . | | IMAGE_GEN_FILENAME_PREFIX | 默认文件名前缀 | image | | IMAGE_GEN_OVERWRITE | 文件覆盖模式 | suffix |

使用示例

{
  "provider": "main",
  "prompt": "一只可爱的猫咪在阳光下睡觉",
  "images": ["./inputs/cat-1.png", "./inputs/cat-2.jpg"],
  "output": {
    "dir": "./images",
    "filename": "cute-cat"
  }
}

参数说明:

| 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | provider | string | 是 | 配置组名称(小写) | | model | string | 否 | 模型名称(覆盖默认配置) | | prompt | string | 否* | 图片描述 | | messages | array | 否* | 对话消息 | | images | array | 否* | 上传图片路径列表(支持多图) | | output.dir | string | 否 | 输出目录 | | output.filename | string | 否 | 文件名(不含扩展名) | | output.overwrite | string | 否 | error / overwrite / suffix |

*prompt / messages / images 至少提供一个

响应格式

服务器会自动解析以下返回格式:

  • ![image](https://example.com/image.jpg) - 图床 URL
  • ![image](data:image/png;base64,...) - Base64 数据

开发

git clone https://github.com/ishailluminas/image-create-mcp.git
cd image-create-mcp
npm install
npm run build

许可证

MIT