Continue 條碼掃描器 MCP 設定指南

為 Continue 配備真正的本機條碼解碼器。它能讀取 16 種一維與二維條碼格式,並完整保留前導零,回傳精確的識別碼。

在 Continue YAML 中加入 qrscan

需要 Node.js 22.19 以上或 24 以上版本。

  1. 1

    若使用 cn CLI,請將此 mcpServers 項目加入 ~/.continue/config.yaml;若在 IDE 工作區中使用,請將此檔案儲存為 .continue/mcpServers/qrscan.yaml。

    Text
    name: QR Code and Barcode Scanner
    version: 0.3.5
    schema: v1
    mcpServers:
      - name: qrscan
        type: stdio
        command: npx
        args:
          - --yes
          - --ignore-scripts
          - "@qrcode-ai-com/qrcode-barcode-scanner-mcp"
        env:
          QRSCAN_MCP_ALLOWED_DIRECTORIES: /absolute/path/to/images
        connectionTimeout: 60000
  2. 2

    將 Continue 切換至代理模式 (agent mode),或在無介面 cn -p 指令中傳入 --allow scan_file,並確認 qrscan 在 60 秒逾時內順利載入。

  3. 3

    試試看,請這樣詢問 Continue:

    讀取 barcode-reference.png 中的 Code 128 條碼,並給我完整保留前導零的確切數值。

Continue 僅設定 MCP 伺服器(不使用技能資料夾)。設定 connectionTimeout: 60000 可讓首次透過 npx 下載時擁有完整一分鐘,而不受限於 Continue 預設的 20 秒。

在 npm 上檢視 MCP 套件

在 Continue 任務中運用已解碼的條碼

條碼掃描器會回傳確切的識別碼與條碼格式,讓 Continue 能核對標籤而無需猜測數字。

在代理模式中驗證條碼標籤

在 Continue 中於本機解碼 Code 128、EAN-13、UPC-A 與二維條碼測試檔,完整保留數字與前導零。

CLI 與工作區 YAML 路徑

cn CLI 請將 qrscan 寫入 ~/.continue/config.yaml;IDE 工作區設定則放置於 .continue/mcpServers/qrscan.yaml。

無介面 cn -p 自動化

搭配 --allow scan_file 執行 cn -p,穩定重複驗證標籤內容,並將商品查詢保留於外部系統處理。

在 Continue 中測試條碼圖片

準備好圖片、複製請求提示詞,並比對回傳的內容。

barcode-reference.png

建立 Code 128 條碼,內容填入 STOCK-4827 並儲存為 barcode-reference.png。

請 Continue 讀取這張圖片

Text
Read barcode-reference.png with Barcode Scanner.
Return the complete identifier as text and its format.
Preserve leading zeros. Do not run external lookups.
If the tool is unavailable or detects nothing, report that
instead of guessing.
預期結果 · Code 128
STOCK-4827

搭配掃描器後,Continue 會回傳確切的識別碼與格式,而非憑空猜測。

barcode-reference.png 的範例結果。

Continue 條碼掃描器 MCP 設定常見問題

安裝方式、條碼格式、前導零保留、本機隱私與 MIT 授權說明。

不需要。Continue 的文件規範僅支援 MCP 伺服器而不設技能資料夾,因此只需在 YAML 中加入 stdio MCP 伺服器 (@qrcode-ai-com/qrcode-barcode-scanner-mcp) 即可。

cn CLI 會從 ~/.continue/config.yaml 讀取 mcpServers,並忽略工作區內的 .continue/mcpServers/ 檔案。若使用 IDE 工作區,則可將設定檔儲存在 .continue/mcpServers/qrscan.yaml。

首次透過 npx 啟動時會從 npm 下載 MCP 套件與原生解碼器,可能超過 Continue 預設的 20 秒限制。設定為 60,000 毫秒可讓初次啟動擁有完整一分鐘。

可解碼 16 種條碼格式:Code 128、Code 39、Code 93、EAN-13(含 ISBN)、EAN-8、UPC-A、UPC-E、ITF、Codabar、Telepen、GS1 DataBar、GS1 DataBar Expanded、Data Matrix、PDF417、Aztec 與 MaxiCode,另外也支援 QR Code。

會。content.text 一律以原樣字串回傳並完整保留前導零,且 EAN-13 報告會同步解析 14 位數的 GS1 GTIN。解碼過程不會查詢任何外部零售、定價或 ISBN 資料庫。

Continue 僅在代理模式 (agent mode) 下呼叫 MCP 工具。在無介面 cn -p 指令中,請同時搭配 --config ~/.continue/config.yaml 與 --allow scan_file 明確允許該工具。

從 ~/.continue/config.yaml 刪除 qrscan 項目,或移除 .continue/mcpServers/qrscan.yaml 即可。解碼作業完全透過 @qrcode-ai-com/qrcode-barcode-scanner-mcp 在本機 Node.js 22.19 以上或 24 以上版本執行,採用免費 MIT 授權,與 QR Code AI 的付費方案各自獨立。

繼續閱讀其他條碼掃描器指南

閱讀通訊協定指南、切換至適用於 QR Code 的 Continue 整合,或瀏覽所有條碼整合方案。

條碼掃描器 MCP 伺服器

深入了解 stdio 傳輸機制、scan_image 與 scan_file 的差異、圖片限制與錯誤狀態。

閱讀 MCP 指南

條碼掃描器技能

檢視 SKILL.md、Node 輔助指令碼、結束碼與獨立引擎的安裝方式。

閱讀技能指南