mealplan-mcp
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., "@mealplan-mcp Create a dinner meal plan for next week and generate the grocery list."
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.
Mealplan MCP
A Model Context Provider (MCP) server for meal planning and grocery list generation.
Quick Start
# Clone the repository
git clone <repository-url>
cd mealplan-mcp
# Set up environment variable for meal plan storage
export MEALPLANPATH="/path/to/meal/plans"
# Install dependencies with uv
uv venv && source .venv/bin/activate
uv pip install -e .
# Run the server
python main.pyRelated MCP server: Unofficial AnyList MCP Server
Features
Store and retrieve dish recipes with ingredients and instructions
Create detailed meal plans for specific dates and meal types
Manage ignored ingredients that should be excluded from grocery lists
Generate grocery lists for date ranges with automatic checkboxes
Full MCP (Model Context Provider) compatibility for AI-driven interfaces
Available Tools
Tool | Description | Example Input |
| Creates a meal plan |
|
| Stores a dish recipe |
|
| Lists all stored dishes |
|
| Lists meal plans within a date range |
|
| Exports meal plans to a PDF file |
|
| Adds ingredient to ignore list |
|
| Gets all ignored ingredients |
|
| Creates a grocery list markdown |
|
Claude Desktop Setup
To use this MCP server with Claude Desktop, add the following configuration to your claude_desktop_config.json file:
macOS
# Edit the config file
open ~/Library/Application\ Support/Claude/claude_desktop_config.jsonWindows
# Navigate to the config file location
%APPDATA%\Claude\claude_desktop_config.jsonConfiguration
Add this server configuration to your claude_desktop_config.json:
{
"mcpServers": {
"mealplan": {
"command": "uv",
"args": [
"--directory",
"/path/to/your/mealplan-mcp",
"run",
"main.py"
],
"env": {
"MEALPLANPATH": "/path/to/your/meal/plans"
}
}
}
}Important:
Replace
/path/to/your/mealplan-mcp/main.pywith the actual path to yourmain.pyfileReplace
/path/to/your/meal/planswith your desired meal plan storage directoryRestart Claude Desktop after making changes
Development Setup
Prerequisites
Python 3.12 or higher
uv (recommended for dependency management)
Installation
Clone the repository:
git clone <repository-url> cd mealplan-mcpSet up the environment variable for meal plan storage:
# macOS/Linux export MEALPLANPATH="/path/to/meal/plans" # Windows Command Prompt set MEALPLANPATH=C:\path\to\meal\plans # Windows PowerShell $env:MEALPLANPATH = "C:\path\to\meal\plans"Set up the virtual environment:
# Using uv (recommended) uv venv source .venv/bin/activate # On macOS/Linux # .venv\Scripts\activate # On Windows # Alternative: Using venv (built-in) python -m venv .venv source .venv/bin/activate # On macOS/Linux # .venv\Scripts\activate # On WindowsInstall dependencies:
# For basic usage (recommended) uv pip install -e . # For development (includes testing tools) uv pip install -e ".[dev]" # Alternative: Using pip pip install -e . # Basic usage pip install -e ".[dev]" # Development
Running the Application
To start the MCP server:
python main.pyThis starts the server using stdio transport, making it compatible with MCP client applications.
Testing
The project includes comprehensive testing with automatic test isolation:
# Run all tests
pytest
# Run with coverage
pytest --cov=mealplan_mcp
# Generate a coverage report
pytest --cov=mealplan_mcp --cov-report=html
# Run specific test categories
pytest tests/mealplan/ # Meal plan tests
pytest tests/dish/ # Dish service tests
pytest tests/renderers/ # Renderer testsMCP Examples
Using the MCP CLI Tool
The MCP CLI tool allows you to interact with your server directly from the command line:
# In a separate terminal, run your server
python main.py
# In another terminal, start the MCP CLI
mcp dev main.pyProject Structure
mealplan-mcp/
├── main.py # Entry point and MCP server definition
├── mealplan_mcp/ # Main application package
│ ├── models/ # Pydantic data models
│ │ ├── dish.py # Dish model with ingredients and instructions
│ │ ├── ingredient.py # Ingredient model with validation
│ │ ├── ignored.py # Ignored ingredients model
│ │ ├── meal_plan.py # Meal plan model with date validation
│ │ ├── meal_type.py # Meal type enumerations
│ │ └── nutrient.py # Nutrient information model
│ ├── renderers/ # Markdown rendering modules
│ │ ├── grocery.py # Grocery list markdown renderer
│ │ └── mealplan.py # Meal plan markdown renderer
│ ├── services/ # Business logic services
│ │ ├── dish/ # Dish-related services (store, list)
│ │ ├── grocery/ # Grocery list generation services
│ │ ├── ignored/ # Ignored ingredients services
│ │ └── mealplan/ # Meal plan storage services
│ └── utils/ # Utility functions
│ ├── paths.py # Path handling with test isolation
│ └── slugify.py # String slugification utilities
├── tests/ # Comprehensive test suite (113 tests)
└── docs/ # DocumentationContributing
Fork the repository
Create a feature branch:
git checkout -b feature-nameCommit your changes:
git commit -am 'Add some feature'Push to the branch:
git push origin feature-nameSubmit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Available Tools
8 toolsadd_ignored_ingredientB
Add an ingredient to the ignored ingredients list.
Args:
ingredient: The name of the ingredient to ignore
Returns:
A dictionary with a confirmation message
Inputs: ingredient (required).
create_mealplanB
Create a meal plan entry with the specified parameters and save it to a file.
Args:
meal_plan: A meal plan object containing:
- date: The date for the meal plan
- meal_type: The type of meal (breakfast, lunch, dinner, snack)
- title: The title of the meal
- cook: The person who will cook the meal
- dishes: List of dishes to be prepared
Returns:
str: A summary of the meal plan and the path where it was saved
Inputs: meal_plan (required).
export_mealplans_to_pdfA
Export meal plans within a specified date range to a PDF file.
Args:
date_range: Dictionary containing start and end dates in format YYYY-MM-DD
- start: Start date (required)
- end: End date (required)
Returns:
JSON string containing either:
- Success: {"ok": "path/to/generated.pdf"}
- Error: {"error": "error_type", "message": "error_description"}
Inputs: date_range (required).
generate_grocery_listB
Generate a grocery list for a specified date range.
Args:
date_range: Dictionary containing start and end dates in format YYYY-MM-DD
- start: Start date (required)
- end: End date (required)
Returns:
Dictionary with the path to the generated grocery list
Inputs: date_range (required).
get_ignored_ingredientsA
Get the list of ignored ingredients.
Returns:
A sorted list of ingredient names to be ignored in grocery lists
Inputs: no named parameters.
list_dishesC
List all dishes.
Returns:
List of dish objects converted to dictionaries
Inputs: no named parameters.
list_mealplans_by_date_rangeA
List meal plans within a specified date range.
Args:
date_range: Dictionary containing start and end dates in format YYYY-MM-DD
- start: Start date (required)
- end: End date (required)
Returns:
JSON string containing array of meal plan objects with:
- title: Meal title (cleaned)
- date: Date in YYYY-MM-DD format
- meal_type: Type of meal (breakfast, lunch, dinner, snack)
- cook: Person cooking the meal
- dishes: Array of dish names
Inputs: date_range (required).
store_dishC
Store a dish and return a confirmation.
Args:
dish_data: Dictionary containing dish data
Returns:
Dictionary with a confirmation message including the path where the dish was stored
Inputs: dish_data (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct action and resource: adding/listing ignored ingredients, storing/listing dishes, creating/listing meal plans, generating grocery lists, and exporting PDFs. No two tools have overlapping purposes.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., add_ignored_ingredient, list_dishes, generate_grocery_list). There are no style mix-ups or ambiguous verbs.
Eight tools is well-scoped for a meal planning server. The set covers the main operations without being too sparse or bloated, making it easy for agents to navigate.
The tool set lacks update and delete operations for all resources (dishes, meal plans, grocery lists, ignored ingredients), and there is no way to retrieve a single dish or meal plan by ID. These gaps significantly limit the agent's ability to manage meal data fully.
Maintenance
Related MCP Connectors
MCP server for generating rough-draft project plans from natural-language prompts.
Unlock the power of food transparency with our Open Food Facts MCP server. Easily look up any food
AI-powered recipe platform: 18 MCP tools for meal planning, grocery lists & Instacart.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that enables AI-powered recipe generation and transformation using natural language, supporting dietary restrictions, allergies, and nutritional goals.213 npmMIT
- AlicenseNot gradedqualityAmaintenanceMCP server that integrates with AnyList for managing shopping lists, recipes, and meal planning via natural language.35ISC
- AlicenseNot gradedqualityDmaintenanceAn MCP server for managing recipes, meal plans, shopping lists, and more through a self-hosted Mealie instance.1MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for MealMastery AI meal planning that enables users to manage meal plans, recipes, and grocery lists through natural language conversation with AI agents like Claude.57 npmMIT