Click on "Install 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., "@openfoodfacts-mcpHow many calories in a Sainsbury's buffalo chicken wrap?"
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.
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
claude mcp add openfoodfacts-mcp -e OFF_USER_AGENT="openfoodfacts-mcp/1.2.0 (you@example.com)" -- npx -y openfoodfacts-mcpFor write operations (adding/editing products, uploading images), also set:
claude mcp add openfoodfacts-mcp \
-e OFF_USER_AGENT="openfoodfacts-mcp/1.2.0 (you@example.com)" \
-e OFF_USER_ID="your-username" \
-e OFF_PASSWORD="your-password" \
-- npx -y openfoodfacts-mcpOr with HTTP transport:
# Start the server
MCP_TRANSPORT=http PORT=3000 OFF_USER_AGENT="openfoodfacts-mcp/1.2.0 (you@example.com)" npx -y openfoodfacts-mcp
# Add to Claude
claude mcp add --transport http openfoodfacts-mcp http://localhost:3000/mcpEnvironment Variables
Variable | Required | Description |
| Yes | User-Agent string, e.g. |
| No | Open Food Facts username (for write operations) |
| No | Open Food Facts password (for write operations) |
| No | Country subdomain (default: |
Tools
Tool | Description | Auth |
| Get product info by barcode | No |
| Search with structured filters (brand, category, Nutri-Score) | No |
| Search with Lucene syntax, negation, and boolean logic | No |
| Autocomplete brands, categories, labels, etc. | No |
| Add or update a product | Yes |
| Upload a product image | Yes |
| Select, crop, and rotate an image | Yes |
| Call any OFF API endpoint directly | Depends |
| 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 installRun
npm run testto run testsBuild with
npm run build
Releases
Versions follow the semantic versioning spec.
To release:
Use
npm version <major | minor | patch>to bump the versionRun
git push --follow-tagsto push with tagsWait for GitHub Actions to publish to the NPM registry.