Openfoodfacts MCP Server logo

Openfoodfacts MCP Server

Search, inspect, and compare crowd-sourced food products from Open Food Facts using barcode, tag, allergen, and nutrition queries.

Install Openfoodfacts MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "openfoodfacts-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@cyanheads/openfoodfacts-mcp-server"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

openfoodfacts-mcp-server connects MCP clients to Open Food Facts for barcode lookups, product searches, taxonomy resolution, and nutrition comparisons. Its four tools cover detailed product retrieval, filtered search, side-by-side comparison, and conversion of human terms into canonical filter tags. Use it when an agent needs packaged-food data, ingredient or allergen context, or nutrition-based product selection. It supports STDIO and Streamable HTTP, including a publicly hosted endpoint.

Use cases

  • Look up packaged foods by barcode
  • Find products below specified nutrient thresholds
  • Exclude declared allergens or traces from product searches
  • Compare nutrition and scores across product barcodes
  • Resolve food labels into Open Food Facts filter tags

Key features

  • Barcode product retrieval with ingredient and allergen details
  • Full-text, tag, allergen, and nutrient-filtered search
  • Side-by-side comparison for up to 10 distinct products
  • Canonical Open Food Facts taxonomy lookup
  • STDIO and Streamable HTTP support
  • Open Food Facts score and nutrition data

Tools4

What Openfoodfacts MCP Server lets your agent do. Expand a tool for its parameters.

Verified live~4.3k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

12/12 checks healthy over the last 64d

What it can do

From the 4 tools this server returned when we ran it; 4 declare their own safety hints.

Makes network requests · 4Read-only tools · 4
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age152 days
Maintainers1

Observed 2026-10-30 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 3d ago via OSV.dev · @cyanheads/openfoodfacts-mcp-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2Stargazers on the source repository.
npm downloads2.5kPackage downloads in the last 30 days.
Last commit1d agoMost recent push to the default branch.
Tools exposed4Callable tools this server registers over MCP.

How Openfoodfacts MCP Server works

What openfoodfacts-mcp-server does

openfoodfacts-mcp-server exposes Open Food Facts data through four MCP tools. The service covers more than 3 million crowd-sourced packaged-food records and supports workflows that begin with a barcode, a natural-language product search, or a structured nutrition and tag filter.

A product lookup can return names, brands, quantities, raw and parsed ingredients, declared allergens, trace warnings, additives, vegan and vegetarian analysis, palm-oil analysis, nutrition values, product scores, categories, labels, packaging, origins, sale countries, images, and a completeness value. Search results are intentionally compact: they provide enough information to identify candidates, after which a barcode lookup can retrieve fuller label data.

How it works

off_search_products combines a text query with structured filters using AND logic. Filters can cover categories, brands, labels, allergens, traces, ingredient analysis, additives, countries, Nutri-Score, NOVA groups, allergen exclusions, and nutrient thresholds. Nutrient thresholds are evaluated per 100 g, or per 100 ml for liquids. At least one search parameter is required.

Use off_browse_taxonomy before filtering when a human term needs to become an Open Food Facts tag ID. This is important for values such as en:organic, en:no-gluten, NOVA digits, and Nutri-Score letters. The returned identifier should be passed to the search tool unchanged.

off_compare_products accepts product barcodes and returns normalized nutrition values alongside Nutri-Score, NOVA, and Green-Score. It preserves missing values rather than filling them in. A batch can include successful, missing, and failed lookups separately.

The server can run over STDIO or Streamable HTTP. A public hosted endpoint is available at https://openfoodfacts.casey jhand.com/mcp.

Setup and configuration

The package can be launched through npm with the @cyanheads/openfoodfacts-mcp-server package and npx, making it suitable for MCP client configurations that start local STDIO servers. The repository also provides installation links for Claude Desktop, Cursor, and VS Code, plus a Docker container package. The server is also available through the hosted Streamable HTTP endpoint.

No environment variables are required by the documented client installation paths.

Tools and capabilities

  • off_get_product: Retrieve detailed product, ingredient, allergen, nutrition, score, tag, image, and completeness data by a 4–40 digit barcode.
  • off_search_products: Find products with text, canonical tags, allergen exclusions, or nutrient constraints and return barcode-bearing summary rows.
  • off_compare_products: Compare up to 10 distinct products using nutrition per 100 g or per 100 ml, plus Nutri-Score, NOVA, and Green-Score.
  • off_browse_taxonomy: Resolve terms across categories, labels, allergens, additives, countries, NOVA groups, and Nutri-Score grades.

Limitations and notes

Open Food Facts is crowd-sourced. An empty field generally means contributors have not entered that information; it is not proof that the product lacks the attribute. Allergen exclusions can therefore allow products with no allergen data, so candidates should be checked with off_get_product before relying on the result.

Searches using text or nutrient filters read an index that can lag the live database, while tag-only searches use the live database. Text-index searches also have result and pagination limits. Search results are summaries rather than complete labels, and nutrient values used by the search index can differ from a later product read.

Nutri-Score, NOVA, and Green-Score are indicators with regional formula considerations, not absolute rankings. Product and comparison data is provided under the Open Database License 1.0, so downstream uses should cite Open Food Facts.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Openfoodfacts MCP Server

openfoodfacts-mcp-server is an MCP server that connects AI clients to Open Food Facts. Its main tools retrieve products by barcode, search by text and structured filters, compare nutrition and scores across products, and resolve human terms into canonical taxonomy tags for filtering.

Install it through an MCP client using the npm package `@cyanheads/openfoodfacts-mcp-server` and `npx`, or use the documented installation links for Claude Desktop, Cursor, and VS Code. A Docker container package and a public Streamable HTTP endpoint are also available.

Yes, openfoodfacts-mcp-server has a Cursor installation link. Cursor can launch the package as an MCP server using the provided npm and `npx` configuration.

Yes, it can search using allergen and trace filters, exclude declared allergens or traces, and return allergen details for a barcode lookup. Because Open Food Facts is crowd-sourced, a missing allergen field should be verified rather than treated as proof that the product is allergen-free.

Pass product barcodes to `off_compare_products` to compare up to 10 distinct products. The result includes normalized energy, fat, saturated fat, sugars, salt, protein, and fiber values, along with Nutri-Score, NOVA, and Green-Score.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewOpenfoodfacts MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/openfoodfacts-mcp-server?style=directory)](https://allmcps.com/mcp/openfoodfacts-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/openfoodfacts-mcp-server"><img src="https://allmcps.com/api/badge/openfoodfacts-mcp-server?style=directory" alt="Openfoodfacts MCP Server on AllMCPs" /></a>