cyanheads avatar

Openfoodfacts Mcp Server

cyanheads/openfoodfacts-mcp-server

Connects Claude to the Open Food Facts crowd-sourced database of 3 million packaged food products. Exposes four tools: barcode lookup for full nutrition labels and ingredient parsing, filtered search across categories and nutrition grades, side-by-side product comparisons, and taxonomy browsing to find valid filter tags. Built on the framework author's own mcp-ts-core with embedded rate limiting and retry logic to stay within OFF's API constraints. The comparison tool is the standout feature here, letting you line up nutritional data for up to 10 products at once without managing individual requests. Reach for this when you need structured food data for meal planning, dietary analysis, or ingredient research. No API key required, runs over stdio or streamable HTTP, and includes a public hosted endpoint if you don't want to run it locally.

GitHub stars
2
tools
4
transport
STDIO, HTTP
env vars
10
last updated
Nov 8, 2026

Install

From registry metadata
$ npx add-mcp https://openfoodfacts.caseyjhand.com/mcp --name openfoodfacts

Run in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

$ claude mcp add --transport http openfoodfacts https://openfoodfacts.caseyjhand.com/mcp

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 4 tools

Verified live against the running server on Nov 6, 2026.

off_get_productFetch a packaged food product by barcode (4–40 digits: EAN-13, EAN-8, UPC, and the shorter and longer codes Open Food Facts also holds) from Open Food Facts. Returns the product name, brand, quantity, ingredients (raw text and parsed list), declared allergens, trace allergens...2 params

Fetch a packaged food product by barcode (4–40 digits: EAN-13, EAN-8, UPC, and the shorter and longer codes Open Food Facts also holds) from Open Food Facts. Returns the product name, brand, quantity, ingredients (raw text and parsed list), declared allergens, trace allergens...

Parameters* required
barcode*string
Product barcode, digits only: 4–40 digits after any leading zeros. The primary key for Open Food Facts — the barcode of an off_search_products row works as is. Example: "3017620422003" (Nutella FR).
fieldsarray
Subset of fields to return. Omitting returns all standard fields. Use to reduce payload when only scores or ingredients are needed. A field that cannot be read on its own arrives with what it depen...
off_search_productsSearch Open Food Facts by full-text query, structured tag filters, or both at once. 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...17 params

Search Open Food Facts by full-text query, structured tag filters, or both at once. 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...

