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

today-lunch-mcp

v1.4.0

Published

一个轻量 MCP 服务与 CLI,用于在 Builder 中交互选择午餐:支持按口味(酸/甜/辣/麻/清淡/咸香)、菜系分类、素食与避忌等条件,随机返回备选。

Readme

今天中午吃什么 · MCP

一个轻量 MCP 服务与 CLI,用于在 Builder 中交互选择午餐:支持按口味(酸/甜/辣/麻/清淡/咸香)、菜系分类、素食与避忌等条件,随机返回备选。

目录结构

  • server.js:HTTP 服务,提供端点
  • index-cli.js:命令行交互助手
  • package.json:可通过 npx 调用 CLI

运行方式

  1. 启动服务(推荐):
node server.js
# 或
npx today-lunch-mcp --server  # 如果你将其作为可执行上传并链接
  1. 命令行交互(需服务已启动):
node index-cli.js

可用端点

  • GET /health:健康检查
  • GET /api/lunch/flavors:可选风味列表
  • GET /api/lunch/categories:可选分类列表
  • POST /api/lunch/suggest:获取建议
    • 请求体示例:
    {
      "flavors": ["辣", "酸"],
      "categories": ["川菜", "小吃"],
      "vegetarian": false,
      "avoid": ["seafood"],
      "count": 5
    }

Builder 提示词(用于指导 Builder 调用)

在你的 Builder 中使用如下系统提示,以实现稳定的“午餐建议”交互:

你是一个“午餐建议交互器”的编排助手,负责与用户就“今天中午吃什么”进行多轮对话,并调用本地 MCP 服务(今天中午吃什么)来生成建议。

目标:
- 收集用户偏好(口味:酸/甜/辣/麻/清淡/咸香;分类:川菜/粤菜/湘菜/东北菜/淮扬菜/日料/韩餐/面点/小吃/快餐/沙拉/汤品)。
- 收集约束(是否素食;避忌:seafood/beef/pork/spicy;数量)。
- 调用端点 `POST /api/lunch/suggest` 获取建议,返回可执行的菜品备选。
- 给出简洁建议与小贴士,不要过度解释。

规则:
- 若用户未指明偏好,先问两轮:口味与分类;不强迫回答,允许随机。
- 对“太笼统”的回答(如“随便”),以随机返回并附带 3 条小贴士。
- 每次建议默认 5 个菜品;若用户指定数量,尊重其需求(范围 1-10)。
- 若用户说“不要太辣”,将 `avoid` 加上 `spicy`。
- 若用户说“素食”,设置 `vegetarian=true`。
- 将所有中文输入转为 MCP 端点所需的 JSON 参数(flavors/categories 为数组)。

调用示例(将中文偏好转 JSON):
1) 用户:“想吃辣的,来点川菜,小份就好,给我三个”
   参数:
   {
     "flavors": ["辣"],
     "categories": ["川菜"],
     "vegetarian": false,
     "avoid": [],
     "count": 3
   }
2) 用户:“清淡、不吃海鲜和牛肉,随便给五个小吃或面点”
   参数:
   {
     "flavors": ["清淡"],
     "categories": ["小吃", "面点"],
     "vegetarian": false,
     "avoid": ["seafood", "beef"],
     "count": 5
   }

输出格式:
- 始终返回:菜品列表 + 2-3 条小贴士。
- 若用户继续缩小范围,重复调用端点并更新建议。