home / mcp / opennutrition mcp server
MCP server providing access to the comprehensive OpenNutrition food database with 300,000+ food items, nutritional data, and barcode lookups
Configuration
View docs{
"mcpServers": {
"deadletterq-mcp-opennutrition": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/mcp-opennutrition/build/index.js"
]
}
}
}You run a local MCP server that exposes a large OpenNutrition food database, giving you fast, private access to 300,000+ food items, nutrition data, and barcode lookups. You can search by name, browse foods, get detailed nutrition by ID, and perform barcode lookups, all without external API calls. This makes it ideal for privacy-conscious apps and research workflows.
You connect to the OpenNutrition MCP server using your MCP client. Start the local server, then use the client to issue queries like searching for foods by name, listing available foods, retrieving detailed nutrition data by food ID, or looking up items by barcode. All processing happens on your machine, so responses are fast and data stays private. Typical usage patterns include: searching for a specific food item and inspecting its full nutrition profile, paging through the catalog to discover items, and resolving barcodes to match products to nutritional data.
Prerequisites you need on your machine: Node.js installed (the same version used to build the project). Ensure you have npm available to install dependencies.
1. Install dependencies
npm install2. Build the project
npm run build3. Configure the MCP server to run locally
"mcp-opennutrition": {
"command": "/Users/YOUR.USERNAME/.nvm/versions/node/v20.19.0/bin/node",
"args": [
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/mcp-opennutrition/build/index.js"
]
}The server uses the OpenNutrition dataset, providing comprehensive nutritional profiles including macronutrients, vitamins, and minerals.
Start the server locally with the command and arguments shown above. No external API calls are made once the server is running, which preserves privacy and improves response times.
Find foods by name, brand, or partial matches to quickly locate items in the OpenNutrition catalog.
Retrieve paginated lists of all available foods to explore the database contents.
Fetch detailed nutritional information for a specific food item using its unique ID.
Resolve EAN-13 barcodes to corresponding foods in the dataset for quick barcode-based searches.