Nutritionix MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MealAI - Nutritionix MCP Server
A Model Context Protocol (MCP) server that integrates with the Nutritionix API to provide nutrition tracking and meal logging capabilities for Claude.
šļø Architecture
Claude Desktop āā MCP Server āā Nutritionix API
ā
PostgreSQL DBš View Detailed Architecture š§ Component Breakdown
https://github.com/user-attachments/assets/88c0f23e-a811-4635-93cc-571402e95b94
Related MCP server: cronometer-api-mcp
Prerequisites
Node.js 18+
Docker & Docker Compose
Nutritionix API credentials
Quick Start
1. Get Nutritionix API Keys
Create an account at Nutritionix Developer Portal
Request Track API access to get your
APP_IDandAPP_KEY
2. Platform-Specific Setup
š„ļø Windows Setup:
# Clone and install
git clone https://github.com/your-username/MealAI.git
cd MealAI
npm install
# Configure environment
cp env.example .env
# Edit .env with your Nutritionix API credentials
# Quick setup (database + build)
npm run setup:windows
# Start the server (after configuring credentials)
.\start.ps1š macOS Setup:
# Clone and install
git clone https://github.com/your-username/MealAI.git
cd MealAI
npm install
# Configure environment
cp env.example .env
# Edit .env with your Nutritionix API credentials
# Quick setup (database + build)
npm run setup:mac
# Start the server (after configuring credentials)
./start.shš§ Linux Setup:
# Clone and install
git clone https://github.com/your-username/MealAI.git
cd MealAI
npm install
# Configure environment
cp env.example .env
# Edit .env with your Nutritionix API credentials
# Start database
docker compose up -d
# Build and start
npm run build
./start.shClaude Desktop Integration
Configuration File Locations:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows Configuration:
{
"mcpServers": {
"nutritionix-mcp": {
"command": "node",
"args": ["C:/Users/YOUR_USERNAME/MealAI/dist/index.js"],
"env": {
"DATABASE_URL": "postgresql://mealai_user:mealai_password@localhost:5432/mealai",
"NIX_APP_ID": "your_nutritionix_app_id",
"NIX_APP_KEY": "your_nutritionix_app_key"
}
}
}
}macOS Configuration:
{
"mcpServers": {
"nutritionix-mcp": {
"command": "node",
"args": ["/Users/YOUR_USERNAME/MealAI/dist/index.js"],
"env": {
"DATABASE_URL": "postgresql://mealai_user:mealai_password@localhost:5432/mealai",
"NIX_APP_ID": "your_nutritionix_app_id",
"NIX_APP_KEY": "your_nutritionix_app_key"
}
}
}
}Setup Steps:
Replace
YOUR_USERNAMEwith your actual usernameUse absolute paths (required by Claude Desktop)
Restart Claude Desktop after configuration changes
Look for the š§ icon in Claude to confirm MCP server is connected
Available Tools
search_food
Autocomplete search for foods (common + branded)
Input: { query: "chicken breast" }
Output: List of matching foods with nix_item_id for branded itemsfood_nutrients
Get detailed nutrition information
# For branded foods:
Input: { nix_item_id: "513fceb475b8dbbc21000fd3", qty: 1 }
# For natural language:
Input: { text: "2 eggs and 1 slice sourdough toast", qty: 1 }
Output: Detailed macronutrient breakdownlog_meal
Log a meal to the database
Input: {
user_id: "uuid",
eaten_at: "2024-01-15T12:30:00Z",
food_name: "Chicken Breast",
macros: { kcal: 250, protein_g: 46, carbs_g: 0, fat_g: 3.6 }
}analyze_day
Analyze daily nutrition totals vs goals
Input: { user_id: "uuid", day_iso: "2024-01-15" }
Output: Daily totals, progress %, recommendationsUsage Examples
Search and log a meal:
Claude: "Search for 'grilled salmon' and log 6oz for lunch today"
ā search_food ā food_nutrients ā log_meal ā analyze_dayNatural language meal logging:
Claude: "I had 2 scrambled eggs with cheese and a slice of toast for breakfast"
ā food_nutrients(text="2 scrambled eggs with cheese and slice of toast") ā log_mealDaily nutrition analysis:
Claude: "Show me my nutrition totals for today and how I'm tracking against my goals"
ā analyze_day ā detailed breakdown with recommendationsDatabase Schema
users: Basic user information
profiles: Nutrition goals and preferences
meals: Logged meals with cached nutrition data
Development
# Development with hot reload
npm run dev
# Watch mode
npm run watch
# Build for production
npm run buildTroubleshooting
Claude doesn't see the server:
Verify absolute paths in config
Check environment variables
Restart Claude Desktop
Check Claude logs for errors
Database connection fails:
Ensure PostgreSQL is running
Verify DATABASE_URL format
Check database credentials
Nutritionix API errors:
Verify API credentials are correct
Check rate limits (free tier: 200 requests/day)
Ensure internet connectivity
API Documentation
License
MIT License - see LICENSE file for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Log meals and read your nutrition diary from Claude or ChatGPT.
Track calories and macros right in Claude or ChatGPT and build a personal nutrition diary
Calorie tracker app for ChatGPT and Claude: read meals, macros, weight and log meals from chat.
Calorie, workout and body-weight log inside ChatGPT and Claude. Log meals by text, photo or voice.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI agents to search foods, get nutritional breakdowns, and estimate exercise calories using the Nutritionix API through natural language input.3MIT
- AlicenseAqualityBmaintenanceEnables nutrition tracking with Cronometer, including food logging, food search, diary management, and nutrition data retrieval via natural language.13MIT
- AlicenseAqualityBmaintenanceConnect MyFitnessPal to Claude or any MCP client. Log meals, search food database with macros, track trends, and export nutrition history against your real MyFitnessPal diary.18284 PyPI34MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to analyze the nutrition of ingredients or recipe lines and to search recipe and food databases with optional diet, health, and cuisine filters.304 npmMIT