Skip to main content

MCP server for Mealie recipe manager - search, create, and manage recipes, shopping lists, and meal plans via the Model Context Protocol.

Project description

MseeP.ai Security Assessment Badge

Mealie MCP Server

A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with your Mealie recipe database through clients like Claude Desktop.

โœจ Features

๐Ÿฝ๏ธ Recipe Management

  • CRUD Operations: Create, read, update, patch, duplicate, and delete recipes
  • Advanced Search: Filter by text, categories, tags, and tools with AND/OR logic
  • Image Management: Upload images or scrape from URLs
  • Asset Uploads: Attach documents and files to recipes
  • Metadata Tracking: Mark recipes as made, track last made dates

๐Ÿ›’ Shopping Lists

  • List Management: Create, update, and delete shopping lists
  • Item Operations: Add, update, check off, and remove items
  • Bulk Operations: Create, update, or delete multiple items at once
  • Recipe Integration: Automatically add recipe ingredients to shopping lists

๐Ÿท๏ธ Organization

  • Categories: Organize recipes with categories (Breakfast, Dinner, etc.)
  • Tags: Tag recipes for easy filtering (Quick, Healthy, Family Favorite)
  • Advanced Filtering: Search and filter with full pagination support
  • Empty Detection: Find unused categories and tags

๐Ÿ“… Meal Planning

  • Meal Plans: View and manage meal plans
  • Bulk Creation: Add multiple meals at once
  • Today's Menu: Quick access to today's planned meals

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.12+
  • Running Mealie instance with API key
  • Package manager uv

Installation

Option 1: Using fastmcp (Recommended)

Install the server directly with the fastmcp command:

fastmcp install src/server.py \
  --env-var MEALIE_BASE_URL=https://your-mealie-instance.com \
  --env-var MEALIE_API_KEY=your-mealie-api-key

Option 2: Using uvx

Run directly from GitHub without cloning:

{
  "mcpServers": {
    "mealie-mcp-server": {
      "command": "uvx",
      "args": ["mealie-mcp-server"],
      "env": {
        "MEALIE_BASE_URL": "https://your-mealie-instance.com",
        "MEALIE_API_KEY": "your-mealie-api-key"
      }
    }
  }
}

Restart Claude Desktop to load the server.

๐Ÿ“– Usage Examples

Recipe Operations

"Search for chicken recipes"
"Create a new recipe for pasta carbonara"
"Duplicate my lasagna recipe"
"Mark the meatloaf recipe as made today"
"Upload an image for the chocolate cake recipe"

Shopping Lists

"Create a shopping list for this week"
"Add eggs and milk to my shopping list"
"Add all ingredients from the lasagna recipe to my shopping list"
"Check off milk on my shopping list"
"Delete all checked items from my shopping list"

Organization

"Show me all my recipe categories"
"Create a new tag called 'Quick Meals'"
"Find all recipes tagged with 'healthy'"
"Show me categories that have no recipes"

Advanced Filtering

"Find recipes that have both 'quick' AND 'healthy' tags"
"Search for breakfast recipes containing 'eggs'"
"Show me all vegetarian dinner recipes"

๐ŸŽฏ Available Tools

Recipe Tools (13 operations)

  • get_recipes - List/search recipes with advanced filtering
  • get_recipe_detailed - Get complete recipe details
  • get_recipe_concise - Get recipe summary
  • create_recipe - Create new recipe
  • update_recipe - Update recipe (full replacement)
  • patch_recipe - Update specific fields only
  • duplicate_recipe - Clone a recipe
  • mark_recipe_last_made - Update last made timestamp
  • set_recipe_image_from_url - Set image from URL
  • upload_recipe_image_file - Upload image file
  • upload_recipe_asset_file - Upload document/asset
  • delete_recipe - Delete recipe

Shopping List Tools (14 operations)

  • get_shopping_lists - List all shopping lists
  • create_shopping_list - Create new list
  • get_shopping_list - Get list by ID
  • delete_shopping_list - Delete list
  • add_recipe_to_shopping_list - Add recipe ingredients
  • remove_recipe_from_shopping_list - Remove recipe ingredients
  • get_shopping_list_items - List all items
  • get_shopping_list_item - Get item by ID
  • create_shopping_list_item - Create single item
  • create_shopping_list_items_bulk - Create multiple items
  • update_shopping_list_item - Update item (preserves fields)
  • update_shopping_list_items_bulk - Update multiple items
  • delete_shopping_list_item - Delete single item
  • delete_shopping_list_items_bulk - Delete multiple items

Category Tools (7 operations)

  • get_categories - List/search categories
  • get_empty_categories - Find unused categories
  • create_category - Create new category
  • get_category - Get by ID
  • get_category_by_slug - Get by slug
  • update_category - Update category
  • delete_category - Delete category

