Continue 二維碼掃描器 MCP 設定

為 Continue 配備真正的本機二維碼解碼器,直接讀取圖片並返回準確的編碼網址或文字,無需從像素猜測。

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

    請讀取 qr-reference.png 中的二維碼,並提供準確的網址。

Continue 僅配置 MCP 伺服器(不設技能資料夾)。設定 connectionTimeout: 60000 可為首次 npx 下載預留一分鐘,避免觸及 Continue 預設的 20 秒逾時限制。

在 npm 查看 MCP 套件

在 Continue 任務中使用解碼二維碼

二維碼掃描器會返回準確的網址或文字,讓 Continue 核對連結、驗證素材或重複執行檢查。

在 Agent 模式核對二維碼圖片

在 Continue Agent 模式於本機解碼項目二維碼圖片,於發佈前驗證準確的目的地網址。

CLI 與工作區域 YAML 路徑

cn CLI 須使用 ~/.continue/config.yaml(不會讀取 .continue/mcpServers/),IDE 工作區域則可使用 .continue/mcpServers/qrscan.yaml。

無頭 cn -p 自動化執行

在無頭 cn -p 指令碼中傳入 --allow scan_file,無需互動確認即可擷取已驗證的二維碼內容。

在 Continue 測試二維碼圖片

準備測試圖片、複製以下請求,並比對工具返回的解碼內容。

qr-reference.png

製作文字二維碼,內容填入 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 二維碼掃描器 MCP 設定常見問題

安裝方式、圖片輸入、不受信任資料安全守則、疑難排解及 MIT 授權。

不需要。Continue 僅支援以 YAML 配置 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 模式下呼叫 MCP 工具。如以非互動式 CLI 執行,請加上 --allow scan_file,例如執行 cn -p --config ~/.continue/config.yaml --allow scan_file。

可以傳入獲授權資料夾內的本機路徑,但絕不接受網址。省略 env 區塊可只保留 scan_image(Base64 位元組);設定 QRSCAN_MCP_ALLOWED_DIRECTORIES 則可嚴格限定只在該等資料夾內啟用 scan_file。

不會。伺服器會將準確的 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 授權。

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

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

二維碼掃描器技能

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

閱讀技能指南