Open Food Facts MCP Server
Search and contribute to the Open Food Facts database.
Open Food Facts scores 68 (Good), licensed MIT and written in TypeScript. It installs as a local process. It declares 8 tools. Filed under Databases. GitHub shows 4 stars. Package registries report about 412 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
68 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade A
85/100 for listing completeness. Lost points: short README, 2 of 8 tools barely described, short summary.
How quality is graded
Where the 68 comes from
22 + 20 + 2 + 10 + 4 + 10 = 68. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 2 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 10 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "domdomegg-openfoodfacts-mcp": { "command": "npx", "args": [ "-y", "openfoodfacts-mcp@2.6.0" ], "env": { "OFF_USER_AGENT": "", "OFF_USER_ID": "", "OFF_PASSWORD": "YOUR_OFF_PASSWORD", "OFF_COUNTRY": "" } } }}
Environment variables
| Name | Required | Notes |
|---|---|---|
OFF_USER_AGENT | Required | User-Agent string in format 'AppName/Version (email)'. Required by the Open Food Facts API. |
OFF_USER_ID | Optional | Open Food Facts user ID (optional, needed for write operations). |
OFF_PASSWORDSecret | Optional | Open Food Facts password (optional, needed for write operations). |
OFF_COUNTRY | Optional | Country subdomain (default: 'world'). |
MCP_TRANSPORT | Required | Transport type. |
OFF_USER_AGENT | Required | User-Agent string in format 'AppName/Version (email)'. Required by the Open Food Facts API. |
OFF_USER_ID | Optional | Open Food Facts user ID (optional, needed for write operations). |
OFF_PASSWORDSecret | Optional | Open Food Facts password (optional, needed for write operations). |
OFF_COUNTRY | Optional | Country subdomain (default: 'world'). |
Tools8Tool docs quality grade D
All capabilitiesAdd or update a product
call_apitoolCall any OFF API endpoint directly
get_api_docstoolGet OFF API documentation
get_producttoolGet product info by barcode
Search with Lucene syntax, negation, and boolean logic
Search with structured filters (brand, category, Nutri-Score)
select_imagetoolSelect, crop, and rotate an image
upload_imagetoolUpload a product image
About
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 (you@example.com)). For write operations (adding/editing products, uploading images), also set OFF_USER_ID and OFF_PASSWORD.
Environment Variables
| Variable | Required | Description |
|---|---|---|
OFF_USER_AGENT | Yes | User-Agent string, e.g. "AppName/1.0 (email@example.com)" |
OFF_USER_ID | No | Open Food Facts username (for write operations) |
OFF_PASSWORD | No | Open Food Facts password (for write operations) |
OFF_COUNTRY | No | Country subdomain (default: world) |
Tools
| Tool | Description | Auth |
|---|---|---|
get_product | Get product info by barcode | No |
search_products_standard | Search with structured filters (brand, category, Nutri-Score) | No |
search_products_lucene | Search with Lucene syntax, negation, and boolean logic | No |
autocomplete | Autocomplete brands, categories, labels, etc. | No |
add_or_edit_product | Add or update a product | Yes |
upload_image | Upload a product image | Yes |
select_image | Select, crop, and rotate an image | Yes |
call_api | Call any OFF API endpoint directly | Depends |
get_api_docs | Get OFF API documentation | No |
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.
Frequently asked questions
What is Open Food Facts MCP Server?
Search and contribute to the Open Food Facts database.
How do I install Open Food Facts MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. Open Food Facts MCP Server runs locally from the npm package openfoodfacts-mcp with the command npx -y openfoodfacts-mcp@2.6.0.
Is Open Food Facts MCP Server free and open source?
Yes. Open Food Facts MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
What tools does Open Food Facts MCP Server provide?
Open Food Facts MCP Server provides 8 tools, including add_or_edit_product, call_api, get_api_docs, and get_product. See the full tool list for descriptions and parameters.
How is Open Food Facts MCP Server's trust score calculated?
Open Food Facts MCP Server scores 68 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.
