i-am-neon/nutrition-mcp-server-python
If you are the rightful owner of nutrition-mcp-server-python and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Nutrition MCP Server is a tool designed to facilitate nutritional data retrieval and meal planning using the USDA API.
Nutrition MCP Server Setup
Prerequisites
- Python 3.8+ (pre-installed on most systems)
- USDA API key (free): https://fdc.nal.usda.gov/api-key-signup
Installation
-
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.py
Press Ctrl+C to stop.
Claude Desktop Configuration
- Generate config automatically:
python generate_config.py
This 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
Usage
- "Search for tofu products"
- "Get nutrition for FDC ID 16213"
- "What are the macros for chicken breast?"
Troubleshooting
- Virtual environment: If
source
command fails, trynutrition-env\Scripts\activate
on Windows - API errors: Verify your USDA API key is correct
- Path errors: Use absolute paths from
generate_config.py
output - Python not found: Try
python
instead ofpython3
on Windows
Meal Planning Project Setup
Want to create AI-powered meal plans? Here's how to set up a nutrition-focused Claude project:
1. Create New Project
- Open Claude Desktop
- Click "+" to create new project
- Name it "Meal Planner"
2. Add System Prompt
- Click the settings icon in your project
- Copy the system prompt from
- 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
3. Usage
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.