Parameters* required
additives_tagstring
Canonical additive (E-number) tag ID. Example: "en:e322", "en:e330". Use off_browse_taxonomy with facet="additives". Available only on searches carrying neither query nor nutrient_filters — both ro...
allergens_tagstring
Canonical allergen tag ID. Example: "en:milk", "en:gluten". Use off_browse_taxonomy with facet="allergens". Selects products that declare this allergen; it cannot select allergen-free products, bec...
brands_tagstring
Brand slug (lowercased, hyphenated). Example: "nutella", "kelloggs". A brand name is slugged the way Open Food Facts slugs it ("Ben & Jerry's" → "ben-jerry-s") and then matched exactly — a partial...
categories_tagstring
Canonical category tag ID. Example: "en:breakfast-cereals", "en:cheeses". Use off_browse_taxonomy with facet="categories" to discover valid values.
countries_tagstring
Canonical country tag ID. Example: "en:france", "en:united-states". Filters to products sold in that country.
exclude_allergensarray
Allergen tag IDs a product must not declare, all applied. Example: ["en:nuts", "en:peanuts"]. Each value must be an allergen tag Open Food Facts recognizes — resolve it with off_browse_taxonomy fac...
exclude_tracesarray
Allergen tag IDs a product's label must not warn it may contain as traces, all applied. Example: ["en:nuts"]. Values are validated like exclude_allergens. A product with no trace data entered passe...
ingredients_analysis_tagstring
Vegan, vegetarian, or palm-oil verdict Open Food Facts computes from the parsed ingredients. Example: "en:vegan", "en:palm-oil-free". "en:maybe-vegan" and "en:may-contain-palm-oil" mean the ingredi...one of en:palm-oil · en:palm-oil-free · en:may-contain-palm-oil · en:palm-oil-content-unknown · en:vegan · en:maybe-vegan
labels_tagvalue
Canonical label/certification tag ID, or an array of up to 10 that must all apply. Example: "en:organic", or ["en:organic", "en:fair-trade"] for products carrying both. Use off_browse_taxonomy with...
nova_groupstring
Filter by NOVA food processing class. "1"=unprocessed/minimally processed, "4"=ultra-processed. Products without a NOVA score are excluded.one of 1 · 2 · 3 · 4
nutrient_filtersarray
Numeric constraints on nutrient values per 100 g, or per 100 ml for liquids, combined as AND with each other and with every other filter. Pair two entries on the same nutrient to express a range (e...
nutrition_gradestring
Filter by Nutri-Score grade. "a" is highest nutritional quality, "e" is lowest. Products without a score are excluded.one of a · b · c · d · e
pageinteger
Page number (1-based). Use with page_size to paginate results. Pages are counted at the page_size served, which is at most 50, so repeating one larger page_size pages contiguously (page 2 at page_s...default: 1
page_sizenumber
Results per page (default 20). One call returns at most 50: a larger value is served at 50, reported in page_size and page_size_capped, and page then counts pages of 50. Keep low for initial explor...default: 20
querystring
Words to find. Every word must match the product name, generic name, categories, labels, or brand — ingredients and quantity are not searched — so put only words the product itself would carry. Pun...
sort_bystring
Sort order, applied on every search. Each value orders newest or highest first: "unique_scans_n" surfaces the most-scanned products, "last_modified_t" and "created_t" the most recently updated and...one of last_modified_t · unique_scans_n · created_t · popularity_key
traces_tagstring
Canonical allergen tag ID the label warns the product may contain as a trace ("may contain nuts"). Example: "en:nuts". Trace tags are allergen tags, so off_browse_taxonomy with facet="allergens" re...
off_compare_productsSide-by-side nutrition and scoring comparison for 2–10 products per call by barcode; a repeated barcode is compared once, so two identical barcodes yield one row, and barcodes past the 10th distinct one are listed in unprocessed rather than fetched. Returns a normalized table...1 params

Side-by-side nutrition and scoring comparison for 2–10 products per call by barcode; a repeated barcode is compared once, so two identical barcodes yield one row, and barcodes past the 10th distinct one are listed in unprocessed rather than fetched. Returns a normalized table...

Parameters* required
barcodes*array
Barcodes to compare, returned as one row each in input order; a repeated barcode is compared once, so two identical barcodes yield one row. One call compares at most 10 distinct barcodes: up to 100...
off_browse_taxonomyResolve a human term to the canonical Open Food Facts tag ID that off_search_products filters on. Covers categories, labels/certifications, allergens, additives, countries, NOVA groups, and Nutri-Score grades. Pass a search term to resolve against the Open Food Facts vocabular...3 params

Resolve a human term to the canonical Open Food Facts tag ID that off_search_products filters on. Covers categories, labels/certifications, allergens, additives, countries, NOVA groups, and Nutri-Score grades. Pass a search term to resolve against the Open Food Facts vocabular...

Parameters* required
facet*string
"categories" covers food categories (en:cheeses, en:breakfast-cereals). "labels" covers certifications (en:organic, en:fair-trade). "allergens" covers declared allergens (en:milk, en:gluten). "addi...one of categories · labels · allergens · additives · countries · nova_groups
limitnumber
Maximum entries to return (default 20). One call returns at most 200: a larger value returns the first 200 and, when more matched, says how many did. There is no offset or page input: Open Food Fac...default: 20
searchstring
Term to resolve. Matched case-insensitively as a substring of the tag ID, the display name, or a common synonym of either ("shellfish" resolves to en:crustaceans, "gluten free" to en:no-gluten). A...

Sponsors

Configuration

OFF_BASE_URLdefault: https://world.openfoodfacts.org

Open Food Facts API base URL override. Useful for testing against a mock server.

OFF_RATE_LIMIT_PRODUCTdefault: 15

Product read rate limit (requests/min). Matches the 15 req/min/IP Open Food Facts documents for product reads.

OFF_RATE_LIMIT_SEARCHdefault: 10

Search rate limit (requests/min).

OFF_RATE_LIMIT_TAXONOMYdefault: 10

Taxonomy resolution rate limit (requests/min). Applies to the live tag-vocabulary lookups off_browse_taxonomy makes, to tag-value resolution on text searches, and to checking allergen and trace exclusions on every search; a spent budget falls back to the offline sample, or to the

MCP_LOG_LEVELdefault: info

Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').

MCP_TRANSPORT_TYPEdefault: http

Selects the HTTP transport.

MCP_HTTP_HOSTdefault: 127.0.0.1

The hostname for the HTTP server.

MCP_HTTP_PORTdefault: 3010

The port to run the HTTP server on.

MCP_HTTP_ENDPOINT_PATHdefault: /mcp

The endpoint path for the MCP server.

MCP_AUTH_MODEdefault: none

Authentication mode to use: 'none', 'jwt', or 'oauth'.

Readme

@cyanheads/openfoodfacts-mcp-server

Look up food products by barcode, search by keyword, tag, allergen, or nutrition filter, compare products side-by-side, and browse the canonical tag vocabulary via MCP. STDIO or Streamable HTTP.

4 Tools

Details

Repository
github.com/cyanheads/openfoodfacts-mcp-server
Category
Search & Web Crawling
Package
@cyanheads/openfoodfacts-mcp-server
Transport
STDIO, HTTP
Registry
MCP registry, active
Resources
1
Tools verified
Nov 6, 2026

More from cyanheads

Related Search & Web Crawling MCP servers

View all
1cyanheads avatarReliefweb Mcp Servercyanheads/reliefweb-mcp-serverSearch ReliefWeb humanitarian reports, disasters, jobs, training, and country profiles via MCP.2stars
2cyanheads avatarSmithsonian Mcp Servercyanheads/smithsonian-mcp-serverSearch 14.5M Smithsonian Open Access objects, get CC0 images, find cross-collection connections.2stars
3cyberpapiii avatarImessage Maxcyberpapiii/imessage-maxAI-optimized MCP server for iMessage on macOS. Read, search, and send messages.2stars
4davooxbv2 avatarClishopdavooxbv2/clishopOrder anything from your terminal — search, buy, track, and manage via MCP tools.2stars
5cotletdev avatarQuora MCP Server and API by Cotletcotletdev/quora-api-mcp-serverQuora questions and answers community MCP server: search questions, post answer, list my answers.0stars
6geiserx avatarLynxPromptgeiserx/lynxprompt-mcpSearch, read and manage AI agent instruction blueprints (AGENTS.md, CLAUDE.md) on LynxPrompt2stars