# openfoodfacts-mcp-server MCP server

Barcode lookup, nutrition search, and product comparison for 3M+ crowd-sourced food products.

## Links
- Registry page: https://www.getdrio.com/mcp/io-github-cyanheads-openfoodfacts-mcp-server
- Repository: https://github.com/cyanheads/openfoodfacts-mcp-server

## Install
- Command: `npx -y @cyanheads/openfoodfacts-mcp-server`
- Endpoint: https://openfoodfacts.caseyjhand.com/mcp
- Auth: Not captured

## Setup notes
- Package: Npm @cyanheads/openfoodfacts-mcp-server v0.1.1
- Environment variable: OFF_BASE_URL (default https://world.openfoodfacts.org)
- Environment variable: OFF_RATE_LIMIT_PRODUCT (default 100)
- Environment variable: OFF_RATE_LIMIT_SEARCH (default 10)
- Environment variable: MCP_LOG_LEVEL (default info)
- Package: Npm @cyanheads/openfoodfacts-mcp-server v0.1.1
- Environment variable: OFF_BASE_URL (default https://world.openfoodfacts.org)
- Environment variable: OFF_RATE_LIMIT_PRODUCT (default 100)
- Environment variable: OFF_RATE_LIMIT_SEARCH (default 10)
- Environment variable: MCP_HTTP_HOST (default 127.0.0.1)
- Environment variable: MCP_HTTP_PORT (default 3010)
- Environment variable: MCP_HTTP_ENDPOINT_PATH (default /mcp)
- Environment variable: MCP_AUTH_MODE (default none)
- Environment variable: MCP_LOG_LEVEL (default info)
- Remote endpoint: https://openfoodfacts.caseyjhand.com/mcp

## Tools
- off_get_product (Get Food Product by Barcode) - Fetch a packaged food product by barcode (EAN-13 or UPC) from Open Food Facts. Returns the product name, brand, quantity, ingredients (raw text and parsed list), allergens, additives, computed scores (Nutri-Score a–e, NOVA 1–4, Green-Score), nutrition per 100g and per serving, categories, labels, packaging, origins, image URL, and data completeness. Open Food Facts is a crowd-sourced database — a missing field means "not yet entered by contributors," not that the attribute is absent from the actual product. Computed scores carry regional formula caveats and are indicators, not absolute rankings. Data is under ODbL 1.0 — cite Open Food Facts in downstream use. Endpoint: https://openfoodfacts.caseyjhand.com/mcp
- off_search_products (Search Food Products) - Search Open Food Facts by text query or structured tag filters. Returns a summary list with barcodes, product names, brands, Nutri-Score, NOVA group, and categories — enough for triage and selection, not full label data. Use off_get_product on the returned barcodes for complete details. Text query and tag filters are mutually exclusive routing paths: when query is provided, a text search is performed and tag filters are ignored; when only tag filters are provided (no query), structured facet filtering is applied. Tag filter values must be canonical tag IDs (e.g. "en:organic", "en:gluten-free") — use off_browse_taxonomy to resolve human terms to tag IDs. At least one search parameter is required. Data is crowd-sourced; result count reflects contributed products, not all products in the market. Data under ODbL 1.0 — cite Open Food Facts in downstream use. Endpoint: https://openfoodfacts.caseyjhand.com/mcp
- off_compare_products (Compare Food Products Side-by-Side) - Side-by-side nutrition and scoring comparison for 2–10 products by barcode. Fetches all products in parallel and returns a normalized table of energy (kcal/100g), fat, saturated fat, sugars, salt, protein, fiber, Nutri-Score, NOVA group, and Green-Score. Designed for "which of these cereals is healthiest?" or "compare these pasta brands" workflows. Missing nutrition data for any product is preserved as absent — comparisons are not imputed. Scores carry regional formula caveats. Data under ODbL 1.0 — cite Open Food Facts in downstream use. Endpoint: https://openfoodfacts.caseyjhand.com/mcp
- off_browse_taxonomy (Browse Food Facts Taxonomy) - Browse and search the canonical tag vocabulary for Open Food Facts filter facets. Returns tag IDs and display names for use as filter values in off_search_products. Covers categories, labels/certifications, allergens, additives, countries, NOVA groups, and Nutri-Score grades. The taxonomy is embedded — not fetched live — because the OFF taxonomy API is unavailable to anonymous bot clients. Tag IDs use the "en:" prefix convention (e.g. "en:organic", "en:gluten-free", "en:milk"). Always use these tag IDs as filter values, not plain English terms. Endpoint: https://openfoodfacts.caseyjhand.com/mcp

## Resources
Not captured

## Prompts
Not captured

## Metadata
- Owner: io.github.cyanheads
- Version: 0.1.1
- Runtime: Npm
- Transports: STDIO, HTTP
- License: Not captured
- Language: Not captured
- Stars: Not captured
- Updated: May 31, 2026
- Source: https://registry.modelcontextprotocol.io
