Cups to Grams

v1.0.1
io.github.theluckystrike/cups-to-grams-mcp Checked 2 hours ago Published 4 days ago

Cups to grams for 271 ingredients with USDA and King Arthur densities, recipe scaling, oven temps.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

convert_ingredient Convert cups to grams for a named ingredient

Converts a kitchen amount between volume and weight for a specific ingredient, using measured grams-per-cup values (USDA FoodData Central portion weights with FDC ids, and the King Arthur Baking ingredient weight chart) instead of guessed densities. 271 ingredients. Units: US cup (236.5882365 mL), metric cup (250 mL), imperial cup, US legal cup (240 mL), Japanese cup, US/metric/Australian tablespoons, teaspoons, US and imperial fl oz, pints, quarts, gallons, mL, dL, L, g, mg, kg, oz, lb and sticks of butter. Volume to volume and weight to weight need no ingredient. States which cup definition…

ParameterTypeDescription
amount *numberQuantity to convert, e.g. 1.5. Use decimals for fractions (3/4 = 0.75).
from_unit *stringUnit to convert from, e.g. cup, us_cup, metric_cup, tbsp, tsp, fl oz, ml, l, g, oz, lb, stick.
to_unit *stringUnit to convert to, e.g. g, oz, cup, ml.
cup_systemstringWhich cup and spoon family the bare words cup, tbsp, tsp, fl oz and pint mean. us = 236.588 mL cup (default), metric = 250 mL cup with 15/5 mL spoons, imperial = 284.13 mL cup with UK pints. Explicit…
ingredientstringIngredient name, e.g. "all-purpose flour", "brown sugar", "honey". Required when converting between volume and weight.

search_ingredients Search the measured ingredient density table

Fuzzy search over the ingredient table (flours, sugars, fats, dairy, liquids, nuts, grains, fruit, produce). Returns canonical names, grams per US cup and per tablespoon, and the source (USDA FDC id or King Arthur Baking chart). Use it to pick the exact ingredient before converting.

ParameterTypeDescription
query *stringIngredient name or part of it, e.g. "flour", "confectioners sugar", "oats".
limitintegerMaximum results. Default 10.

scale_recipe Scale a recipe and convert it to grams

Scales a list of recipe ingredient lines ("1 1/2 cups all-purpose flour", "2 tbsp honey", "3 eggs") by a factor or from original to target servings. Parses mixed numbers and fraction characters. With to_metric_weights, converts cup and spoon amounts to grams with the measured density table and weights to grams, and reports lines it could not match.

ParameterTypeDescription
lines *arrayIngredient lines, one per item, quantity first.
cup_systemstringWhich cup and spoon family the bare words cup, tbsp, tsp, fl oz and pint mean. us = 236.588 mL cup (default), metric = 250 mL cup with 15/5 mL spoons, imperial = 284.13 mL cup with UK pints. Explicit…
factornumberMultiply every quantity by this, e.g. 2 or 0.5. Or give servings instead.
original_servingsnumberServings the recipe makes now.
target_servingsnumberServings you want.
to_metric_weightsbooleanAlso give grams for each line. Default false.

convert_oven_temperature Convert oven temperature between F, C and gas mark

Converts an oven setting between Fahrenheit, Celsius and UK gas mark (1/4 to 10, from the standard recipe table) and optionally adjusts for a fan (convection) oven by 20 C, the manufacturer guidance. Returns the nearest gas mark and whether it is an exact table value.

ParameterTypeDescription
from_scale *stringScale of value: F, C or gas (gas mark).
value *numberTemperature or gas mark, e.g. 350, 180 or 4.
fanstringFan oven adjustment. Default none.