# openfoodfacts-mcp-server

openfoodfacts-mcp-server reads ingredients, allergens, additives and nutrition grades off a packaged food barcode, searches the catalogue by tag, and lines products up side by side.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · 3148 installs · ★ 2 repo stars
- Author: cyanheads
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/cyanheads/openfoodfacts-mcp-server
- Updated: 2026-10-17
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/openfoodfacts-mcp-server

## What it does

Four tools wrap the Open Food Facts catalogue of crowd-sourced packaged food. `off_get_product` takes a barcode and returns ingredient text with a parsed tree, allergen and trace tags, additives, Nutri-Score, NOVA and Green-Score grades, plus nutrients per serving and per 100 g (per 100 ml for liquids).

\`off_search_products` runs keyword and tag queries — category, brand, label, allergen, country, nutrient thresholds — joined with AND. `off_compare_products` puts up to 10 distinct barcodes in one table and leaves gaps empty instead of filling them. `off_browse_taxonomy` turns a plain word into the tag ID the filters expect. Transport is STDIO or Streamable HTTP, and an `openfoodfacts-guide` skill sits at `skill://openfoodfacts-guide/SKILL.md` with guidance on calling the tools.

Keyword and nutrient-filter searches read a text index that trails the live database and stops at the first 10,000 hits. A page holds 50 rows; `page_size` starts at 20 and is served at 50 max. Pairing `additives_tag` with a text `query` fails as `additives_filter_needs_tag_search`, since additive filtering only works through tag search.

## Requirements
- Remote server: `https://openfoodfacts-mcp-server--cyanheads.run.tools`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http openfoodfacts-mcp-server https://openfoodfacts-mcp-server--cyanheads.run.tools
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add openfoodfacts-mcp-server --url https://openfoodfacts-mcp-server--cyanheads.run.tools
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "openfoodfacts-mcp-server": {
            "url": "https://openfoodfacts-mcp-server--cyanheads.run.tools"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "openfoodfacts-mcp-server": {
            "type": "http",
            "url": "https://openfoodfacts-mcp-server--cyanheads.run.tools"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http openfoodfacts-mcp-server https://openfoodfacts-mcp-server--cyanheads.run.tools
```

## When to use it
- read a product's ingredients and allergens from its barcode
- shortlist items in one category under a sugar threshold with no milk traces
- compare store brands on Nutri-Score and NOVA
- resolve a plain word into a tag ID for filtering
- see which additives a product lists

## Example prompts
- Look up the barcode on this label and list the allergens and additives.
- Search the breakfast cereals category for Nutri-Score A products without milk.
- Compare the barcodes from that search on sugar and salt.

## Similar
- [WebDiet](https://affpapa.org/en/nevibecode/mcp/webdiet.md) — MCP server · 621 installs
- [Nutrition MCP](https://affpapa.org/en/nevibecode/mcp/nutrition-mcp.md) — MCP server · ★ 99 repo stars
- [Food-Recipe-MCP](https://affpapa.org/en/nevibecode/mcp/food-recipe-mcp.md) — MCP server · 2189 installs
- [pp-allrecipes](https://affpapa.org/en/nevibecode/skills/pp-allrecipes.md) — skill · 194 installs
- [heyyumi](https://affpapa.org/en/nevibecode/skills/heyyumi.md) — skill · 5700 installs
- [pp-recipe-goat](https://affpapa.org/en/nevibecode/skills/pp-recipe-goat.md) — skill · 3300 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
