openfoodfacts-mcp-server
by AiAgentKarl
README.md
# openfoodfacts-mcp-server
MCP Server for Open Food Facts — the world's largest open-source food product database with 3M+ products from 200+ countries. No API key required.
[](https://badge.fury.io/py/openfoodfacts-mcp-server)
[](https://opensource.org/licenses/MIT)
## Features
- **Barcode Lookup** — Get full product info by EAN barcode
- **Product Search** — Search 3M+ products by name, ingredient, or brand
- **Nutrition Facts** — Detailed nutritional data + Nutri-Score (A–E)
- **Allergen Check** — All 14 EU major allergens + traces
- **Eco-Score** — Environmental impact, CO₂ footprint, packaging info
- **Find Alternatives** — Find healthier or more eco-friendly products
- **Additives / E-Numbers** — List all additives in a product
- **Labels & Certifications** — Organic, Vegan, Fairtrade, Halal, Kosher, Gluten-Free
## Installation
```bash
pip install openfoodfacts-mcp-server
```
## Usage
### Claude Desktop
Add to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"openfoodfacts": {
"command": "openfoodfacts-mcp-server"
}
}
}
```
### Direct Run
```bash
openfoodfacts-mcp-server
```
## Tools
| Tool | Description |
|------|-------------|
| `lookup_product_by_barcode` | Full product info by EAN barcode |
| `search_food` | Search products by name, ingredient, or brand |
| `get_nutrition_facts` | Nutrition data + Nutri-Score explanation |
| `check_allergens` | All 14 EU allergens + traces |
| `get_eco_score` | Eco-Score + CO₂ + packaging info |
| `find_alternatives` | Better products by Nutri-Score or Eco-Score |
| `get_product_additives` | E-numbers / additives list |
| `get_product_labels` | Organic, Vegan, Fairtrade, Halal, Kosher, etc. |
## Example Queries
```
"What are the allergens in product 3017620422003?"
"Find vegan pasta products with a good Nutri-Score"
"What is the eco-score of this chocolate bar?"
"Find healthier alternatives to this snack"
"List all E-numbers in product 5449000214911"
```
## Data Source
All data comes from [Open Food Facts](https://world.openfoodfacts.org) — a free, open-source, collaborative food database. No API key required. Data is available under the Open Database License (ODbL).
## License
MIT © AiAgentKarl
TDQS
A4/5.0
Scored across 8 tools
Disambiguation5/5
Each tool targets a distinct aspect of food product data: allergens, alternatives, eco-score, nutrition, additives, labels, barcode lookup, and text search. No functional overlap.
Naming Consistency5/5
All tool names follow a consistent verb_noun pattern in English (check_allergens, find_alternatives, get_eco_score, etc.), providing clear predictability.
Tool Count5/5
8 tools is well-scoped for an Open Food Facts server, covering search, lookup, and various product attributes without being excessive or sparse.
Completeness4/5
Covers major product information needs (nutrition, eco, allergens, labels, alternatives, search, barcode lookup). Minor gaps like missing product comparison or user contributions are acceptable.
Maintenance
ActivityInactive
ResponsivenessNo issues