fooddb
OfficialClick on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@fooddbsearch for hummus and show calories per 100g"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
fooddb
A global food database: generic nutrition and branded products by barcode, kept current and served as a REST API, an MCP server and a CLI.
Status: early prototype. Fetchers for USDA FDC and Open Food Facts, async jobs on pq, and a REST API.
docs/design.md: the pipeline, the data model, sources and licences
docs/decisions.md: what is settled, and what is still open
docs/landscape.md: open-source competitors, and what we build vs reuse
docs/deploy.md: self-hosting with Docker Compose: install, TLS, upgrade, backup
Run locally
Needs Docker and uv; ./dev install installs what is missing.
./dev up --all # shared Postgres, this worktree's databases, API + pq worker
./dev fetch all # queue USDA FDC (Foundation, SR Legacy) and 7 Open Food Facts deltas
./dev jobs # row counts, fetch runs, queue state
./dev status # this worktree; ./dev ls for every worktree
./dev test # unit tests + the database suite against this worktree's __test database
./dev down./dev with no arguments lists every command. Each git worktree gets its own slot: the API port
(9640 + 10 × slot) and its own dev and __test databases on one shared Postgres (port 5440). All
of these are derived into .env.worktree by scripts/dev_env.py.
curl "$(./dev url)/v1/foods?q=hummus" # search products
curl "$(./dev url)/v1/products/06297001181102?include=off" # by barcode, with the OFF layer
curl "$(./dev url)/v1/records/fdc:168421" # the product a source record belongs to
curl "$(./dev url)/v1/foods/1?snapshot=2026-10-04" # pinned to a day's snapshot
curl "$(./dev url)/healthz" # freshness; 503 when staleHow data flows: fetchers write append-only observations per source record; values that fail a check wait for review; Splink matches records into products; the nightly snapshot freezes each product's resolved values (most trusted source per field), and the API serves that snapshot.
Fetcher | Source | Licence | Schedule |
| USDA FoodData Central bulk JSON | CC0 | weekly check (USDA releases twice a year) |
| Open Food Facts daily delta files | ODbL, | every 6 hours |
| Open Food Facts full dump (~13 GB, streamed) | ODbL, | once, then deltas |
| Splink product matching | – | after every fetch that added data |
| Nightly snapshot of resolved values | – | 02:30 daily |
uv run pytest runs the unit tests alone; the database suite is skipped without ./dev test.
Related MCP server: Open Food Facts MCP Server
Contributing
See CONTRIBUTING.md. Report vulnerabilities privately: SECURITY.md.
Licence
The code is under AGPL-3.0. The data is licensed separately: the core data under fooddb's own terms, and the Open Food Facts layer under ODbL.
Relation to eait
eait (eait.fit) is the first customer and the first data source:
Customer. eait keeps a read-only local copy of the catalog (
food_ref/off_product) and refreshes it from the nightly snapshot. It never calls this service live, so eait keeps logging meals when fooddb is down.Data source. When a barcode scan in eait misses or hits a stale row, eait sends the label photo here as an observation. No user id crosses the boundary.
This server cannot be deployed
Maintenance
Related MCP Connectors
Look up a packaged food by barcode, search and compare products, and check listed allergens.
Food and nutrition data: search, macros, and comparisons
USDA FoodData Central nutrient lookup, FDA recall watch, EU FMCG labelling via remote MCP
Barcode lookup, nutrition search, and product comparison for 3M+ crowd-sourced food products.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to access the Open Food Facts database to query detailed food product information, nutritional data, and environmental scores. Supports product lookup by barcode, smart search with filtering, nutritional analysis, product comparison, and dietary recommendations to help users make informed food choices.51MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to search for food products and retrieve detailed nutritional information from the Open Food Facts database using product names or barcodes.-
- FlicenseNot gradedqualityDmaintenanceProvides intelligent access to the USDA nutrition database through AI assistants, enabling users to search foods, compare nutritional content, find foods high in specific nutrients, and query authoritative nutrition data across 7,146+ food items through natural language.1-
- AlicenseAqualityDmaintenanceEnables natural language access to USDA's FoodData Central database with 1M+ foods, supporting search, nutrition facts, food comparison, and daily value calculations.8MIT