Openfoodfacts MCP Server logo

Openfoodfacts MCP Server

Search, inspect, compare, and filter 3M+ Open Food Facts products by barcode, tags, allergens, and nutrition.

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": "bunx",
      "args": [
        "@cyanheads/openfoodfacts-mcp-server@latest"
      ]
    }
  }
}

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

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

openfoodfacts-mcp-server connects MCP clients to Open Food Facts for barcode lookups, product searches, comparisons, and taxonomy resolution. Its four tools return ingredients, allergens, nutrition, product scores, canonical tags, and compact search results with barcodes. Use it when an agent needs crowd-sourced packaged-food data, especially for dietary filtering or side-by-side product analysis. It runs over STDIO or Streamable HTTP and requires no Open Food Facts API key.

Use cases

  • Look up ingredients and allergens from a barcode
  • Find products below specified nutrient thresholds
  • Exclude products containing selected allergens or traces
  • Compare nutrition and food scores across products
  • Resolve human dietary terms into search filter tags

Key features

  • Barcode product lookup with ingredients, allergens, nutrition, and scores
  • Text, tag, allergen, trace, and nutrient-filtered search
  • Side-by-side comparison for up to 10 processed products
  • Canonical Open Food Facts taxonomy resolution
  • STDIO and Streamable HTTP transports
  • No Open Food Facts API key required

Tools4

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

Self-reported~135 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 3d ago

Recent health check succeeded.

7/7 checks healthy over the last 47d

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@latest (npm)

Adoption & maintenance

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

GitHub stars1Stargazers on the source repository.
Last commit3d 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

Open Food Facts product data becomes available to MCP-compatible agents through four focused tools. The server covers more than 3 million crowd-sourced food products and supports both individual product inspection and structured searches.

off_get_product retrieves a product from a barcode. Its response can include ingredients, parsed ingredient structure, allergens, traces, additives, vegan or vegetarian analysis, palm-oil status, nutrition, category and packaging tags, country information, product scores, an image URL, and a completeness value.

off_search_products finds products by text, canonical tags, allergen or trace exclusions, and nutrient limits. Search results are summary rows containing barcodes and product metadata. off_compare_products compares barcode lists on nutrition and Open Food Facts scores, while off_browse_taxonomy maps everyday terms such as “shellfish” to canonical IDs usable by search filters.

How it works

The server queries Open Food Facts and normalizes nutrient keys into a consistent form. Nutrition values use per-100-gram measurements, or per-100-milliliter measurements for liquids; product responses can also include serving-based values and the serving denominator.

Search conditions are combined with AND logic. Text and nutrient searches use an index that may lag the live database and cover only the first 10,000 results. Tag-only searches use the live database through page 10. Search responses expose bounds and truncation details so an agent can distinguish a complete result set from a limited page.

Comparison requests accept two to 100 barcodes, but process at most 10 distinct products per call. Missing products and failed fetches are reported separately, allowing successful rows to remain usable. Open Food Facts’ own Nutri-Score, NOVA, and Green-Score values are returned without recalculation.

Setup and configuration

The package can be launched through npx for local MCP clients, and the project also provides installation links for Claude Desktop, Cursor, and VS Code. It supports STDIO and Streamable HTTP transports. A hosted endpoint is available at https://openfoodfacts.caseyjhand.com/mcp.

No Open Food Facts API key is required. The identifying User-Agent required by Open Food Facts terms is built into the server. Deployments can use the underlying MCP framework’s authentication modes—none, JWT, or OAuth—and its supported storage backends where those deployment options are needed.

Tools and capabilities

  • off_get_product: Fetch a barcode record, optionally limiting requested fields.
  • off_search_products: Apply text, category, brand, label, country, allergen, trace, additive, score, and nutrient filters. Results support pagination and return canonical product metadata.
  • off_compare_products: Compare nutrition, Nutri-Score, NOVA, Green-Score, completeness, and selected nutrients for up to 10 processed products.
  • off_browse_taxonomy: Search categories, labels, allergens, additives, countries, NOVA groups, or nutrition grades and return IDs for use in filters.

Requests use endpoint budgets and retry transient failures up to four attempts. Tool errors identify conditions such as upstream failures, timeouts, rejection, rate limiting, or invalid input. Contributor-entered fields remain absent when Open Food Facts has no recorded value; the server does not fill in missing nutrition data.

Limitations and notes

Barcode lookups require digit-only barcodes between 4 and 40 digits after leading-zero handling. Search text can contain up to 24 words, and searches support up to 18 nutrient filters. Tag, exclusion, and result limits are also bounded by the individual tool contracts.

Taxonomy lookup returns up to 100 tags per call and has no paging. The five open taxonomy facets use the live taxonomy when available and can fall back to a small offline sample. Search exclusions may include products with no allergen data, so exclusion results include coverage information. Scores and ingredient data reflect contributor-entered Open Food Facts records and may carry regional or completeness caveats.

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 the Open Food Facts database. Its main tools retrieve products by barcode, search food items by text, tags, allergens, or nutrients, compare products, and resolve human terms into canonical taxonomy IDs for filtering.

Install it for a local MCP client with the package’s npx command, or use the provided one-click installation links for Claude Desktop, Cursor, or VS Code. It also supports the hosted Streamable HTTP endpoint at https://openfoodfacts.caseyjhand.com/mcp.

No, it does not require an Open Food Facts API key. The identifying User-Agent required by Open Food Facts is built into the server.

You can search by text, canonical category, brand, label, allergen, trace, additive, country, nutrition grade, NOVA group, and nutrient thresholds. All supplied conditions are combined as AND filters, and taxonomy lookup helps convert human terms into canonical tag IDs.

Yes. The comparison tool accepts barcode lists and compares up to 10 distinct processed products on nutrition per 100 grams or 100 milliliters for liquids, Nutri-Score, NOVA, Green-Score, and completeness.

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>