Continue 條碼掃描器 MCP 設定

為 Continue 配備真正的本機條碼解碼器,可讀取 16 種一維及二維條碼格式,並完整保留前導零返回準確編號。

在 Continue YAML 加入 qrscan

需要 Node.js 22.19 或以上,或 Node.js 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 模式(或在無頭 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 核對標籤資料而無需猜測數字。

在 Agent 模式驗證條碼標籤

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

CLI 與工作區域 YAML 路徑

cn CLI 須將 qrscan 寫入 ~/.continue/config.yaml,IDE 工作區域設定則可儲存於 .continue/mcpServers/qrscan.yaml。

無頭 cn -p 自動化執行

以 cn -p 配合 --allow scan_file 重複驗證條碼標籤,同時將商品查詢留由外部系統處理。

在 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 只透過 YAML 設定 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,同時支援二維碼。

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

Continue 只會在 Agent 模式下呼叫 MCP 工具。進行無頭 cn -p 執行時,請一併指定 --config ~/.continue/config.yaml 並以 --allow scan_file 明確授權工具。

刪除 ~/.continue/config.yaml 中的 qrscan 項目,或移除 .continue/mcpServers/qrscan.yaml 即可。解碼於本機透過 Node.js 22.19+ 或 24+ 運行,經由 MIT 授權的 @qrcode-ai-com/qrcode-barcode-scanner-mcp 免費提供,與 QR Code AI 付費方案分開。

繼續瀏覽其他條碼掃描器指南

閱讀通訊協定指南、切換至 Continue 二維碼掃描方案,或瀏覽所有條碼整合方案。

條碼掃描器技能

檢視 SKILL.md、Node 輔助指令碼、結束狀態碼及獨立引擎設定。

閱讀技能指南