Open Food Facts

io.github.domdomegg由 GitHub 帳號 domdomegg 發布v2.6.0更新於 Oct 24, 2026

Search and contribute to the Open Food Facts database.

已驗證STDIO僅桌面位置與生活資料與分析

概覽

AI 產生的概覽

讓助理搜尋 Open Food Facts 資料庫中的產品、營養與成分資訊,並可選擇性地貢獻產品資料。

可以做什麼
包裝 Open Food Facts API,提供依條碼取得產品資訊、依品牌、類別或 Nutri-Score 進行結構化搜尋、使用 Lucene 語法進行布林搜尋,以及品牌、類別與標籤自動完成等工具。需要驗證的工具可新增或編輯產品、上傳產品圖片,並對圖片進行選取、裁切與旋轉。通用工具 call_api 可存取任意 Open Food Facts 端點,get_api_docs 則回傳 API 文件。
適用情境
適合助理需要食品產品資訊的情境:熱量、成分、Nutri-Score,或依品牌與類別查詢,以及依營養標準篩選產品。若希望助理不僅讀取、還能新增或更新 Open Food Facts 中的項目,也同樣適用。
執行需求
以 stdio 方式在本機執行,通常透過 npx 從 npm 套件 openfoodfacts-mcp 啟動。需要設定 MCP_TRANSPORT 與 OFF_USER_AGENT 環境變數;OFF_USER_AGENT 必須符合 'AppName/Version (email)' 格式,這是 Open Food Facts API 的要求。OFF_COUNTRY 為選用,用於指定國家子網域(預設 world)。寫入操作還需要 OFF_USER_ID 與 OFF_PASSWORD。需要可連線至 Open Food Facts 的網路。
安裝前請注意
唯讀工具不需要帳號,但 add_or_edit_product、upload_image 與 select_image 需要 OFF_USER_ID 與 OFF_PASSWORD,助理因此可以在你的帳號下建立或修改公開的產品項目與圖片。call_api 可存取任意 Open Food Facts 端點,視所提供的憑證而定,可能包含寫入端點。請將 OFF_PASSWORD 視為機密,避免在共用設定中外洩。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Open Food Facts,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

openfoodfacts-mcp

MCP server for the Open Food Facts API - search, read, and contribute to the world's largest open food database.

Use Cases

Look up a product by name: "How many calories in a Sainsbury's buffalo chicken wrap?" -> searches by name, finds the product, and returns nutrition data.

Look up a product by barcode: "What's in this product with barcode 3017620422003?" -> fetches Nutella's ingredients, Nutri-Score, and nutrition data.

Find healthy options: "Search for breakfast cereals with Nutri-Score A" -> searches with category and nutrition grade filters.

Contribute data: "Add the product name and brand for barcode 12345678" -> creates or updates a product entry on Open Food Facts.

Explore the database: "What brands of organic chocolate are in the database?" -> uses autocomplete and search to explore.

Setup

Follow the instructions on install-mcp, which generates the right config for your MCP client (Claude Code, Claude Desktop, Cursor, Cline, VS Code, and more).

Set OFF_USER_AGENT to identify your app (e.g. openfoodfacts-mcp/1.2.0 ([email protected])). For write operations (adding/editing products, uploading images), also set OFF_USER_ID and OFF_PASSWORD.

Environment Variables

VariableRequiredDescription
OFF_USER_AGENTYesUser-Agent string, e.g. "AppName/1.0 ([email protected])"
OFF_USER_IDNoOpen Food Facts username (for write operations)
OFF_PASSWORDNoOpen Food Facts password (for write operations)
OFF_COUNTRYNoCountry subdomain (default: world)

Tools

ToolDescriptionAuth
get_productGet product info by barcodeNo
search_products_standardSearch with structured filters (brand, category, Nutri-Score)No
search_products_luceneSearch with Lucene syntax, negation, and boolean logicNo
autocompleteAutocomplete brands, categories, labels, etc.No
add_or_edit_productAdd or update a productYes
upload_imageUpload a product imageYes
select_imageSelect, crop, and rotate an imageYes
call_apiCall any OFF API endpoint directlyDepends
get_api_docsGet OFF API documentationNo

Contributing

Pull requests are welcomed on GitHub! To get started:

  1. Install Git and Node.js
  2. Clone the repository
  3. Install dependencies with npm install
  4. Run npm run test to run tests
  5. Build with npm run build

Releases

Versions follow the semantic versioning spec.

To release:

  1. Use npm version <major | minor | patch> to bump the version
  2. Run git push --follow-tags to push with tags
  3. Wait for GitHub Actions to publish to the NPM registry.

來源:README.md,提交 be8b293

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v2.6.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分