openfoodfacts-mcp-server
MCP server by cyanheads Community
Looks up packaged food products from Open Food Facts by barcode, text, tags, allergens, and nutrient thresholds. It also compares products side by side. Useful for people checking food labels or building food apps.
Install openfoodfacts-mcp-server
Built from the published package, never by AI.
claude mcp add openfoodfacts-mcp-server -- npx -y @cyanheads/openfoodfacts-mcp-serverRun in your terminal. Add --scope user to use it in every project.
Step-by-step: install openfoodfacts-mcp-server in Claude Code
{
"mcpServers": {
"openfoodfacts-mcp-server": {
"args": [
"-y",
"@cyanheads/openfoodfacts-mcp-server"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
Step-by-step: install openfoodfacts-mcp-server in Claude Desktop
{
"mcpServers": {
"openfoodfacts-mcp-server": {
"args": [
"-y",
"@cyanheads/openfoodfacts-mcp-server"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"openfoodfacts-mcp-server": {
"args": [
"-y",
"@cyanheads/openfoodfacts-mcp-server"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add openfoodfacts-mcp-server -- npx -y @cyanheads/openfoodfacts-mcp-server{
"mcpServers": {
"openfoodfacts-mcp-server": {
"args": [
"-y",
"@cyanheads/openfoodfacts-mcp-server"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
Step-by-step: install openfoodfacts-mcp-server in Antigravity CLI
gemini mcp add openfoodfacts-mcp-server npx -y @cyanheads/openfoodfacts-mcp-serverGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
Step-by-step: install openfoodfacts-mcp-server in Gemini CLI
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the openfoodfacts-mcp-server block.
About
This MCP server gives an AI assistant access to Open Food Facts, a crowd-sourced database of more than 3 million packaged food products. It can fetch one product by barcode, including ingredients, allergens and traces, additives, scores, nutrition, and tags. It can also search by keyword, tag, allergen exclusion, or nutrient threshold, and compare up to 10 products per call on nutrition, Nutri-Score, NOVA, and Green-Score.
The server runs over STDIO or Streamable HTTP and needs no API key. A companion skill, openfoodfacts-guide, gives the assistant guidance on allergy checks, tag IDs, and search limits. It suits developers and users who want food label data inside an AI assistant. A public hosted version is also listed.
Written from the project's README and checked against it.
Tools it gives your assistant
off_get_productFetches one product by barcode with ingredients, allergens, additives, scores, nutrition, and tags.off_search_productsSearches by text, tag filters, allergen exclusions, and nutrient thresholds, returning summary rows with barcodes.off_compare_productsCompares up to 10 products per call by barcode on nutrition, Nutri-Score, NOVA, and Green-Score.off_browse_taxonomyResolves a human term, such as shellfish, to the canonical tag ID that search filters use.openfoodfacts-guideProvides a skill with guidance on allergy checks, tag IDs, grade ranges, and the shared search budget.
What you need
| Setting | Needed | What it is |
|---|---|---|
OFF_Environment variable | Optional | Open Food Facts API base URL override. Useful for testing against a mock server. Default: https://world.openfoodfacts.org |
OFF_Environment variable | Optional | Product read rate limit (requests/min). Matches the 15 req/min/IP Open Food Facts documents for product reads. Default: 15 |
OFF_Environment variable | Optional | Tag-only search rate limit (requests/min). Applies to searches by tag filters alone that read /api/v2/search. Matches the 10 req/min/IP Open Food Facts documents for that endpoint. Default: 10 |
OFF_Environment variable | Optional | Text search rate limit (requests/min). Applies to searches carrying a query, nutrient filters, or an ingredient filter, which read search.openfoodfacts.org, and to the text index date check sent beside them. Default: 10 |
OFF_Environment variable | Optional | Taxonomy resolution rate limit (requests/min). Applies to the live tag-vocabulary lookups off_browse_taxonomy makes, to tag-value resolution on text searches, and to checking allergen and trace exclusions on every search; a spent budget fal Default: 10 |
MCP_Environment variable | Optional | Sets the minimum log level for output (e.g., 'debug', 'info', 'warn'). Default: info |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- Look up the allergens and nutrition facts for this barcode: [paste barcode].
- Find gluten-free snacks with under 5 g of sugar per 100 g.
- Compare the Nutri-Score and NOVA group of these five barcodes.
Good to know
- Product data is contributor-entered, so a missing field means it has not been recorded yet.
- Per-endpoint rate budgets apply: product 15 per minute, search 10 per minute, taxonomy 10 per minute.
- Text and nutrient searches reach only the first 10,000 results and can lag the live database.
- The server is not a substitute for checking allergens on a product label, according to the guide skill's allergy guidance.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to openfoodfacts-mcp-server
All alternatives →Standardizes lab test names to LOINC codes and units to UCUM, and symptoms and diagnoses to ICPC-3, offline and with no API key. Built for people who want their health records on their own machine and queryable by an AI agent over MCP.
RuView is a WiFi sensing platform and MCP server that uses low-cost ESP32 sensors to detect people, breathing and heart rate. It is for developers and operators who want room sensing without cameras or wearables.
ToolUniverse is an MCP server that gives AI assistants access to more than 2,700 scientific tools for life science, research and literature. It is aimed at AI scientists, researchers and developers building research systems.
Mirobody is a self-hosted engine that turns lab reports, wearable data and genetic files into a single health record. Its built-in MCP server lets an AI assistant query that record and trace each number back to its source file. It is for people who want their health data on their own machine.
ScanSci PDF gets academic papers for AI agents. Give it a DOI, arXiv ID, article link, reference list or research question, and it searches candidate sources and tries to fetch accessible full texts. It is for students, researchers and labs.
Searches CNKI and Web of Science through an MCP server, returning records with impact factors. It can also open a paper in the user's signed-in browser and read its full text. Built for researchers who want AI answers on science topics backed by the source article.
Compare with Mirobody, Ruview or tooluniverse
openfoodfacts-mcp-server: common questions
Does the Open Food Facts MCP server need an API key?
No. The source says it needs no API key and includes the User-Agent that Open Food Facts requires.
Can I run the food data locally?
Yes, optionally. Setting OFF_MIRROR_PATH points the server to a SQLite copy of the Open Food Facts export that is kept current by daily deltas.
Which transports does it support?
It supports STDIO and Streamable HTTP. A public hosted server is also listed in the README.
How do I install openfoodfacts-mcp-server?
In Claude Code run claude mcp add openfoodfacts-mcp-server -- npx -y @cyanheads/openfoodfacts-mcp-server. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is openfoodfacts-mcp-server the official server?
openfoodfacts-mcp-server is a community project by cyanheads, not verified by a company domain.
Is openfoodfacts-mcp-server free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is openfoodfacts-mcp-server safe to use?
It scores 80 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to openfoodfacts-mcp-server?
Similar MCP servers: Mirobody, Ruview, tooluniverse, Mirobody.
Does openfoodfacts-mcp-server work with ChatGPT?
Yes. Add its server URL in ChatGPT as a custom connector. See MCP in ChatGPT.
