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

@airtrioa/max-image-mcp

v0.1.1

Published

MCP server: MiniMax 文生图并保存到本地

Readme

MiniMax 文生图 MCP Server

  • 提供 MCP 工具 minimax_generate_image,调用 MiniMax 文生图接口并将生成的图片保存到本地指定目录。
  • 使用 Node.js 开发,通过启动参数传入【图片保存路径】【token】。

安装依赖

  1. 在项目根目录执行:npm install
  2. 需要 Node.js 18+(以使用内置 fetch)。

启动(独立运行/调试)

  • 命令:node src/server.js --outputDir <保存目录> --token <你的MiniMaxToken>
  • 示例:node src/server.js --outputDir ./outputs --token sk-xxxx

使用 npx 启动

  • 在项目根目录执行(本地开发未发布场景):
    • npx -y . -- --outputDir ./outputs --token sk-xxxx
  • 安装后也可直接(如果发布到 npm,或全局安装):
    • npx @airtrioa/max-image-mcp --outputDir ./outputs --token sk-xxxx

npm 发布步骤

  • 检查包名是否可用:npm search max-image-mcp
  • 登录 npm:npm login
  • 发布公开包:npm publish --access public
  • 验证使用:npx @airtrioa/max-image-mcp --outputDir ./outputs --token sk-xxxx
  • 如包名冲突,可使用作用域发布:
    • 修改 package.jsonname@你的作用域/max-image-mcp
    • 发布:npm publish --access public
    • 使用:npx @你的作用域/max-image-mcp --outputDir ./outputs --token sk-xxxx

MCP 工具说明

  • 名称:minimax_generate_image
  • 描述:根据文本生成图片(MiniMax),并保存到启动参数指定目录
  • 入参:
    • prompt:string,必填
    • aspect_ratio1:1 | 16:9 | 9:16 | 4:3 | 3:4,可选,默认 16:9
    • model:string,可选,默认 image-01
    • filename_prefix:string,可选,默认 minimax
    • count:number,可选,默认 1
  • 返回:
    • text:生成并保存的图片数量
    • json{ files: string[] } 保存的绝对路径列表

Claude Desktop 配置示例

在 Claude Desktop 的 mcp/settings.json 中添加:

{
  "servers": {
    "minimax-image-mcp": {
      "command": "node",
      "args": [
        "e:/liuzw-code/max-image-mcp/src/server.js",
        "--outputDir",
        "e:/liuzw-code/max-image-mcp/outputs",
        "--token",
        "<你的MiniMaxToken>"
        
      ]
    }
  }
}

参考

  • MiniMax 文生图接口:https://api.minimaxi.com/v1/image_generationAuthorization: Bearer <token>)。
  • 请求体关键字段:model, prompt, aspect_ratio, response_format: 'base64'
  • 响应字段:data.image_base64: string[]