Menus Recommender

io.github.spyypsPublished by GitHub account spyypsv1.0.1Updated Oct 24, 2026

全球美食加权随机推荐:基于 396 道菜的知识库,给出多样化的就餐推荐。

VerifiedSTDIODesktop onlyLocation & Lifestyle

Overview

AI-generated overview

Lets an assistant recommend dishes from a built-in global food knowledge base using weighted random selection and filters.

What you can do
Provides a recommend_dishes tool that returns dishes from a local knowledge base of hundreds of dishes across dozens of cuisines, with optional filters for count, keywords, price tier, maximum price, cuisine, geographic region, excluded dish IDs, and a random seed. A list_keywords tool returns the supported keyword whitelist covering tastes, ingredients, and dish types. Results include dish IDs, names, prices, cuisine, region, and descriptions, plus flags such as exhausted when the candidate pool is too small.
When to use it
Useful when an assistant needs to suggest what to eat, pick a dish for a meal, or generate varied food ideas while avoiding repeats. It suits casual meal-planning conversations where filtering by taste, ingredient, cuisine, or budget is helpful.
Requirements
Runs locally as a stdio process. Install via uvx or pip from the PyPI package menus-mcp, or run from source with Python 3. No accounts, API keys, or environment variables are declared. First launch loads data and may take about a second.
Before you install
Recommendations come only from the bundled knowledge base; when it reports exhausted, the README suggests the assistant fall back to web search or general model knowledge, which may produce dishes outside the knowledge base. No credentials, payments, or write actions are involved.

Installation

In SourceWeft

  1. Open Menus Recommender in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

menus-mcp:全球美食推荐 MCP Server

基于 462 道菜、41 个菜系的全球美食知识库做加权随机推荐。任何支持 Model Context Protocol(MCP)的 AI agent 均可使用,包括:

快速安装

也可在 MCP Registry 直接搜到本 server(io.github.spyyps/menus-recommender)。

方式 1:uvx(推荐,无需安装)

json
{  "mcpServers": {    "menus": {      "command": "uvx",      "args": ["menus-mcp"]    }  }}

uvx 会自动从 PyPI 下载并运行,首次启动稍有延迟(数据加载约 1s),后续缓存到本地。

方式 2:pip install

bash
pip install menus-mcp

然后在 MCP 客户端配置中:

json
{  "mcpServers": {    "menus": {      "command": "menus-mcp"    }  }}

方式 3:本地源码运行

bash
git clone https://github.com/spyyps/recommend-dishcd recommend-dishpip install -r mcp-server/requirements.txt# 运行入口python3 mcp-server/server.py# 或在 mcp-server/ 目录下:cd mcp-server && python3 -m menus_mcp

然后客户端配置:

json
{  "mcpServers": {    "menus": {      "command": "python3",      "args": ["/path/to/recommend-dish/mcp-server/server.py"]    }  }}

开放的工具

recommend_dishes

主推荐工具。参数(皆为可选):

参数类型默认说明
countint3推荐数量
keywordsstr""逗号分隔的关键词(OR语义),见下方白名单
price_tierstr""经济(≤20)/实惠(21-50)/中档(51-100)/高档(101-200)/奢华(>200)
max_priceint0价格上限(CNY)
cuisinestr""菜系名(如「川菜」「日本料理」)
geostr""地理大类(如「亚洲」「欧洲」)
exclude_idsstr""逗号分隔的菜品 ID,用于换一批去重
seedint0随机种子(0=系统时间)

支持的关键词白名单:

  • 口味:麻辣、辣、甜、酸、咸、鲜
  • 食材:海鲜、牛肉、羊肉、猪肉、鸡肉、素食
  • 类型:面食、米饭类、汤、甜品、烧烤、火锅、咖喱、汉堡披萨、饮品

否定注意:用户说「不要太辣」时不要传入 辣——传空即可。关键词做硬过滤,传入就会强制匹配。

返回示例(JSON):

json
{  "dishes": [    {"id": "cn_ch_001", "name": "麻婆豆腐", "name_en": "Mapo Tofu", "price": 38, "cuisine": "川菜", "region": "中华料理", "description": "嫩豆腐配牛肉末,以花椒和豆瓣酱炒制,麻辣鲜香"}  ],  "exhausted": false,  "filters": {"count": 3, "keywords": ["辣"], "price_tier": "", "relaxed": false, ...},  "candidate_pool_size": 54,  "returned": 3}

exhausted=true 表示候选池不足,应触发兜底链(放宽约束、网络搜索、LLM 常识)。

list_keywords

返回支持的关键词白名单。无参数。

兜底推荐

MCP server 仅负责第一层(本地知识库 + 加权随机)。当 exhausted=true 时,应自行按以下链兜底:

  1. 降级过滤:去掉价格约束,重试
  2. Web 搜索:查 "{用户原话} 推荐 菜品"
  3. LLM 常识:基于通用知识推荐,标注「非知识库菜品」

算法说明

  • 关键词硬过滤:用户传关键词时菜品必须至少匹配一个(OR)
  • 反偏置:权重 × 1/√(该菜系菜品数),防止大菜系压制小菜系
  • 多样性:同一菜系最多 ceil(count/3) 道
  • 价格松弛:候选不足时自动去价格档重试一次

发布

bash
cd mcp-serverpip install buildpython3 -m buildtwine upload dist/*

详见 PyPI 发布指南。

Source: mcp-server/README.md at commit cf23d64

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.0.1LatestSep 16, 2026

Score

40% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.