- Home
- MCP servers
- Open Food Facts
Open Food Facts
- typescript
1
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
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.
How to use
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.
How to install
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 --build
Option 2: Local development
Install 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 dev
Configuration and runtime notes
Configure the server via environment variables to tailor it to your Open Food Facts data source and request limits.
Notes on usage and behavior
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.
Troubleshooting
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.
Available tools
get_product
Retrieve comprehensive product information by barcode, including brand, nutritional scores, ingredients, nutrition facts, and metadata.
search_products
Search products with advanced filtering capabilities such as categories, brands, countries, nutrition grades, NOVA groups, and sorting options.
analyze_product
Provide detailed nutritional analysis and score interpretations for a given barcode, including health assessments and processing level.
compare_products
Compare multiple products across nutrition, environment, processing, or ingredients to highlight differences.
get_product_suggestions
Return personalized product recommendations based on category, dietary preferences, and Nutri-Score thresholds.