OpenFoodFacts
OpenFoodFacts-MCP is a project for managing, processing, and analyzing food product data using Open Food Facts APIs.
claude mcp add --transport stdio jagjeevanak-openfoodfacts-mcp node dist/index.js \ --env TRANSPORT="stdio"
How to use
Open Food Facts MCP Server exposes a suite of tools that let AI assistants query the Open Food Facts database, retrieve product details by barcode, analyze nutritional information, compare products, and generate recipe ideas. Core tools include searchProducts, getProductByBarcode, analyzeProduct, compareProducts, and suggestRecipes. Category, brand, and advanced search capabilities (searchByCategory, searchByBrand, advancedSearch, autocomplete) help you find relevant products quickly. Nutrition and health tools (getNutriScore, getEcoScore, getAdditivesInfo, getAllergenCheck, checkMultipleAllergens) provide quick assessments of health and allergen considerations. AI Insights tools (getProductAIQuestions, getRandomAIQuestions, getProductInsights, getInsightTypes) offer AI-generated prompts and insights to guide human verification. Price tools (getProductPrices, searchPrices, getRecentPrices) let you explore pricing data.
To use the server with AI assistants, start the server (npm start) and connect via the supported transport methods. For local testing, you can use the included CLI/SDK prompts or connect via HTTP/SSE for browser-based tools. Example workflows show how an AI assistant would issue a sequence of tool calls to search for a product, fetch details by barcode, then run a nutritional analysis or a side-by-side comparison to help users make informed choices. The documentation also provides sample prompts for searching, analyzing, comparing, and creating recipe ideas using Open Food Facts data.
How to install
Prerequisites:
- Node.js v16.x or higher
- npm (or yarn)
Installation steps:
- Clone or download the repository:
git clone https://github.com/your-org/jagjeevanak-openfoodfacts-mcp.git
cd jagjeevanak-openfoodfacts-mcp
- Install dependencies:
npm install
- Build the server (if a build step is provided):
npm run build
- Start the MCP server:
npm start
Optional: If you deploy the server differently (e.g., via a script or process manager), ensure the server is started with a command matching the mcp_config below (node dist/index.js with the TRANSPORT environment variable).
Additional notes
Notes and tips:
- The server is designed to be run with Node.js. Use the mcp_config example to integrate with agents that follow the MCP spec.
- TRANSPORT can be set to stdio for local, in-process communication or to http/sse when using browser-based tools. If you switch transports, make sure the corresponding client is configured to connect to the correct endpoint.
- To enable price lookups, ensure Open Prices or similar price data sources are accessible or mocked in your environment.
- Common issues: module resolution errors after build, missing environment variables, or port conflicts when starting an HTTP/SSE transport. Verify the build output path (dist/index.js) and ensure it's accessible by the runtime command.
- If you customize the server path, update the mcp_config accordingly, e.g., args: ["dist/index.js"] or the actual built entry file path.
Related MCP Servers
context7
Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
obsidian -tools
Add Obsidian integrations like semantic search and custom Templater prompts to Claude or any MCP client.
MiniMax -JS
Official MiniMax Model Context Protocol (MCP) JavaScript implementation that provides seamless integration with MiniMax's powerful AI capabilities including image generation, video generation, text-to-speech, and voice cloning APIs.
mcp-bundler
Is the MCP configuration too complicated? You can easily share your own simplified setup!
akyn-sdk
Turn any data source into an MCP server in 5 minutes. Build AI-agents-ready knowledge bases.
promptboard
The Shared Whiteboard for Your AI Agents via MCP. Paste screenshots, mark them up, and share with AI.