yes_chef_mcp
Enables 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.
README
Yes Chef MCP
Self-hosted meal planning optimization server with macro-nutrient targeting. Exposes both a REST API (for web UIs) and an MCP server (for Claude Desktop) from a single process. It enables AI assistants (like Claude) to seamlessly integrate with your personal recipe database to search recipes, compose nutritionally balanced meals, optimize full-week plans based on member-specific macro targets, and generate consolidated grocery lists.
Key Features
- Hybrid Recipe Search: Combines Full-Text Search (FTS5) for keyword matching with semantic vector similarity (
sqlite-vec) using Reciprocal Rank Fusion (RRF). - Macro Optimization: Uses a tiered solving strategy (Mixed Integer Linear Programming via
python-mip, followed by greedy heuristics and continuous relaxation) to find the best recipe combinations to meet per-member macro goals. Always returns a result. - Interactive UI (MCP Apps): Provides embedded React-based UI components (like a macro target setter, recipe selector, and grocery checklist) that render directly within compatible MCP clients.
- Family Planning: Supports individual macro targets for different family members, calculating per-member serving sizes for shared meals.
- Smart Grocery Lists: Consolidates ingredients across meal plans, automatically merging similar items and excluding common pantry staples.
- Nutrition Enrichment: Auto-populate macro data from USDA FoodData Central or Nutritionix.
- Multi-source Import: Pull recipes from AnyList, Mealie, CSV, or enter manually.
Prerequisites
- Python: 3.12 or higher.
- Package Manager: uv is recommended for Python dependency management.
- Node.js & npm: Required for building the React-based interactive UI components.
- Database: SQLite is used as the primary data store, leveraging the
sqlite-vecextension for vector embeddings.
Quickstart
1. Install Python Dependencies
Navigate to the server directory and sync dependencies using uv:
cd backend
uv sync --all-extras
2. Build Frontend Views
The interactive MCP App components must be built before running the server:
cd frontend
npm install
npm run build
3. Run the Application
Start the unified FastAPI + FastMCP server:
cd backend
uv run python -m yes_chef_mcp.app
# OR
uv run uvicorn yes_chef_mcp.app:app --reload
By default, the server runs on http://127.0.0.1:8000.
- REST API:
http://127.0.0.1:8000/api/* - Static Views:
http://127.0.0.1:8000/views/static/* - MCP HTTP Endpoint:
http://127.0.0.1:8000/mcp
Claude Desktop Integration
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"yes-chef": {
"url": "http://localhost:8000/mcp"
}
}
}
Configuration
- Database path: defaults to
data/yes_chef_mcp.db, configurable viaYES_CHEF_DB_PATHenv var orconfigure_db_path()incore/db.py - Nutrition APIs (optional): USDA FoodData Central and Nutritionix keys are passed to
NutritionEnricherat construction time
Development
cd backend
# Install with dev dependencies
uv sync --all-extras
# Run tests
uv run pytest
# Lint & format
uv run ruff check .
uv run ruff format .
# Type check
uv run mypy yes_chef_mcp/
Architecture
backend/yes_chef_mcp/
├── app.py # Unified FastAPI + FastMCP entry point
├── api/ # REST API routes and HTML view controllers
│ └── routes.py # REST API endpoints
├── mcp/ # MCP server definition and tool wrappers (`server.py`)
│ └── server.py # MCP tool definitions
├── core/ # Core domain logic
│ ├── models.py # Domain models (dataclasses)
│ ├── schemas.py # API schemas (Pydantic)
│ ├── db.py # Async SQLite connection pooling (WAL mode)
│ ├── recipe_store.py # Recipe CRUD, FTS, and vector embeddings
│ ├── search.py # Hybrid and macro-distance search algorithms
│ ├── meal_composer.py # Ad-hoc meal composition and macro calculations
│ ├── planner.py # Meal plan CRUD and scheduling
│ ├── optimizer.py # MILP and greedy optimization engines
│ ├── constraint_relaxer.py # Logic for relaxing optimization constraints
│ └── grocery.py # Smart grocery list generation
├── pipeline/ # Data ingestion (Nutrition APIs, Mealie/AnyList imports)
│ ├── embeddings.py # Sentence-transformer embeddings
│ ├── nutrition.py # External nutrition APIs
│ └── providers/ # Recipe import plugins
└── tests/ # Comprehensive test suite for all core logic
frontend/ # React/Vite source for interactive UI components
├── src/
│ ├── components/ # Shared React components
│ ├── entries/ # Per-page entry points
│ ├── bridge.ts # API communication
│ ├── theme.ts # Design token exports
│ └── types.ts # Shared TypeScript types
└── dist/ # Vite build output (served by FastAPI)
Key Design Choices
- Pydantic at edges, dataclasses internally — validation where data enters the system, lightweight models everywhere else
- Tiered optimization — MILP solver with progressive constraint relaxation, falling back to heuristics. Always returns a result.
- Hybrid search — FTS5 keyword search + 384-dim vector similarity fused via Reciprocal Rank Fusion
- Single process — FastAPI and FastMCP share one ASGI app, one SQLite database in WAL mode
- Async-first — aiosqlite for non-blocking database access, httpx for external API calls
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。