API & MCP

Everything a person can do on Leftover Chef, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Leftover Chef

List what is in your fridge and cupboard, mark what must be used soon, and set diet, equipment and time. Leftover Chef matches your ingredients against 37 flexible recipe templates (frittata, fried rice, soup, curry…) and ranks the five that use the most of what you have with the fewest missing items.

Inputs of Leftover Chef
FieldTypeDefaultDescription
ingredients (required)list—Ingredients you have. One per line, e.g. "2 eggs", "leftover rice", "half a courgette".
useSoonlist—Must use soon. Items close to expiry get priority (added to the ingredients automatically).
dietmultiselect (vegetarian, vegan, gluten-free, dairy-free)—Diet
equipmentmultiselect (stove, oven, microwave, blender)["stove","oven","microwave"]Equipment available
maxMinutesinteger45Maximum time

Example request

Eggs, rice and wilting veg

curl -X POST https://leftoverchef.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"ingredients":["4 eggs","leftover rice","half a courgette","spinach","cheddar","spring onions","soy sauce"],"useSoon":["spinach","courgette"],"equipment":["stove","oven"],"maxMinutes":30}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "leftover-chef": { "type": "http", "url": "https://leftoverchef.usefulweb.site/mcp" }
  }
}