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

@xxtaoaooo-2002/ingredient-analysis-mcp

v1.0.1

Published

MCP server for analyzing product ingredients using AI vision model

Readme

🔬 成分分析 MCP 服务器

npm version License: MIT Node.js Version

🤖 基于 Model Context Protocol (MCP) 的智能成分分析服务器,利用魔搭社区的 Qwen3-VL-235B-A22B-Instruct 多模态模型,对商品成分图片进行深度分析。

✨ 功能特性

  • 📸 图片识别:支持 URL 和 Base64 格式的图片输入
  • 🧪 成分解析:自动识别并提取商品成分列表
  • 📊 深度分析:为每个成分提供:
    • 🎯 主要功能
    • ✅ 潜在益处
    • ⚠️ 可能危害
    • 📝 科学说明
  • 📋 结构化输出:清晰易读的 Markdown 格式报告
  • 🔒 类型安全:完整的 TypeScript 类型定义
  • 标准协议:严格遵循 MCP 协议规范

📋 前置要求

📦 安装

方式一:使用 npx (推荐) ⭐

在您的 MCP 客户端配置中直接使用 @latest 标签:

{
  "mcpServers": {
    "ingredient-analysis": {
      "command": "npx",
      "args": [
        "-y",
        "@xxtaoaooo-2002/ingredient-analysis-mcp@latest"
      ],
      "env": {
        "MODELSCOPE_API_KEY": "your-api-key-here"
      }
    }
  }
}

方式二:全局安装

npm install -g @xxtaoaooo-2002/ingredient-analysis-mcp@latest

方式三:本地开发

git clone https://github.com/xxtaoaooo-2002/ingredient-analysis-mcp.git
cd ingredient-analysis-mcp
npm install
npm run build

🚀 使用方法

配置 MCP 客户端

在您的 MCP 客户端配置文件中添加以下配置(推荐使用 @latest 以自动获取最新版本):

{
  "mcpServers": {
    "ingredient-analysis": {
      "command": "npx",
      "args": [
        "-y",
        "@xxtaoaooo-2002/ingredient-analysis-mcp@latest"
      ],
      "env": {
        "MODELSCOPE_API_KEY": "your-api-key-here"
      }
    }
  }
}

常见 MCP 客户端配置位置

根据您使用的 MCP 客户端文档,在相应的配置文件中添加上述配置即可。

基本配置格式:

{
  "command": "npx",
  "args": ["-y", "@xxtaoaooo-2002/ingredient-analysis-mcp@latest"],
  "env": {
    "MODELSCOPE_API_KEY": "your-api-key-here"
  }
}

💡 提示:请将 your-api-key-here 替换为您的魔搭社区 API 密钥。获取 API 密钥

🛠️ 可用工具

analyze_ingredient

分析商品成分图片,识别成分列表并提供详细的成分分析。

参数:

  • image_url (string, 必需): 图片的 URL 地址或 Base64 编码
    • 支持格式:
      • HTTP(S) URL: https://example.com/image.jpg
      • Base64: data:image/jpeg;base64,...

返回示例:

# 🔬 成分分析报告

📊 共检测到 3 种成分

---

## 1. 水

**🎯 功能**: 溶剂,帮助其他成分溶解和分散

**✅ 益处**: 保湿、稀释产品浓度

**⚠️ 风险**: 一般无明显危害

**📝 说明**: 水是大多数护肤品和食品的基础成分,安全无害

---

## 2. 甘油

**🎯 功能**: 保湿剂

**✅ 益处**: 吸引并锁住水分,改善皮肤干燥

**⚠️ 风险**: 浓度过高可能导致皮肤黏腻感

**📝 说明**: 甘油是一种常见的保湿成分,广泛应用于化妆品中

---

...

🔑 环境变量

| 变量名 | 说明 | 必需 | |--------|------|------| | MODELSCOPE_API_KEY | 魔搭社区 API 密钥 | ✅ |

📖 使用示例

在 MCP 客户端(如 Claude Desktop)中,您可以直接通过对话使用:

示例 1:使用图片 URL

请调用MCP帮我分析一下这个产品的成分:https://example.com/product-ingredients.jpg

示例 2:使用 Base64 编码

请调用MCP帮我分析这张成分表图片:data:image/jpeg;base64,/9j/4AAQ...

示例 3:描述需求

我有一张护肤品成分表的照片,请调用MCP帮我分析一下各个成分的作用和安全性,提供相关链接...

🔧 开发

构建项目

npm run build

监听模式

npm run watch

本地测试

# 设置环境变量
export MODELSCOPE_API_KEY=your-api-key

# 运行服务器
node build/index.js

📁 项目结构

ingredient-analysis-mcp/
├── src/
│   └── index.ts          # 主服务器代码
├── build/                # 编译输出目录
├── package.json          # 项目配置
├── tsconfig.json         # TypeScript 配置
├── .gitignore           # Git 忽略文件
├── .npmignore           # npm 忽略文件
└── README.md            # 项目文档

🤝 贡献

欢迎提交 Issue 和 Pull Request!

  1. Fork 本仓库
  2. 创建特性分支 (git checkout -b feature/AmazingFeature)
  3. 提交更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 开启 Pull Request

📄 许可证

MIT © 2025 xxtaoaooo-2002

🙏 致谢

📞 联系方式


⭐ 如果这个项目对您有帮助,请给它一个 Star!