Continue QR Code 掃描器 MCP 設定指南

為 Continue 配備真正的本機 QR Code 解碼器。它會直接讀取圖片並回傳確切的編碼網址或文字,而非憑像素猜測。

在 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:

    讀取 qr-reference.png 中的 QR Code,並給我確切的網址。

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

在 npm 上檢視 MCP 套件

在 Continue 任務中運用已解碼的 QR Code

QR Code 掃描器會回傳確切的網址或文字,讓 Continue 能核對連結、驗證素材或重複執行檢查。

在代理模式中檢查 QR Code 圖片

於 Continue 代理模式中在本機解碼專案內的 QR Code 素材,並在發佈前核對確切的目的地網址。

CLI 與工作區 YAML 路徑

cn CLI 請設定 ~/.continue/config.yaml(cn 會忽略 .continue/mcpServers/);IDE 工作區則可儲存為 .continue/mcpServers/qrscan.yaml。

無介面 cn -p 自動化

在無介面 cn -p 指令碼中傳入 --allow scan_file,無需互動確認即可擷取經驗證的 QR Code 內容。

在 Continue 中測試 QR Code 圖片

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

qr-reference.png

建立文字 QR Code,內容填入 https://qrcode-ai.com/ 並儲存為 qr-reference.png。

請 Continue 讀取這張圖片

Text
Read qr-reference.png with QR Code Scanner.
Return its encoded content and format as data.
Do not open the URL. If the tool is unavailable or
detects nothing, report that instead of guessing.
預期結果 · QR code
https://qrcode-ai.com/

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

qr-reference.png 的範例結果。

Continue QR Code 掃描器 MCP 設定常見問題

安裝方式、圖片輸入、不可信任資料防護、疑難排解與 MIT 授權說明。

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

Continue CLI (cn) 會從 ~/.continue/config.yaml 讀取 mcpServers,而不會讀取工作區內的 .continue/mcpServers/ 資料夾。若要在 Continue IDE 中建立工作區設定,請儲存為 .continue/mcpServers/qrscan.yaml。

首次以 npx 啟動時會從 npm 下載 MCP 伺服器與原生掃描引擎,耗時可能超過 Continue 預設的 20 秒。設定 connectionTimeout: 60000(毫秒)可為初次啟動提供完整一分鐘的緩衝時間。

Continue 僅會在代理模式 (agent mode) 下呼叫 MCP 工具。若執行非互動式 CLI 指令,請明確傳入 --allow scan_file,例如 cn -p --config ~/.continue/config.yaml --allow scan_file。

位於允許資料夾內的本機路徑可以,網址則一律不行。省略 env 區塊即可僅保留 scan_image(base64 圖片位元組);若要啟用 scan_file,請設定 QRSCAN_MCP_ALLOWED_DIRECTORIES,僅允許存取指定的本機資料夾。

不會。伺服器會將確切的 content.text 與 content.raw 視為不可信任資料回傳,絕不自動開啟連結,也不會將解碼文字當成指令執行。

從 ~/.continue/config.yaml 刪除 qrscan 項目,或刪除 .continue/mcpServers/qrscan.yaml 即可移除。解碼作業完全在本機 Node.js 22.19 以上或 24 以上版本執行(Continue 會將對話文字傳送至您的 LLM)。目前的 @qrcode-ai-com/qrcode-barcode-scanner-mcp 版本均採用 MIT 授權且免費使用。

繼續閱讀其他 QR Code 掃描器指南

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

QR Code 掃描器技能

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

閱讀技能指南