home / mcp / open food facts mcp server
Provides AI assistants access to Open Food Facts data for product lookups, searches, analysis, and recommendations.
Configuration
View docs{
"mcpServers": {
"caleb-conner-open-food-facts-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"open-food-facts-mcp"
]
}
}
}You can empower AI assistants to access rich Open Food Facts data through a dedicated MCP server. This server provides product lookups, smart searches, nutritional analyses, product comparisons, and dietary recommendations, all while respecting API rate limits and supporting easy deployment with Docker or local development.
You interact with the MCP server through your MCP client. Start by connecting to the server configuration youโve chosen (Docker-based or local). Once connected, you can request product information by barcode, search for products with filters, analyze nutritional scores, compare multiple products side-by-side, and generate dietary recommendations based on user preferences. The server handles rate limiting and caching to provide fast, reliable responses.
Prerequisites: you need Node.js and npm for local development, or Docker for containerized deployment.
Option 1: Docker deployment (recommended)
# Clone the MCP server repository
git clone https://github.com/conner/open-food-facts-mcp
cd open-food-facts-mcp
# Start the server with Docker Compose
docker-compose up --buildInstall dependencies, configure environment, and run the server locally.
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Build and start
npm run build
npm start
# Development mode
npm run devConfigure the server via environment variables to tailor it to your Open Food Facts data source and request limits.
The server enforces rate limits per endpoint to respect upstream API constraints. Expect informative errors when limits are exceeded and use the provided caching and batching features to optimize requests.
If you encounter connection issues, verify that your MCP client is pointing to the correct server configuration and that Docker or Node.js processes are running as expected.
Retrieve comprehensive product information by barcode, including brand, nutritional scores, ingredients, nutrition facts, and metadata.
Search products with advanced filtering capabilities such as categories, brands, countries, nutrition grades, NOVA groups, and sorting options.
Provide detailed nutritional analysis and score interpretations for a given barcode, including health assessments and processing level.
Compare multiple products across nutrition, environment, processing, or ingredients to highlight differences.
Return personalized product recommendations based on category, dietary preferences, and Nutri-Score thresholds.