Open Food Facts

io.github.domdomeggPublished by GitHub account domdomeggv2.6.0Updated Oct 24, 2026

Search and contribute to the Open Food Facts database.

VerifiedSTDIODesktop onlyLocation & LifestyleData & Analytics

Overview

AI-generated overview

Lets an assistant search the Open Food Facts database for products, nutrition and ingredients, and optionally contribute product data.

What you can do
Wraps the Open Food Facts API with tools to fetch a product by barcode, run structured searches by brand, category or Nutri-Score, run Lucene-style searches with boolean logic, and autocomplete brands, categories and labels. Authenticated tools add or edit products, upload product images, and select, crop or rotate images. A generic call_api tool reaches any Open Food Facts endpoint, and get_api_docs returns API documentation.
When to use it
Useful when an assistant needs food product facts: calories, ingredients, Nutri-Score or brand and category lookups, or finding products matching nutrition criteria. Also relevant if you want the assistant to add or update entries in the Open Food Facts database rather than only read it.
Requirements
Runs locally over stdio, typically via npx from the npm package openfoodfacts-mcp. Requires the MCP_TRANSPORT and OFF_USER_AGENT environment variables; OFF_USER_AGENT must follow the format 'AppName/Version (email)' as required by the Open Food Facts API. OFF_COUNTRY optionally selects a country subdomain (default world). Write operations additionally need OFF_USER_ID and OFF_PASSWORD. Network access to Open Food Facts is required.
Before you install
Read-only tools need no account, but add_or_edit_product, upload_image and select_image require OFF_USER_ID and OFF_PASSWORD, so the assistant can create or modify public product entries and images under your account. call_api can reach any Open Food Facts endpoint, including write endpoints, depending on the credentials supplied. Treat OFF_PASSWORD as a secret and avoid exposing it in shared configuration.

Installation

In SourceWeft

  1. Open Open Food Facts in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

openfoodfacts-mcp

MCP server for the Open Food Facts API - search, read, and contribute to the world's largest open food database.

Use Cases

Look up a product by name: "How many calories in a Sainsbury's buffalo chicken wrap?" -> searches by name, finds the product, and returns nutrition data.

Look up a product by barcode: "What's in this product with barcode 3017620422003?" -> fetches Nutella's ingredients, Nutri-Score, and nutrition data.

Find healthy options: "Search for breakfast cereals with Nutri-Score A" -> searches with category and nutrition grade filters.

Contribute data: "Add the product name and brand for barcode 12345678" -> creates or updates a product entry on Open Food Facts.

Explore the database: "What brands of organic chocolate are in the database?" -> uses autocomplete and search to explore.

Setup

Follow the instructions on install-mcp, which generates the right config for your MCP client (Claude Code, Claude Desktop, Cursor, Cline, VS Code, and more).

Set OFF_USER_AGENT to identify your app (e.g. openfoodfacts-mcp/1.2.0 ([email protected])). For write operations (adding/editing products, uploading images), also set OFF_USER_ID and OFF_PASSWORD.

Environment Variables

VariableRequiredDescription
OFF_USER_AGENTYesUser-Agent string, e.g. "AppName/1.0 ([email protected])"
OFF_USER_IDNoOpen Food Facts username (for write operations)
OFF_PASSWORDNoOpen Food Facts password (for write operations)
OFF_COUNTRYNoCountry subdomain (default: world)

Tools

ToolDescriptionAuth
get_productGet product info by barcodeNo
search_products_standardSearch with structured filters (brand, category, Nutri-Score)No
search_products_luceneSearch with Lucene syntax, negation, and boolean logicNo
autocompleteAutocomplete brands, categories, labels, etc.No
add_or_edit_productAdd or update a productYes
upload_imageUpload a product imageYes
select_imageSelect, crop, and rotate an imageYes
call_apiCall any OFF API endpoint directlyDepends
get_api_docsGet OFF API documentationNo

Contributing

Pull requests are welcomed on GitHub! To get started:

  1. Install Git and Node.js
  2. Clone the repository
  3. Install dependencies with npm install
  4. Run npm run test to run tests
  5. Build with npm run build

Releases

Versions follow the semantic versioning spec.

To release:

  1. Use npm version <major | minor | patch> to bump the version
  2. Run git push --follow-tags to push with tags
  3. Wait for GitHub Actions to publish to the NPM registry.

Source: README.md at commit be8b293

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v2.6.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts