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
POST https://leftoverchef.usefulweb.site/api/v1/calculate– run Leftover ChefGET https://leftoverchef.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
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.
| Field | Type | Default | Description |
|---|---|---|---|
ingredients (required) | list | — | Ingredients you have. One per line, e.g. "2 eggs", "leftover rice", "half a courgette". |
useSoon | list | — | Must use soon. Items close to expiry get priority (added to the ingredients automatically). |
diet | multiselect (vegetarian, vegan, gluten-free, dairy-free) | — | Diet |
equipment | multiselect (stove, oven, microwave, blender) | ["stove","oven","microwave"] | Equipment available |
maxMinutes | integer | 45 | Maximum 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)
- Streamable HTTP endpoint:
https://leftoverchef.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
leftover_chef - Local stdio connector:
node src/mcp-stdio.ts --tool=leftover-chef
{
"mcpServers": {
"leftover-chef": { "type": "http", "url": "https://leftoverchef.usefulweb.site/mcp" }
}
}