mcp-server-fooddata-dk
Look up Danish food and nutrition data from Open Food Facts and DTU Frida, all read-only and per 100 g/ml.
Discover available food-data tools and capabilities.
Search both sources by keyword (Danish/English) for branded products and generic Danish foods, with per-100g calories/macros and source attribution.
Look up packaged products by EAN/barcode in Open Food Facts.
Retrieve full details for a food by id (
off:<barcode>orfrida:<id>).Check which data sources are available and what attribution/licensing credit they require.
Optionally use a converted DTU Frida dataset; without it, searches run against Open Food Facts only.
Click 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., "@mcp-server-fooddata-dk how many calories in 100g of rugbrød?"
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.
mcp-server-fooddata-dk
MCP server for Danish food and nutrition data. Combines Open Food Facts (Danish branded/supermarket products, barcode lookup) with the DTU Frida food composition database (generic Danish foods like rugbrød, leverpostej, frikadeller).
Read-only, no user accounts, no credentials. Built as a companion to
mcp-server-fatsecret: FatSecret's free tier only carries US food data, so this
server supplies the real Danish numbers and the calling model logs the meal
there with the serving scaled to match.
This is an independent, unofficial project. It is not developed, endorsed or supported by Open Food Facts or DTU.
Why two sources
They cover opposite gaps, and neither is sufficient alone:
Source | Strong at | Weak at |
Open Food Facts | Branded supermarket products, barcode scanning, ~9,400 Danish-tagged items | Generic/home-cooked foods; barcode coverage is patchy |
DTU Frida | Generic and composite Danish foods, authoritative composition data | No branded products, no barcodes |
fooddata_search queries both and returns Frida first, since for a generic
Danish food DTU's figures are authoritative while OFF's nearest equivalent is a
branded approximation.
Related MCP server: Open Food Facts MCP Server
Tools
Tool | Purpose |
| Discovery — find the right tool |
| Keyword search across both sources; per-100g macros with source attribution |
| Open Food Facts barcode (EAN) lookup |
| Full detail for one food by id ( |
| Which sources are available and their required attribution |
All values are per 100 g/ml — the only basis both sources reliably share. The caller scales from there.
Setup
No credentials needed. Open Food Facts requires only a descriptive
User-Agent, which defaults to this project's name and URL; set
OFF_USER_AGENT to include a real contact address if you run it at any volume.
{
"mcpServers": {
"fooddata-dk": {
"command": "npx",
"args": ["-y", "mcp-server-fooddata-dk"],
"env": { "OFF_USER_AGENT": "yourapp/1.0 (you@example.com)" }
}
}
}Adding the Frida dataset (optional)
Frida has no public API — its site is a single-page app over an undocumented backend, which this project deliberately does not reverse-engineer. The dataset is instead downloaded by hand and converted:
npm run frida:convert -- frida-export.csv ./data/frida.json --version 5.5See data/README.md. The server runs fine without it,
serving Open Food Facts only and reporting Frida as unavailable.
Rate limits and caching
Open Food Facts allows 15 requests/min for product reads and 10/min for searches, per IP. Responses are cached in memory (1 h TTL, 500 entries), including barcode misses — a barcode absent from OFF won't appear a minute later. A 429 is reported as a clear rate-limit message rather than a bare status code, and OFF's habit of serving an HTML error page during outages is detected and reported as such.
Attribution
Both licences require credit, and the server attaches it to every result:
Open Food Facts — Open Database License (ODbL).
DTU Frida — CC BY 4.0. Frida Food Data (https://frida.fooddata.dk), National Food Institute, Technical University of Denmark. The package bundles a JSON conversion of Frida 5.5 in
data/frida.json; seedata/README.md.
Optional HTTP server
npm run dev:http (and the published Docker image) serve /mcp over
Streamable HTTP, gated by MCP_HTTP_TOKEN (compared in constant time), plus an
unauthenticated GET /healthz endpoint reporting whether the Frida dataset
loaded. There is no per-user state and no identity forwarding.
Variable | Default | Meaning |
|
| Bind address. |
|
| Listen port (1-65535). |
| unset | Bearer token required on |
|
| Start without a token on a non-loopback bind anyway (only when access is restricted by other means). |
| localhost origins | Comma-separated exact |
|
| Allow any |
| see meaning | Comma-separated host names accepted in the |
|
| Maximum request body size. |
|
| Failed authentication attempts per client address and window before further failures get HTTP 429; |
|
| Window for the limit above. |
Invalid numeric or boolean values (including OFF_TIMEOUT_MS, 1-600000,
default 15000) stop the server at startup with a message naming the variable.
Security model
The server holds no upstream credentials; all callers share its outbound IP address and therefore Open Food Facts' per-IP rate limits.
MCP_HTTP_TOKENis a single shared secret that authenticates callers of the HTTP endpoint; it does not identify individual users. Per-user authentication and authorization belong in an identity-aware gateway or proxy in front of this server.Every tool is read-only over public reference data. Search terms and barcodes are sent to Open Food Facts.
The HTTP server does not terminate TLS. Run it on loopback or a private network, behind a TLS-terminating proxy when traffic leaves the host.
Verification
npm run typecheck && npm test && npm run build
npm run smoke:live # hits the real Open Food Facts APILicense
The code is source-available under the Functional Source License, Version 1.1, ALv2 Future License (FSL-1.1-ALv2).
In plain words:
Allowed: reading the code, running it, changing it, using it inside your own organisation (also commercially), using it for non-commercial education and research, and contributing changes back.
Not allowed: making it, or something built from it, available to others as a commercial product or service that competes with it, for example a hosted service with the same functionality.
Becomes Apache-2.0: each version is also licensed under the Apache License 2.0 from two years after it is released.
Earlier versions: versions released before 0.3.0 were licensed under Apache-2.0 and remain so.
The terms in LICENSE are what apply; this summary does not replace them. See also NOTICE.
Available Tools
5 toolsfooddata_get_by_barcodeLook Up Food by BarcodeARead-onlyIdempotent
Look up a packaged product by its barcode (EAN) in Open Food Facts. Danish barcode coverage is good but incomplete — if nothing is found, fall back to fooddata_search by name.
Inputs: barcode (required).
fooddata_get_foodGet One Food by IdARead-onlyIdempotent
Full detail for a single food by the id returned from fooddata_search ("off:" or "frida:").
Inputs: id (required).
fooddata_searchSearch Danish Food DataARead-onlyIdempotent
Search Danish food/nutrition data by keyword across Open Food Facts (branded/supermarket products) and DTU Frida (generic Danish foods like rugbrød or leverpostej). Returns per-100g calories and macros with source attribution. Use this to get real Danish nutrition values before logging a meal elsewhere.
Inputs: query (required), limit, danishOnly.
fooddata_search_capabilitiesSearch Food Data CapabilitiesARead-onlyIdempotent
Find the right food-data tool. Use first if unsure what is available.
Inputs: limit, query.
fooddata_sourcesFood Data SourcesARead-onlyIdempotent
Which data sources this server has available, and the attribution their licences require.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Tools are largely distinct: search, barcode lookup, ID detail, and meta-info. fooddata_search_capabilities and fooddata_sources both provide meta-info but one guides tool selection while the other covers data sources/licensing. Search vs get_by_barcode is clarified by description, so only minor ambiguity remains.
All tools share the fooddata_ prefix, and most follow a verb_noun pattern (search_capabilities, get_food, get_by_barcode). However, 'fooddata_sources' is a bare noun and 'fooddata_search' is a bare verb, deviating slightly from the consistent verb_noun style.
Five tools is well-scoped for a food data server. Each serves a distinct need: search, barcode lookup, detail retrieval, and source/capability info. No redundant or missing tools for the server's read-only purpose.
The tool surface covers all core operations for a food data lookup server: keyword search, barcode lookup, full detail by ID, and attribution info. There are no dead ends—get_food relies on search IDs, but that is a documented flow. No obvious gaps.
Maintenance
Related MCP Connectors
Food and nutrition data: search, macros, and comparisons
Food nutrition lookup via natural language, barcode, and image. Database of 1,000,000+ foods.
Look up a packaged food by barcode, search and compare products, and check listed allergens.
Nutrition data for AI agents and LLMs, powered by Edamam’s database of 1,000,000 foods, including 680,000+ with UPC codes. Lookup via natural language and barcode at low cost and low latency. Highly accurate, deterministic data covering macro and micronutrients, allergens, and lifestyle diet tags.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides access to a comprehensive food database with 300,000+ items, enabling nutritional data lookups, food searches, and barcode scanning with all processing happening locally for privacy and speed.214MIT
- 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 gradedqualityNot gradedmaintenanceEnables LLMs to search for food products and retrieve detailed nutritional information from the Open Food Facts database using product names or barcodes.-
- AlicenseAqualityDmaintenanceProvides LLMs with access to food nutrition data from Open Food Facts, enabling barcode lookup, product search, and nutrition score comparisons.5MIT