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

mcd-mcp-cli

v0.0.5

Published

TypeScript CLI for the McDonald's China MCP server.

Readme

mcd-mcp-cli

面向麦当劳中国远程 MCP Server 的 CLI 和 OpenClaw plugin。

实现依据是文档 麦当劳MCP平台 中描述的接入方式:

  • MCP URL: https://mcp.mcd.cn
  • 鉴权: Authorization: Bearer YOUR_MCP_TOKEN
  • 协议: Streamable HTTP
  • 当前兼容的 MCP 版本上限: 2025-06-18

功能

  • 作为 CLI 调用麦当劳 MCP server
  • 作为 OpenClaw plugin 暴露 mcd_* tools
  • 支持列出工具、调用工具、输出 MCP Client 配置

环境要求

  • Node.js >=18

安装

pnpm add -g mcd-mcp-cli
mcd --help

也可以在仓库内直接使用:

pnpm install
pnpm run build
node ./bin/mcd.js --help

配置

优先级:命令行参数 > 环境变量 > 默认值。

环境变量:

  • MCD_MCP_TOKEN
  • MCD_TOKEN
  • MCD_MCP_URL,默认 https://mcp.mcd.cn
  • MCD_MCP_PROTOCOL_VERSION,默认 2025-06-18
  • MCD_MCP_SERVER_NAME,默认 mcd-mcp-cli

CLI 参数:

  • --token <token>
  • --url <url>
  • --protocol-version <version>
  • --server-name <name>
  • --header key=value
  • --json '{"foo":"bar"}'
  • --body-file <path>
  • --raw
  • --verbose

dotenv

CLI 启动时会自动加载当前工作目录下的 .env

你只需要把 .env.example 的内容参考着填进 .env,至少设置:

MCD_MCP_TOKEN=你的_mcp_token

如果 .env 和命令行参数同时存在,仍然遵循:

命令行参数 > .env / 环境变量 > 默认值

OpenClaw Plugin

openclaw plugins install mcd-mcp-cli

本地开发调试时,仍然可以使用本地目录安装:

pnpm run build
openclaw plugins install -l .

安装后,在 OpenClaw 配置里启用:

{
  "plugins": {
    "entries": {
      "mcd-mcp-cli": {
        "enabled": true,
        "config": {
          "token": "YOUR_MCD_MCP_TOKEN",
          "url": "https://mcp.mcd.cn",
          "protocolVersion": "2025-06-18"
        }
      }
    }
  }
}

OpenClaw 暴露的工具名使用 snake_case,并带 mcd_ 前缀,例如:

  • mcd_now_time_info
  • mcd_campaign_calendar
  • mcd_query_meals
  • mcd_delivery_create_address
  • mcd_mcp_call

默认可用:

  • mcd_create_order
  • mcd_auto_bind_coupons
  • mcd_mall_create_order

默认仍建议按白名单控制的工具:

  • mcd_delivery_create_address
  • mcd_mcp_call

tools.allowagents.list[].tools.allow 都是 OpenClaw 的工具白名单:

  • tools.allow
    • 全局白名单,对所有 agent 生效。
  • agents.list[].tools.allow
    • 某个 agent 自己的白名单,只对该 agent 生效。

常见做法是:

  • 全局只放常用工具
  • 仅把确实想限制的工具放到特定 agent 的 allowlist 里

全局白名单示例:

{
  "plugins": {
    "entries": {
      "mcd-mcp-cli": {
        "enabled": true,
        "config": {
          "token": "YOUR_MCD_MCP_TOKEN",
          "url": "https://mcp.mcd.cn",
          "protocolVersion": "2025-06-18"
        }
      }
    }
  },
  "tools": {
    "allow": [
      "mcd_now_time_info",
      "mcd_campaign_calendar",
      "mcd_query_meals",
      "mcd_query_meal_detail",
      "mcd-mcp-cli"
    ]
  }
}

按 agent 精细控制示例:

{
  "plugins": {
    "entries": {
      "mcd-mcp-cli": {
        "enabled": true,
        "config": {
          "token": "YOUR_MCD_MCP_TOKEN",
          "url": "https://mcp.mcd.cn",
          "protocolVersion": "2025-06-18"
        }
      }
    }
  },
  "agents": {
    "list": [
      {
        "id": "planner",
        "tools": {
          "allow": [
            "mcd_now_time_info",
            "mcd_campaign_calendar",
            "mcd_query_meals"
          ]
        }
      },
      {
        "id": "order-agent",
        "tools": {
          "allow": [
            "mcd_now_time_info",
            "mcd_query_meals",
            "mcd_calculate_price",
            "mcd_delivery_create_address"
          ]
        }
      }
    ]
  }
}

CLI

命令:

mcd config [options]
mcd info [options]
mcd tools [options]
mcd tools --known
mcd call <toolName> [options]
mcd rpc <method> [options]

常用示例:

mcd config --token "$MCD_MCP_TOKEN"
mcd info --token "$MCD_MCP_TOKEN"
mcd tools --token "$MCD_MCP_TOKEN"
mcd call now-time-info --token "$MCD_MCP_TOKEN"
mcd call campaign-calendar \
  --token "$MCD_MCP_TOKEN" \
  --json '{"specifiedDate":"2025-12-09"}'
mcd call delivery-create-address \
  --token "$MCD_MCP_TOKEN" \
  --json '{"city":"南京市","contactName":"李明","phone":"16666666666","address":"清竹园9号楼","addressDetail":"2单元508"}'
mcd rpc tools/list --token "$MCD_MCP_TOKEN"

MCP 配置 JSON

{
  "mcpServers": {
    "mcd-mcp-cli": {
      "type": "streamablehttp",
      "url": "https://mcp.mcd.cn",
      "headers": {
        "Authorization": "Bearer YOUR_MCP_TOKEN"
      }
    }
  }
}

已知工具

当前内置的已知工具包括:

list-nutrition-foods
delivery-query-addresses
delivery-create-address
query-store-coupons
query-meals
query-meal-detail
calculate-price
create-order
query-order
campaign-calendar
available-coupons
auto-bind-coupons
query-my-coupons
query-my-account
mall-points-products
mall-product-detail
mall-create-order
now-time-info