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

cyy-mall-mcp

v0.1.10

Published

MCP server that exposes 菜洋洋 cyymall-cli (cyy) as Model Context Protocol tools (stdio)

Readme

cyy-mall-mcp

通过 Model Context Protocol (stdio)cyymall-cli(命令 cyy)暴露给 Cursor、阿里百炼 FC MCP、Claude Desktop 等宿主。

智能体技能文档: skills/cyy-mall-mcp/SKILL.md
各工具入参 / 出参规范(Agent 构造参数用): MCP_TOOLS_IO.md

原理

本进程使用 @modelcontextprotocol/sdk 注册工具;每次工具调用通过 node /path/to/cyymall-cli/bin/cyy.js … 执行,与你在终端手工输入 cyy … 等价。会话仍落在 ~/.cyymall/config.json(或由宿主注入的环境变量)。

安装

npm install -g cyy-mall-mcp cyymall-cli

全局安装 cyymall-cli 可保证任意工作目录下都能 require.resolve('cyymall-cli/bin/cyy.js');仅安装 cyy-mall-mcp 时,cyymall-cli 会作为依赖出现在 node_modules 中,同样可用。

本地开发(与本仓库同级的 cyymall-cli)可在本目录:

npm install
node src/index.js

运行(stdio MCP)

npx cyy-mall-mcp
# 或
cyy-mall-mcp

注意: MCP 使用 stdio 通信,请勿再向 stdout 打印调试信息。

环境变量

| 变量 | 说明 | |------|------| | CYY_BASE_URL | API base URL, default https://dhcmall.ifoodbuy.com | | CYY_MCP_ALLOW_WRITE | true enables cart_add, order_pre_settle, order_confirm, order_quick, and order_cancel; order_list stays read-only | | CYY_TOKEN 等 | 进程级会话注入(见 cyymall-cli README);与 CYY_BOOTSTRAP_* 不同 | | other CYY_* | Same as cyymall-cli README, such as CYY_BOOTSTRAP_* |

工具一览

| 工具名 | 说明 | |--------|------| | auth_whoami | 当前登录态 | | config_show | 脱敏后的会话配置 | | auth_send_code_v1 | Send login SMS code | | auth_login | Login with SMS code (phone + code) | | auth_import | Import external token (cyy auth import) | | product_search | 商品关键字搜索 | | product_category_list | 分类树(一级 + 二级分组) | | product_zone_tags | 二级分组下的专区标签 | | product_category_skus | 标签下商品(游标 afterKey) | | product_skus_by_category | 无标签时按二级分组分页列商品 | | api_call | 万能 API(对应 cyy api call) | | order_pay_url | 代付链接 | | order_list | 订单分页列表(只读) | | shop_list / shop_sites / shop_use / shop_use_site | 门店与站点 | | cart_add / order_pre_settle / order_confirm / order_quick / order_cancel | 需 CYY_MCP_ALLOW_WRITE=true |

详见 MCP_TOOLS_IO.md 中每个工具的入参表、bodyJson 示例与 data.upstream 字段说明。

阿里百炼 / FC MCP 部署示例

安装方式选 npx,在 MCP 服务配置 中可使用(按控制台实际字段调整):

{
  "mcpServers": {
    "cyy-mall": {
      "command": "npx",
      "args": ["-y", "cyy-mall-mcp"],
      "env": {
        "CYY_BASE_URL": "https://dhcmall.ifoodbuy.com",
        "CYY_MCP_ALLOW_WRITE": "false"
      }
    }
  }
}

首次 npx 冷启动可能需数十秒。登录流程:先 auth_send_code_v1,再由用户提供一次性验证码并调用 auth_login

安全说明

  • 禁止在模型对话中粘贴 npm token、商城密码、session token
  • 生产环境应对 MCP 入口做 鉴权与租户隔离;本包仅为 thin wrapper。
  • 购物车与订单写入类工具默认关闭,需显式打开 CYY_MCP_ALLOW_WRITE

许可证

MIT