- Python 3.8+ (pre-installed on most systems)
- USDA API key (free): https://fdc.nal.usda.gov/api-key-signup
-
Download or clone the repo
-
Create virtual environment and install: Navigate to the folder and run:
python3 -m venv nutrition-env
source nutrition-env/bin/activate
pip install -r requirements.txt- Test the server:
USDA_API_KEY=your_key_here python main.pyPress Ctrl+C to stop.
- Generate config automatically:
python generate_config.pyThis will output the exact configuration and file location for your system.
-
Add your API key to the generated config, replacing
YOUR_API_KEY_HERE -
Restart Claude Desktop
- "Search for tofu products"
- "Get nutrition for FDC ID 16213"
- "What are the macros for chicken breast?"
- Virtual environment: If
sourcecommand fails, trynutrition-env\Scripts\activateon Windows - API errors: Verify your USDA API key is correct
- Path errors: Use absolute paths from
generate_config.pyoutput - Python not found: Try
pythoninstead ofpython3on Windows
Want to create AI-powered meal plans? Here's how to set up a nutrition-focused Claude project:
- Open Claude Desktop
- Click "+" to create new project
- Name it "Meal Planner"
- Click the settings icon in your project
- Copy the system prompt from meal_planner_prompt.md
- Edit the USER INPUTS section:
- Change diet type (vegan, keto, etc.)
- Update calorie/protein targets
- Replace fixed meals with your breakfast/snacks and their macros
Start conversations with: "I want to plan lunch and dinner for this week. Let's brainstorm some ideas."
The AI will use the nutrition MCP server to calculate exact portions and create detailed meal plans with shopping lists.