Tag Tools (7 operations)

  • get_tags - List/search tags
  • get_empty_tags - Find unused tags
  • create_tag - Create new tag
  • get_tag - Get by ID
  • get_tag_by_slug - Get by slug
  • update_tag - Update tag
  • delete_tag - Delete tag

Meal Plan Tools (4 operations)

  • get_all_mealplans - List meal plans
  • create_mealplan - Create meal plan entry
  • create_mealplan_bulk - Create multiple entries
  • get_todays_mealplan - Get today's meals

Total: 45 tools providing comprehensive Mealie API coverage

๐Ÿ”ง Development

Setup

  1. Clone the repository:
git clone <repository-url>
cd mealie-mcp-server
  1. Install dependencies:
uv sync
  1. Configure environment:
cp .env.template .env
# Edit .env with your Mealie instance details
  1. Run MCP inspector for testing:
uv run mcp dev src/server.py

Project Structure

mealie-mcp-server/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ mealie/              # API client mixins
โ”‚   โ”‚   โ”œโ”€โ”€ client.py        # Base HTTP client
โ”‚   โ”‚   โ”œโ”€โ”€ recipe.py        # Recipe operations
โ”‚   โ”‚   โ”œโ”€โ”€ shopping_list.py # Shopping list operations
โ”‚   โ”‚   โ”œโ”€โ”€ categories.py    # Category operations
โ”‚   โ”‚   โ”œโ”€โ”€ tags.py          # Tag operations
โ”‚   โ”‚   โ”œโ”€โ”€ mealplan.py      # Meal plan operations
โ”‚   โ”‚   โ””โ”€โ”€ __init__.py      # MealieFetcher aggregator
โ”‚   โ”œโ”€โ”€ tools/               # MCP tool definitions
โ”‚   โ”‚   โ”œโ”€โ”€ recipe_tools.py
โ”‚   โ”‚   โ”œโ”€โ”€ shopping_list_tools.py
โ”‚   โ”‚   โ”œโ”€โ”€ categories_tools.py
โ”‚   โ”‚   โ”œโ”€โ”€ tags_tools.py
โ”‚   โ”‚   โ”œโ”€โ”€ mealplan_tools.py
โ”‚   โ”‚   โ””โ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ models/              # Pydantic models
โ”‚   โ”œโ”€โ”€ server.py            # MCP server entry point
โ”‚   โ””โ”€โ”€ prompts.py           # Server prompts
โ”œโ”€โ”€ CHANGELOG.md             # Version history
โ””โ”€โ”€ README.md

๐Ÿ“š Important Notes

Filtering by Tags/Categories

When filtering recipes, you must use slugs or UUIDs, not display names:

โœ… Correct:

"Get recipes with tags=['quick-meals', 'healthy']"

โŒ Incorrect:

"Get recipes with tags=['Quick Meals', 'Healthy']"

Use get_tags() or get_categories() first to find the correct slugs.

Field Preservation

When updating shopping list items, the server automatically preserves all existing fields. You only need to specify the fields you want to change:

# Only updates 'checked' field, preserves note, quantity, etc.
update_shopping_list_item(item_id="...", checked=True)

๐Ÿ› Known Issues

None currently! All features have been tested end-to-end with Claude Desktop.

๐Ÿ”„ Changelog

See CHANGELOG.md for a detailed list of changes and version history.

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Credits

๐Ÿ“ž Support

For issues and questions:

  • Check the CHANGELOG.md for recent updates
  • Review the Mealie API documentation
  • Open an issue on GitHub

๐Ÿ”— Related Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mealie_mcp_server-0.1.0.tar.gz (81.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mealie_mcp_server-0.1.0-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file mealie_mcp_server-0.1.0.tar.gz.

File metadata

  • Download URL: mealie_mcp_server-0.1.0.tar.gz
  • Upload date:
  • Size: 81.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for mealie_mcp_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cd5a2edcee155bb7bc42ccb20b53e11e537782e30b9fb7e9db4e2ff8c738e1f1
MD5 8317bce00c2e1d56b1dd20f55037ac71
BLAKE2b-256 2b92e5d0755edc9446498eb7acdadca60d8cda34f0db88c0c043a356adb5212e

See more details on using hashes here.

File details

Details for the file mealie_mcp_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mealie_mcp_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36023531e821305a5921cbb6e2343e8fa2dcc7ace0bc044c0e95ee836ade49cd
MD5 7e81dc6c942c68968328fbd844e9e65b
BLAKE2b-256 e3fbd8b24023ee97fdb742519973f62bf4de4b328c1e94939b9fb2cfbf1aa4c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page