# Requirements: Mealie MCP Server Enhancements
*Generated from conversation on 2025-12-12*
## Objective
Enhance the Mealie MCP server with additional recipe management capabilities: notes, images, servings, and improved guidance for structured ingredient usage.
## Core Requirements
### Must Have (High Priority)
- [HIGH] **Recipe Notes** - Add ability to create/edit notes on recipes inline with create_recipe and update_recipe tools. Notes are an array of `{title, text}` objects.
- [HIGH] **Recipe Images** - New tool to add images to recipes. MCP fetches image from URL locally (bypasses IP blocks that affect Mealie server) and uploads to Mealie. Also accepts base64 data as fallback for user-provided images.
- [HIGH] **Recipe Servings** - Add `recipeServings` (number) and `recipeYield` (text like "Makes 12 cookies") to create_recipe and update_recipe tools.
- [HIGH] **Structured Ingredients Guidance** - Update tool descriptions to emphasize using structured ingredients (`{quantity, unit, food, note}`) as the preferred approach over plain text strings.
### Should Have (Medium Priority)
- [MEDIUM] Clear error messages when image fetching fails
- [MEDIUM] Support common image formats (JPEG, PNG, WebP)
### Could Have (Low Priority / Inferred)
- [LOW] Image validation before upload (size, format checks)
## Technical Constraints
- **Framework/Stack:** TypeScript, MCP SDK, existing MealieClient
- **API Endpoints Used:**
- `PUT /api/recipes/{slug}/image` - Upload image to recipe
- Recipe update endpoint already supports notes, servings fields
- **Architecture:** MCP runs locally (not blocked by recipe sites), Mealie server is remote (blocked by some sites)
- **Image Handling:** MCP fetches images locally to bypass IP blocks, then uploads to Mealie
## User Context
**Target Users:** Claude Desktop users managing recipes via MCP
**Primary Use Case:** Creating and editing recipes with full metadata including images, notes, and servings
**User Flow:**
1. User shares recipe URL or image with Claude Desktop
2. Claude extracts recipe info and image URL
3. MCP creates recipe with structured ingredients, notes, servings
4. MCP fetches image locally and uploads to Mealie
## Edge Cases & Considerations
- Image URL may be inaccessible (404, auth required) - should handle gracefully
- Base64 images may be large - consider size limits
- Notes array may be empty or have multiple entries
## Implicit Requirements
*Inferred from conversation context - please verify:*
- [API] RecipeNote schema requires both `title` and `text` fields (both required per OpenAPI spec)
- [API] recipeServings is a number, recipeYield is a string
- [UX] Tool descriptions should nudge AI toward structured ingredients without breaking plain text fallback
## Success Criteria
How we know this is complete and working:
- ✓ Can create/update recipes with notes array
- ✓ Can add images to recipes via URL (MCP fetches locally)
- ✓ Can add images via base64 data
- ✓ Can set servings (number) and yield (text) on recipes
- ✓ Tool descriptions clearly prefer structured ingredients over plain text
## Next Steps
1. Review this PRD for accuracy and completeness
2. If anything is missing or unclear, continue the conversation
3. When ready, use `/clavix:plan` to generate implementation tasks
---
*This PRD was generated by Clavix from conversational requirements gathering.*