Dishmath

io.github.CloudCorpRecords由 GitHub 账号 CloudCorpRecords 发布v0.1.0更新于 Nov 7, 2026

本地餐厅计算:食品成本、含增值税的菜单价格、食谱缩放以及欧盟过敏原矩阵。

AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。

原文描述

Local restaurant math: food cost, menu price with VAT, recipe scaling and the EU allergen matrix.

已验证STDIO仅桌面位置与生活

概览

Dishmath 的本地 MCP 服务;无需登录;STDIO;4 个工具。

暂无 AI 概览:以下信息来自注册中心条目和服务本身。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Dishmath,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

dishmath

Restaurant arithmetic that runs entirely on your own machine: what a plate costs to make, what to charge for it, how a recipe changes between portion counts, and which dishes a guest with an allergy must avoid. There is no account, no key and no network call — every answer is computed locally from the numbers you pass in.

The four calculations

  • Food cost — add up a dish ingredient by ingredient. Alongside the plate cost you can ask for the selling price that lands on a target food-cost percentage, and for the percentage you are really running at today's price.
  • Menu price — start from a plate cost and a target food-cost percentage. You get the net price, the price with VAT added, that price rounded up to a clean step (0.50, 1.00, …), the gross profit per plate net of tax, and the food-cost percentage the rounded price actually gives you.
  • Recipe scaling — give a recipe written for one number of portions and get every quantity rewritten for another. When the ingredients carry unit costs, the batch cost and the cost per portion come with it.
  • Allergen matrix — declare the allergens in each dish and get the dish-by-allergen table used under EU Regulation 1169/2011 (Annex II), plus the list of dishes to avoid for each of the 14 allergens. Names are accepted in English or Italian, and common names work too: "shrimp" counts as crustaceans, "dairy" as milk. The tool never guesses allergens from a dish's name — a dish with none declared is reported that way.

Money is rounded half-up to two decimals and percentages to one decimal. An optional ISO currency code (default EUR) changes only how amounts are printed.

Worked example, plate cost €3.20 at a 30% target with 10% VAT and a 0.50 rounding step:

Net price (before tax): €10.67Price incl. 10% tax: €11.74Menu price (rounded up to 0.5): €12.00Gross profit per plate (net of tax): €7.71Real food cost after rounding: 29.3%

CLI

bash
npx @reneturcios/dishmath menu_price_calculator '{"plate_cost":3.20,"target_food_cost_percent":30,"vat_percent":10,"rounding_step":0.50}'npx @reneturcios/dishmath food_cost_calculator '{"ingredients":[{"name":"flour","quantity":0.5,"unit":"kg","unit_cost":1.20}],"target_food_cost_percent":30}'npx @reneturcios/dishmath recipe_scaler '{"ingredients":[{"name":"flour","quantity":500,"unit":"g"}],"original_portions":4,"target_portions":6}'npx @reneturcios/dishmath allergen_matrix '{"dishes":[{"name":"Shrimp pasta","allergens":["shrimp","gluten"]}]}'npx @reneturcios/dishmath --version

Each tool subcommand takes a single JSON argument string and prints the result as plain text. Exit codes: 0 on success, 1 on a calculation or validation error, 2 on a usage error.

MCP

bash
npx -y @reneturcios/dishmath mcp

MCP client configuration:

json
{  "mcpServers": {    "dishmath": {      "command": "npx",      "args": ["-y", "@reneturcios/dishmath", "mcp"]    }  }}

Tools exposed over MCP: food_cost_calculator, menu_price_calculator, recipe_scaler, allergen_matrix.

Docker

bash
docker run -i ghcr.io/cloudcorprecords/dishmathdocker run --rm ghcr.io/cloudcorprecords/dishmath menu_price_calculator '{"plate_cost":3.20,"target_food_cost_percent":30,"vat_percent":10,"rounding_step":0.50}'

The container's default command is mcp, so the first form starts the stdio MCP server; any other arguments reach the CLI.

Development

bash
npm installnpm run buildnpm testnpm run dev

License

MIT — see LICENSE.

来源:README.md,提交 f9dc5a8

工具

4

food_cost_calculator

Cost of a dish from its ingredients, the price that hits your target food cost %, and your actual food cost % at the current price.

输入参数currencyingredients必填current_pricetarget_food_cost_percent

menu_price_calculator

From plate cost and target food cost: net price, price including VAT, menu price rounded up to a clean step, gross profit and real food cost after rounding.

输入参数currencyplate_cost必填vat_percentrounding_steptarget_food_cost_percent必填

recipe_scaler

Scale a recipe from N to M portions. Returns every scaled quantity, plus batch cost and cost per portion when unit costs are given.

输入参数currencyingredients必填target_portions必填original_portions必填

allergen_matrix

The dish × allergen table required in the EU (Reg. 1169/2011, Annex II), with the dishes to avoid for each allergen. Accepts English, Italian or common names.

输入参数dishes必填

版本历史

1
  1. v0.1.0最新Nov 4, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分