
Open Food Facts
io.github.domdomeggPublished by GitHub account domdomeggv2.6.0Updated Oct 24, 2026
Search and contribute to the Open Food Facts database.
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.
Installation
In SourceWeft
- Open Open Food Facts in the dashboard and add it to a workspace.
- 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
Tools
Contributing
Pull requests are welcomed on GitHub! To get started:
- Install Git and Node.js
- Clone the repository
- Install dependencies with
npm install - Run
npm run testto run tests - Build with
npm run build
Releases
Versions follow the semantic versioning spec.
To release:
- Use
npm version <major | minor | patch>to bump the version - Run
git push --follow-tagsto push with tags - Wait for GitHub Actions to publish to the NPM registry.
Source: README.md at commit be8b293
Tools
0Version history
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