/openfoodfacts-mcp-server:openfoodfacts-guidefrom openfoodfacts-mcp-server
Judgment for the off_* tools (Open Food Facts) — allergy checks that never overclaim, choosing among a product's many barcodes, where tag IDs come from, grade ranges, free-from searches, and the search budget. Use when answering allergy, diet, ingredient, additive, Nutri-Score, NOVA, or product-comparison questions about packaged foods with off_get_product, off_search_products, off_compare_products, or off_browse_taxonomy.
Ships in openfoodfacts-mcp-server. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Packaged, barcoded foods as Open Food Facts contributors recorded them: label text, declared allergens and traces, additives, Open Food Facts' computed grades and nutrient levels, and nutrition per 100 g (per 100 ml for liquids) and per serving. It is not a verdict on whether a food is safe for a particular person, and it holds no recalls. Reference composition for generic, unbranded foods belongs to a food-composition database such as USDA FoodData Central.
| Identifier | Where it comes from |
|---|---|
| Barcode | The user (a scan or the pack), or the rows of off_search_products. One product has many barcodes — sizes, regional editions, reformulations — and each is a separate record with its own completeness and grades. |
Tag ID (en:organic, en:nuts) | off_browse_taxonomy, or the tag arrays on a product record. The same ID can mean different things in different facets: the category en:nuts holds peanut products, while the allergen en:nuts means tree nuts. |
| Category tags | A record carries its category's ancestors too (a pistachio row lists en:snacks, en:salty-snacks, en:nuts, en:pistachios), so a broad category filter also matches products filed under its subcategories. |
Ingredient tags (en:oat, en:inulin) | off_browse_taxonomy with facet ingredients and a search term; it has no reference list, so a call without a term returns nothing. IDs are singular: oat finds en:oat, oats finds nothing. A product record lists them as ingredients[].id. off_search_products filters on them with ingredients_tag (an array requires all of its values, and a parent matches its descendants: en:vegetable matches carrot). That filter reads the lagging text index, with or without query; for a vegan or palm-oil verdict use ingredients_analysis_tag instead. |
| Off-taxonomy entries | A product's tag arrays can hold contributor entries the taxonomy never canonicalized: a non-en: prefix or display text with capitals, spaces, or accents (fr:Goûter, en:Pâtes à tartiner). Don't reuse one as a filter value; resolve the concept with off_browse_taxonomy first. |
ingredients_text (in the label's own language, often with allergens emphasized in capitals or brackets), allergens_tags, and traces_tags. An empty traces_tags means no trace data was entered, not that the label carries no warning. When the three disagree, say the record is unreliable: a record can carry a truncated ingredients text beside allergen tags that text cannot support. End by pointing the user to the physical label.en:nuts means tree nuts; peanuts are the separate en:peanuts. Check both on the record, and pass both to exclude_allergens or exclude_traces.en:no-gluten, en:vegan) or a free-from category (en:gluten-free-pasta). Add the exclusion on top, then confirm shortlisted barcodes with off_get_product. For vegan, the ingredients-analysis verdict en:vegan is Open Food Facts' computation from the parsed ingredients, while the label en:vegan is a claim printed on the pack. They are different evidence, so say which one you used.["a", "b"]. Green-Score a excludes a-plus, so A or better is ["a-plus", "a"]. A product with no grade drops out. A tag-only Green-Score search matches the grade Open Food Facts files for France, while each row shows the world grade, so a row's letter can differ from the one it matched.completeness, data_quality_tags, and ingredient list. nutrient_levels (fat, saturated fat, sugars, salt as low, moderate, or high) is its verdict against fixed thresholds, halved for beverages, and basis says which figures it judged. On prepared it judged the prepared figures, so it can disagree with the as-sold figures nutriments fills from the stored set; say which basis you quote.data.retryAfter gives the wait in seconds, as does retryAfter on each off_compare_products failed entry a budget or rate limit refused. Product lookups draw on a separate budget of about 15 a minute. off_compare_products spends one lookup from it per barcode, and off_get_product one, but a barcode whose read returned only prepared figures takes a second lookup for its stored as-sold set, so a compare can spend up to twice the barcodes. The limiter refuses rather than waits: a 10-barcode compare reads at most 5 stored sets from a fresh minute, and the rest come back unread with reason rate_limited. A barcode served from the local mirror (source off_mirror) spends neither lookup, and the stored set comes from the same record.Allergy or diet check on one product. Call off_get_product, with fields narrowed to the ingredients, allergen, trace, and analysis fields when nutrition doesn't matter. Apply gates 1 and 2. If the user named a product rather than a barcode, apply gate 5 first.
Find products matching a diet and a nutrition target. Resolve each human term (category, label, allergen, country) with off_browse_taxonomy. Express the diet as a positive claim (gate 3), the grade as one array (gate 4), and the nutrition target as nutrient_filters. Nutrient filters move the search to the lagging text index, and each row then carries the index values the filters were checked against; a grade filter on that path matches the grades the index holds, which each row shows and which can differ from the current record. The index compares energy-kcal, fat, saturated-fat, carbohydrates, and sugars as whole numbers, so the server checks every returned row against the constraints and leaves out rows that fail, counting them in outside_constraints. A page can come back short or empty while later pages hold matches, and total and last_page describe the index's whole-number answer, not the products that meet the constraints. A range inside one whole number (sugars above 3.9 and below 4) can pass few rows, so add a query or tag filters. Confirm the shortlist with off_get_product before presenting it.
Compare products. off_compare_products returns nutrition and grades only: no ingredients, allergens, or additives. Open Food Facts returns one preparation state of the nutrition per read: figures for the prepared product arrive in a row's prepared object. A row whose read returned only prepared figures gets one more read of the as-sold set its record stores, after every barcode's product read has settled, and stored_as_sold says how it went: read fills the as-sold columns from that one set, none means the record stores no usable set, and unread (with a reason) means it could not be read, so as-sold figures absent beside prepared then mean the read failed, not that the record holds none. Don't compare an as-sold figure with a prepared one. Stored sets pass through as filed: a powder whose as-sold energy is below its prepared energy has its sets swapped on the record (3664346306027 files 148 kcal as sold and 355 prepared), so the figures are served as stored. For additives or allergens, follow up per barcode with off_get_product, narrowing fields to additives_tags, allergens_tags, and ingredients_text. Mind the shared product budget when the list is long (gate 7). Don't count additives by array length: additives_tags can list a parent and a specific form of the same additive (en:e322 lecithins and en:e322i soya lecithin on one record). off_browse_taxonomy with facet additives and the E-number gives the additive's name.
Reading where a result came from. Product, compare, and search results carry source. off_api is Open Food Facts itself. off_mirror is this server's local copy of the export, current as of mirror_as_of (the mirror_snapshot note says so), so a product contributed or edited since is missing or shown as it was; say as of when you report it. An off_get_product answer carrying mirror_fields_unread lacks the fields it names because they were not read, so never report them as absent from the record. A tag-only search the mirror serves has an exact total and reaches its first 10,000 results, while one read live stops at page 10; either fails as page_out_of_range past its bound, so narrow the filters rather than paging. Under the default order, popularity_key, and unique_scans_n, the mirror sorts by the values stored with each record, while a live search ranks by its current scan counts, so the orders can differ; do not treat the two as the same ranking. A tag-only search is served by the mirror only when every tag value is confirmed (IDs from off_browse_taxonomy, or a brand slug), so an unrecognized value falls back to the live backend. A search carrying ecoscore_grade also reads live until the mirror has completed a reload that indexes Green-Score, so it stops at page 10 until then.
A tag-only search fails with upstream_error. Searches by tag filters alone and searches carrying a query read separate backends, so one can fail while the other answers. Add a query word the product's name or category would carry (pasta with categories_tag en:pastas) to reroute the same filters to the text index. This doesn't work with additives_tag, and the text index lags the live database, so say so when you report results that came through it.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
openfoodfacts-mcp-server@cyanheads is listed by cyanheads/cyanheads — review the source before installing
npx claudepluginhub cyanheads/cyanheads --plugin openfoodfacts-mcp-server