recipe-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@recipe-mcp-servermake a shopping list for tacos and curry, I have garlic and onion"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Recipe MCP Server
A small, offline MCP server (Model Context Protocol, stdio transport) that holds a personal recipe collection and gives AI agents the tools to help you actually cook: search by what's in your fridge, scale recipes for a cook-date, and turn a week of meals into a grouped shopping list — with the items you already have pulled out as "already have".
Plain Python standard library only. No dependencies, no network, no accounts. Your recipes live in one JSON file with automatic rotating backups.
Built with beginner-friendly, local-first principles in mind by Asdale Dynamics, LLC — the same spirit behind The Massive AI Manual and dylanasdale.github.io: AI explained like a friend would, never condescending.
What it does
Tool | What your agent can do with it |
| Store a recipe: ingredients (with amounts + units), steps, servings, tags |
| List the whole collection (id, title, servings, tags) |
| Fetch one recipe formatted for a cook to read |
| Find recipes by ingredients on hand (ranked by how much you'd use up), tags, or a title/keyword query |
| Rescale every ingredient for a target serving count (e.g. cooking for 5 instead of 2) |
| Combine recipes into one list, scaled per recipe, grouped by store section, with pantry-aware gaps |
| Remove a recipe by id |
The starter set ships with 5 recipes (chickpea curry, garlic butter pasta, sheet-pan salmon, black bean tacos, chili) so everything works immediately.
Related MCP server: scraps-kitchen-mcp
How your data is stored
Everything lives in
recipes.jsoninside a data directory (default:recipes_mcp/data/, override with--data-dirorRECIPE_MCP_DATA).Before every change, backups rotate automatically:
recipes.json.bak-1(newest) throughrecipes.json.bak-3are kept.If
recipes.jsonis ever corrupted, the server recovers from the newest readable backup instead of crashing or losing your library.Writes are atomic (temp file + rename), so a crash mid-save can't leave a half-written file.
Path safety: the store file must be a file named
recipes.jsondirectly inside the data directory; directory traversal and symlink escapes are rejected on every operation.
Requirements
Python 3.10+. That's it.
Run it
# straight from this folder
python3 -m recipes_mcp
# optional: choose where recipes.json lives
python3 -m recipes_mcp --data-dir /home/you/recipes-data --keep-backups 5
# or install the `recipe-mcp-server` command
pip install .
recipe-mcp-serverConnect it to an MCP client (Claude Desktop, etc.)
Add a server entry pointing at the Python entry point, e.g. on Linux/macOS:
{
"mcpServers": {
"recipes": {
"command": "python3",
"args": ["-m", "recipes_mcp"],
"cwd": "/path/to/recipe-mcp-server"
}
}
}(If you installed with pip, use "command": "recipe-mcp-server", "args": [].)
Smoke-test it by hand (no client needed)
The server speaks newline-delimited JSON-RPC on stdin/stdout. Try:
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search_recipes","arguments":{"query":"curry"}}}' \
'{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"scale_recipe","arguments":{"recipe_id":"garlic-butter-pasta","target_servings":5}}}' \
| python3 -m recipes_mcpYou should see: an initialize result with serverInfo.name = "recipe-mcp-server", then the curry recipe match, then the pasta recipe
scaled 2 → 5 servings (x2.5: 20 oz spaghetti, 7 1/2 tablespoons butter, ...).
A pantry-aware shopping list example:
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"shopping_list","arguments":{"recipe_ids":["black-bean-tacos","weeknight-chickpea-curry"],"pantry":["olive oil","garlic","onion","curry powder"]}}}' \
| python3 -m recipes_mcpItems matching your pantry move to ALREADY HAVE; everything else is
BUY-grouped by produce / protein / dairy / spices / pantry / frozen.
Run the tests
python3 -m unittest discover -s tests38 offline tests cover amount parsing, fraction formatting, scaling math,
ingredient search + ranking, pantry matching (including "garlic powder" ≠
"garlic"), shopping-list grouping, persistence, backup rotation, corrupt-file
recovery, and the path-safety security cases (.. traversal, symlink escape,
wrong filename, root and non-directory data dirs).
Example agent flow
"What can I make tonight?" — agent calls
search_recipeswithingredients_on_hand: ["chickpeas", "coconut milk", "spinach"]."Cook it for 5 people" — agent calls
scale_recipewithtarget_servings: 5and every amount is rescaled."Make a list for both dinners" — agent calls
shopping_listwith both recipe ids, per-recipeservings, and your pantry items; items you have are separated from what to buy, grouped by store section.
Project layout
recipes_mcp/
__main__.py # CLI entry (argparse + stdio loop)
server.py # JSON-RPC 2.0 / MCP protocol + tool registry
service.py # add / get / search / scale / shopping-list logic
service_shopping.py # ingredient categorization (store sections)
quantities.py # amount parsing, scaling, fraction formatting
storage.py # JSON store, path safety, rotating backups
starter_recipes.py # the 5 included starter recipes
tests/test_recipes.py # 38 offline unit testsDesign notes for the curious
Pantry matching understands prep words (
diced,minced,canned) and deliberately refuses wrong-item matches:garlic powderdoes not count asgarlic,beef brothis notbeef.Amounts accept strings like
"1 1/2"and are scaled to friendly mixed fractions (2.5 × 2.5 = 6.25displays as6 1/4).Seasoning to taste (salt, pepper, oils, spices) doesn't always scale linearly, so
scale_recipeadds a small note when shrinking a recipe.
License & credit
MIT — see LICENSE. Copyright (c) 2026 Asdale Dynamics, LLC. Made by Asdale Dynamics, LLC as part of a suite of beginner-friendly, local-first tools. Learn more at dylanasdale.github.io.
Sibling projects to know about (this server deliberately does not do these jobs): a pantry-inventory MCP server tracks stock levels and spoilage; a meal-rotation planner webapp handles week-by-week meal scheduling.
This server cannot be deployed
Maintenance
Related MCP Connectors
Recipe search, ingredient matching, nutrition filters and a private cookbook for any AI agent.
Scraps Kitchen gives any AI agent a persistent, household-aware kitchen memory. Unlike generic chatbot recall, Scraps maintains structured cooking data: what's in your fridge (with freshness tracking), who you cook for (with allergens, dietary restrictions, and preferences), your recipe collection (with cook notes and per-diner ratings), your shopping list, and your kitchen equipment. 27 tools across 6 domains let agents read kitchen context, suggest meals that respect dietary safety, update the pantry after cooking, and build a history of what works for your household. Every interaction makes the data richer. Cooking history, preference signals, kitchen awareness = better suggestions next time. All tools work via oAuth and a free scraps.kitchen account.
Search, save, organize, cook, and share recipes with any AI assistant.
Search structured recipes, scale servings, match pantry ingredients, and build shopping lists.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Saffron recipe management functionality, including creating and updating recipes, importing from websites or text, and organizing cookbooks. Provides comprehensive recipe management capabilities through Saffron's API with support for ingredients, instructions, timing, and metadata.3 npmMIT
- AlicenseNot gradedqualityCmaintenanceHousehold-aware kitchen brain for AI agents: manage pantry inventory with freshness tracking, shopping lists, recipe collections with cook notes and per-diner ratings, dietary profiles with allergen safety, and kitchen equipment — all through 27 tools with OAuth 2.1 authentication. Includes a free tool for ingredient-based recipe generation without an account (accounts are free!).MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI assistants to search recipes, compose nutritionally balanced meals, optimize weekly meal plans based on macro targets for family members, and generate consolidated grocery lists from a personal recipe database.-
- AlicenseAqualityFmaintenanceEnables AI assistants to search New York Times Cooking recipes, fetch full recipes with ingredients and steps without login, and browse personal saved recipe box with optional authentication.461MIT