Open Food Facts MCP
A read-only MCP server for looking up and comparing Open Food Facts product, search, and taxonomy data.
Look up a product by barcode (4–32 digits), with an optional language for localized results.
Search products by taxonomy filters — country, category, brand tags — plus Nutri-Score (a–e), with paging (page 1–1000, page_size 1–20).
Full-text search products with a query (up to 120 characters), also pageable.
Autocomplete taxonomies (categories, brands, countries, ingredients, additives, allergens, labels) with an optional result limit (1–20).
Compare 2–5 products at once by barcode, only when normalized nutrition basis and preparation state match.
Get provenance with every result: source URLs, retrieval time, cache status, missing fields, and warnings; nutrition keeps v3 aggregated values with basis and provenance separate from legacy
nutriments.Safe by design: read-only, non-destructive, idempotent — no editing records, uploading images, or health claims, and it respects Open Food Facts rate limits via built-in request limits and short-lived caches.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Open Food Facts MCP look up the product with barcode 3017620422003"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Open Food Facts MCP
Four tools are available. search_products is disabled and absent from MCP discovery. Filtered search by category, country, brand or Nutri-Score is unavailable. search_text provides text search and does not replace those filters.
A read-only Model Context Protocol server for querying Open Food Facts from MCP clients. This is an independent third-party project and is not affiliated with or endorsed by Open Food Facts.
The server requires Node.js 22.23 or newer, uses TypeScript and @modelcontextprotocol/server 2.0.0 with Zod 4, and communicates over MCP STDIO. It reads public product, search, and taxonomy data. It does not edit product records, upload images, or provide health claims.
Tools
Tool | Arguments |
|
|
|
|
|
|
|
|
See examples/tool-calls.json for argument examples and docs/architecture.md for the response contract, endpoints, nutrition handling, and request limits.
Related MCP server: @cyanheads/openfoodfacts-mcp-server
Run locally
This repository is not published as an npm package. Clone it, install dependencies, and run these checks from the checkout:
npm install
npm run typecheck
npm testBefore starting the server, set OFF_USER_AGENT to an application name and version followed by a monitored contact email:
export OFF_USER_AGENT='open-food-facts-mcp/0.1.0 (you@example.org)'
npm startReplace the example address with your contact. Open Food Facts requires a descriptive User-Agent that identifies the application and provides contact information. These read operations do not use an API key.
MCP client configuration
The server uses STDIO. Add an entry like this to your MCP client's configuration, replacing the checkout path and contact address:
{
"mcpServers": {
"open-food-facts": {
"command": "node",
"args": [
"--experimental-strip-types",
"/absolute/path/to/open-food-facts-mcp/src/index.ts"
],
"env": {
"OFF_USER_AGENT": "open-food-facts-mcp/0.1.0 (you@example.org)"
}
}
}
}Do not write logs to stdout in an MCP STDIO process; stdout carries protocol messages.
Data and responsible use
Open Food Facts is a community-built database. Its API documentation notes that product data can be incomplete or inaccurate. A missing field is not zero. An absent allergen entry does not establish that a product is allergen-free. Nutrition values can refer to 100 g, 100 ml, a portion, or a preparation state, so compare values only when their basis and preparation match.
Each successful response includes source URLs, retrieval time, cache status, missing fields, and warnings. Nutrition output keeps the v3 aggregated set and its basis alongside available input sets and provenance; legacy nutriments values remain separate. See the architecture notes for comparison behavior and limits.
Open Food Facts currently documents limits of 15 product reads and 10 search requests per minute per IP address. This server also applies in-process request limits and short-lived caches. Separate server processes sharing an IP do not coordinate their counters or caches. Avoid rapid repeated searches. For bulk, analytical, or offline access, follow Open Food Facts' guidance to use its data exports or a suitable local cache instead of repeatedly querying the API.
This software is licensed under MIT; see LICENSE. Open Food Facts data reuse has separate terms: the database is under ODbL, individual database contents under DbCL, and product images under CC BY-SA. These software and data licenses are independent. Read Open Food Facts' reuse terms before redistributing data or images.
Related projects
Other community projects in this area include domdomegg/openfoodfacts-mcp, cyanheads/openfoodfacts-mcp-server, and noot-app/openfoodfacts-mcp-server. This project's design focus is a compact read-only tool set with explicit v3.6 nutrition bases and provenance.
References
Apify Actor
An additional Streamable HTTP entry point is available for Apify Standby. See the Actor setup and English documentation for /mcp, authentication, deployment, local HTTP use, and operating limits. The original STDIO entry point remains available.
Available Tools
5 toolscompare_productsBRead-onlyIdempotent
Compare 2–5 products only when normalized nutrition basis and preparation match.
Inputs: barcodes (required), language. Returns: data, source, warnings, cache_hit, +2 more
get_productBRead-onlyIdempotent
Read one Open Food Facts product by barcode. Nutrition and allergen data are informational.
Inputs: barcode (required), language. Returns: data, source, warnings, cache_hit, +2 more
get_taxonomyCRead-onlyIdempotent
Autocomplete an Open Food Facts taxonomy.
Inputs: query (required), taxonomy (required), limit, language. Returns: data, source, warnings, cache_hit, +2 more
search_productsCRead-onlyIdempotent
Search Open Food Facts products with documented taxonomy filters.
Inputs: page, brand, country, category, +3 more. Returns: data, source, warnings, cache_hit, +2 more
search_textCRead-onlyIdempotent
Full text product search via Search-a-licious.
Inputs: query (required), page, language, page_size. Returns: data, source, warnings, cache_hit, +2 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
search_products (taxonomy filters) and search_text (full-text) overlap in that both search products, but the descriptions clearly delineate structured vs. free-text search; the other tools are distinct.
All tools use snake_case with a verb_noun structure (get_, search_, compare_), consistent throughout.
Five tools for a read-only product database API is well-scoped; each tool covers a distinct operation and none feel redundant.
The surface covers lookup, structured search, full-text search, taxonomy autocomplete, and comparison, which meets core read-only needs. Minor gaps might include batch retrieval or more taxonomy exploration, but no dead ends for typical queries.
Related MCP Connectors
Open Beauty Facts MCP — Open Beauty Facts API (free, no auth, keyless).
USDA FoodData Central nutrient lookup, FDA recall watch, EU FMCG labelling via remote MCP
Unlock the power of food transparency with our Open Food Facts MCP server. Easily look up any food
Look up a packaged food by barcode, search and compare products, and check listed allergens.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides LLM agents with read-only access to FatSecret's food and recipe database through MCP tools for searching foods and retrieving detailed nutritional information.113 npmMIT
- AlicenseNot gradedqualityBmaintenanceLook up food products by barcode, search by ingredient or nutrition filter, compare products side-by-side, and browse the canonical tag vocabulary via MCP.176 npm2Apache 2.0
- AlicenseAqualityCmaintenanceProvides read-only access to iFixit repair guides, device information, repairability scores, categories, search, media, and contributor profiles via MCP tools.81BSD Zero Clause
- AlicenseBqualityBmaintenanceEnables querying a global food nutrition database of generic and branded products, including search by name, lookup by barcode, and retrieval of resolved nutrient values pinned to a dated snapshot. Coverage spans USDA FoodData Central and Open Food Facts sources, with freshness health checks available.9AGPL 3.0