# Open Food Facts MCP

> Open Food Facts MCP connects your AI agent to the world's largest open food product database, letting you analyze nutritional labels instantly. Scan barcodes or search by name to get full macronutrient breakdowns, allergen warnings (gluten, nuts, dairy), and expert grading systems like Nutri-Score and NOVA classification for packaged goods from over 150 countries.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Tags:** nutritional-data, barcode-scanning, allergen-detection, food-labeling

## Description

This MCP lets your AI client connect directly to a massive food product database. You don't need to know nutrition labels—your agent handles it. By simply scanning an item’s barcode or searching for a brand, you pull back comprehensive data: everything from calorie counts and macronutrient profiles to ingredient lists. Beyond the basics, the MCP provides structured scores like Nutri-Score (an A-to-E quality grade) and NOVA classification, which tells you how processed the food is. This capability means your agent can tell a client if an item qualifies as 'ultra-processed' or if it contains specific allergens like soy or nuts. Because this data comes from open source, community-driven sources, it’s ideal for health apps, dietary planning tools, and any workflow hosted on Vinkius that needs reliable consumer food information.

## Tools

### scan_food_barcode
Scan a food product barcode and immediately retrieve its complete nutrient profile, full ingredient list, and allergen warnings.

### search_food_products
Search the entire global database for packaged foods by name or brand to compare nutritional information and scores across multiple products.

## Prompt Examples

**Prompt:** 
```
Scan barcode 3017620422003
```

**Response:** 
```
That's Nutella! Here's what I found: Nutri-Score E, NOVA Group 4 (ultra-processed). Per 100g: 539 kcal, 31g fat, 57g carbs, 6g protein. Contains hazelnuts, milk, and soy. Ingredients: sugar, palm oil, hazelnuts (13%), cocoa, skimmed milk powder, whey powder, lecithin, vanillin.
```

**Prompt:** 
```
Search for vegan protein bars with a Nutri-Score of A.
```

**Response:** 
```
I found several options! For instance, 'Misfits Vegan Protein Bar' often scores well. Another high-ranking product is 'Trek High Protein Flapjack' which features a good Nutri-Score due to its balance of fiber and plant protein.
```

**Prompt:** 
```
What is the NOVA group for a standard can of Coca-Cola?
```

**Response:** 
```
A standard can of Coca-Cola is classified under NOVA Group 4, which means it is an ultra-processed food product. It also holds a Nutri-Score of E due to its high sugar content.
```

## Capabilities

### Determine Nutritional Content
Retrieve the full breakdown of calories, fat, carbohydrates, and protein for a specific product.

### Identify Allergens
Check if a food item contains common allergens like gluten, dairy, or tree nuts.

### Assess Processing Level
Use the NOVA classification to determine if a product is minimally processed or ultra-processed.

### Grade Nutritional Quality
Get the Nutri-Score (A through E) which quickly ranks a product's overall nutritional quality.

### Search Product Databases
Look up packaged goods across millions of entries by name, brand, or category.

## Use Cases

### Client has a severe nut allergy.
A user asks their agent to check if a new granola bar is safe. The agent uses `scan_food_barcode` on the UPC and immediately confirms that the product contains hazelnut oil, flagging it as unsafe for immediate consumption.

### Need to compare three competing cereals.
A user needs a comparison report. They use `search_food_products`, inputting the brand names of three cereals. The agent returns all three products' nutritional data and their respective Nutri-Score grades, allowing for an instant side-by-side analysis.

### Investigating a food additive.
A journalist wants to know the processing level of a popular snack. They use `scan_food_barcode`, which returns the NOVA classification, proving that the item falls into Group 4 (ultra-processed).

### Building a diabetes meal planner.
A dietitian wants to check if several potential lunch items are low in sugar. They use `search_food_products` and filter by key macronutrient data, allowing the agent to compile a list of suitable options based on reliable numbers.

## Benefits

- Know the risks instantly: Use `scan_food_barcode` to see clear allergen warnings for gluten, dairy, and nuts, so you never have to guess what ingredients contain.
- Understand processing levels: Get the NOVA classification immediately. You can tell your user if a product is barely processed or if it's loaded with industrial additives.
- Compare products across brands: Running `search_food_products` lets you quickly compare several different items on the shelf to see which one has the best overall score.
- Quickly assess quality grades: The Nutri-Score grade provides a single, easy metric (A-E) for your agent to report back to users in plain language.
- Validate claims automatically: Instead of relying on printed packaging text, your AI client gets raw, structured data directly from the source.

## How It Works

The bottom line is: your agent transforms a label scan or simple text search into clean, actionable nutritional data points.

1. Tell your AI client to find information on a food product, either by providing an EAN/UPC barcode number or by giving it a descriptive search query.
2. The MCP uses the request to access its vast database and pulls structured data points—nutrients, allergen flags, and scores—for that specific item or category of items.
3. Your AI client receives organized JSON output detailing everything from the ingredient list to the Nutri-Score grade, ready for you to display or analyze.

## Frequently Asked Questions

**How does Open Food Facts MCP handle allergen detection?**
It identifies common allergens like gluten, dairy, and nuts using the `scan_food_barcode` tool. The data is flagged directly in the nutrient profile for quick review.

**Can I use Open Food Facts MCP to find fresh produce nutrition?**
No, this MCP focuses solely on packaged food items. You must have a product barcode or brand name to analyze its nutritional data.

**What is the difference between using `scan_food_barcode` and `search_food_products`?**
`scan_food_barcode` works on one specific UPC code for maximum detail. `search_food_products` lets you compare multiple items or brands across a category.

**Does this MCP provide enough data to determine if food is healthy?**
It provides the objective metrics needed, like Nutri-Score and NOVA classification. These scores help your agent guide users on quality, but interpretation requires expert context.

**Is Open Food Facts MCP reliable for dietary planning?**
Yes, it connects to a massive, open source database used by health apps globally, providing structured macronutrients and allergen data necessary for accurate planning.