Openfoodfacts MCP Server

Barcode lookup, nutrition search, and product comparison for 3M+ crowd-sourced food products.

Remote serverstreamable-http

What is the Openfoodfacts MCP server?

Openfoodfacts MCP server exists for a simple reason — assistants are far more useful when they can act on Openfoodfacts directly instead of describing what you should do. Barcode lookup, nutrition search, and product comparison for 3M+ crowd-sourced food products.

What you get

  • Declarative tool definitions — single file per tool, framework handles registration and validation
  • Unified error handling — handlers throw, framework catches, classifies, and formats
  • Pluggable auth: none, jwt, oauth
  • Swappable storage backends: in-memory, filesystem, Supabase, Cloudflare KV/R2/D1
  • Structured logging with optional OpenTelemetry tracing
  • STDIO and Streamable HTTP transports

What the assistant can call

Once Openfoodfacts is connected, these are the calls the assistant has available:

  • off_get_product — Fetch a packaged food product by barcode. Returns name, brand, quantity, ingredients, allergens, additives, Nutri-Score, NOVA group, Green-Score
  • off_search_products — Search by text query and/or structured tag filters (category, brand, label, allergen, additive, Nutri-Score grade, NOVA group, country). Returns
  • off_compare_products — Side-by-side nutrition and scoring comparison for 2–10 products by barcode. Returns a normalized table of energy, macros, salt, Nutri-Score, NOVA
  • off_browse_taxonomy — Resolve a human term to the canonical tag ID (categories, labels, allergens, additives, countries, NOVA groups, Nutri-Score grades) that
  • Prerequisites — The Prerequisites tool exposed by this server
  • Installation — The Installation tool exposed by this server

Configuration and credentials

You will need 3 environment variables: MCP_TRANSPORT_TYPE, MCP_LOG_LEVEL, OFF_BASE_URL. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Bun v1.3.0 or higher (or Node.js v24+). - No API key needed. The server sends an identifying User-Agent to comply with Open Food Facts' terms of service — this is baked in and requires no configuration.

Setting it up

Being a remote server, there is no local install. You register the endpoint with your client, authorise it once, and the tools appear.

Choosing this one

Plenty of file and storage access servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Openfoodfacts's toolset — off_get_product, off_search_products, off_compare_products and 3 more — is a fair guide to whether it matches your workflow. It is maintained by cyanheads; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Before you rely on it

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the openfoodfacts mcp server does with a few real requests.

Available tools

ToolWhat it does
off_get_productFetch a packaged food product by barcode. Returns name, brand, quantity, ingredients, allergens, additives, Nutri-Score, NOVA group, Green-Score, nutrition per 100g/serving, categories, labels, and data completeness.
off_search_productsSearch by text query and/or structured tag filters (category, brand, label, allergen, additive, Nutri-Score grade, NOVA group, country). Returns summary rows with barcodes for follow-up lookups.
off_compare_productsSide-by-side nutrition and scoring comparison for 2–10 products by barcode. Returns a normalized table of energy, macros, salt, Nutri-Score, NOVA, and Green-Score.
off_browse_taxonomyResolve a human term to the canonical tag ID (categories, labels, allergens, additives, countries, NOVA groups, Nutri-Score grades) that off_search_products filters on, against the live Open Food Facts taxonomy.
PrerequisitesThe Prerequisites tool exposed by this server.
InstallationThe Installation tool exposed by this server.

How to install the Openfoodfacts MCP server

{
  "mcpServers": {
    "openfoodfacts-mcp-server": {
      "type": "streamable-http",
      "url": "https://openfoodfacts.caseyjhand.com/mcp"
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Bun v1.3.0 or higher (or Node.js v24+). - No API key needed. The server sends an identifying User-Agent to comply with Open Food Facts' terms of service — this is baked in and requires no configuration.
VariableDescriptionRequired
MCP_TRANSPORT_TYPEConfiguration value read at startup.Optional
MCP_LOG_LEVELConfiguration value read at startup.Optional
OFF_BASE_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use Openfoodfacts to off get product.
  • Use Openfoodfacts to off search products.
  • Use Openfoodfacts to off compare products.

Frequently asked questions

It connects Openfoodfacts to MCP-compatible AI assistants such as Claude and Cursor, exposing 6 tools (off_get_product, off_search_products, off_compare_products, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Openfoodfacts directly.