API & MCP

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

HTTP API

Weekly Meal Planner

List what is in your fridge and cupboards (with quantities and best-before dates) and your preferences (vegetarian, vegan, pescatarian, maximum cooking time, ingredients to avoid). The planner picks one dinner per day from about 60 simple home-cooking recipes, using food that expires soonest first, and adds up a shopping list of everything still missing.

Inputs of Weekly Meal Planner
FieldTypeDefaultDescription
startDatedate—First day. Default: today.
daysinteger7Number of days
servingsinteger2People per meal
dietselect (any, vegetarian, vegan, pescatarian)"any"Diet
maxMinutesinteger45Maximum cooking time
pantrytable—Pantry and fridge. Leave the quantity empty if you are not sure (counted as enough). Best-before dates make the planner use those items first.
excludelist—Avoid these ingredients. One per line, e.g. mushrooms or feta. Recipes containing them are skipped.

Example request

Use up spinach, eggs and chicken this week

curl -X POST https://weeklymealplanner.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"startDate":"2026-10-19","days":7,"servings":2,"diet":"any","maxMinutes":45,"pantry":[{"item":"Spinach","quantity":250,"unit":"g","expires":"2026-10-20"},{"item":"Eggs","quantity":6,"unit":"pcs","expires":"2026-10-28"},{"item":"Chicken breast","quantity":300,"unit":"g","expires":"2026-10-21"},{"item":"Rice","quantity":1,"unit":"kg"},{"item":"Onions","quantity":4,"unit":"pcs"},{"item":"Canned tomatoes","quantity":800,"unit":"g"},{"item":"Feta","quantity":200,"unit":"g","expires":"2026-10-23"},{"item":"Pasta","quantity":500,"unit":"g"}]}'

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": {
    "weekly-meal-planner": { "type": "http", "url": "https://weeklymealplanner.usefulweb.site/mcp" }
  }
}