Food & Drink
Data source: Open Food Facts (community database)
MCP Protocol
Endpoint
https://context.gnist.ai/mcp/openfoodfacts/
claude_desktop_config.json
{
"mcpServers": {
"gnist-openfoodfacts": {
"url": "https://context.gnist.ai/mcp/openfoodfacts/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Shell
curl -X POST "https://context.gnist.ai/mcp/openfoodfacts/" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_food_product", "arguments": {"barcode": "example"}}}'
REST API
API Root
https://context.gnist.ai/rest/openfoodfacts/
3 endpoints available:
GET /rest/openfoodfacts/get_food_productGET /rest/openfoodfacts/search_food_productsGET /rest/openfoodfacts/report_feedback
Shell
curl "https://context.gnist.ai/rest/openfoodfacts/get_food_product?barcode=example" \ -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx
resp = httpx.get(
"https://context.gnist.ai/rest/openfoodfacts/get_food_product",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
params={
"barcode": "example"
},
)
print(resp.json())
Command Line
Command
gc openfoodfacts
CLI documentation will be available when the GnistAI SDK is published.
Install
pip install gnistai
Available Tools (3)
get_food_productLook up a food product by barcode (EAN-13 or UPC-A).
| Parameter | Type | Required | Description |
|---|---|---|---|
barcode | string | required |
search_food_productsSearch the Open Food Facts database for food products by name.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | |
limit | integer | optional | (default: 10) |
report_feedbackReport a bug, feature request, or general feedback for this data source.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |