Open Food Facts

Provides MCP endpoints to search, read, and contribute to the Open Food Facts database via HTTP or local stdio startup.
  • javascript

0

GitHub Stars

javascript

Language

4 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

You can run and use the Open Food Facts MCP Server to search, read, and contribute to the Open Food Facts database. This server connects clients to Open Food Facts APIs, enabling product lookups by name or barcode, ingredient data, nutrition information, and data contributions through a standardized MCP interface.

How to use

To work with the Open Food Facts MCP Server, connect your MCP client to either the HTTP endpoint or the local stdio process. Use the available tools to look up products, search by keyword or barcode, autocomplete brands and categories, and add or edit products. For write operations you will typically need to provide your Open Food Facts credentials.

How to install

Prerequisites: you need Node.js installed on your system. You will also rely on an MCP client to communicate with the server.

# Start an HTTP MCP server (default local port 3000) with environment configuration for the client
MCP_TRANSPORT=http PORT=3000 OFF_USER_AGENT="openfoodfacts-mcp/1.1.0 (you@example.com)" npx -y openfoodfacts-mcp

# Alternatively, connect a Claude MCP client to the server
claude mcp add openfoodfacts-mcp --transport http http://localhost:3000/mcp

Configuration and runtime details

You can run the server in two ways: as a local stdio process or as a remote HTTP endpoint. The local startup uses the npx command with environment variables to configure the client identity and behavior.

{
  "type": "http",
  "name": "openfoodfacts_mcp_http",
  "url": "http://localhost:3000/mcp",
  "args": []
}
{
  "type": "stdio",
  "name": "openfoodfacts_mcp_stdio",
  "command": "npx",
  "args": ["-y", "openfoodfacts-mcp"]
}

Security and access

When performing write operations (adding or editing products, uploading images), provide your Open Food Facts username and password as shown in the environment variables. Use a secure method to manage credentials and avoid exposing them in shared environments.

Troubleshooting

If you cannot reach the MCP server, verify that port 3000 is open and that the MCP process is running. Check that OFF_USER_AGENT is set and valid. For write operations, ensure OFF_USER_ID and OFF_PASSWORD are configured correctly.

Available tools

get_product

Retrieve product information by barcode, returning details such as ingredients and nutrition data.

search_products

Search for products by name or keyword to browse results.

autocomplete

Provide autocomplete suggestions for brands, categories, and labels to assist exploration.

add_or_edit_product

Add a new product or update an existing one in the database.

upload_image

Upload a product image to associate with a product entry.

select_image

Select, crop, and rotate a chosen image for upload.

call_api

Call any OFF API endpoint directly through the MCP interface.

get_api_docs

Fetch the OFF API documentation for reference.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational