Cursor Barcode Scanner MCP & Plugin

Equip Cursor with a real local barcode decoder. It reads 16 1D and 2D barcode formats and returns exact identifiers with leading zeros intact.

Connect the scanner with mcp.json

Requires Node.js 22.19+ or 24+.

  1. 1

    Add this entry to your Cursor mcp.json file (or open Cursor's official MCP install link below and confirm the command).

    JSON
    {
      "mcpServers": {
        "qrscan": {
          "command": "npx",
          "args": ["--yes", "--ignore-scripts", "@qrcode-ai-com/qrcode-barcode-scanner-mcp"]
        }
      }
    }
  2. 2

    Reload Cursor and confirm qrscan lists scan_image. Add env.QRSCAN_MCP_ALLOWED_DIRECTORIES if you also want scan_file.

  3. 3

    Try a quick check. Ask Cursor:

    Read the Code 128 barcode in barcode-reference.png and give me the exact value with leading zeros preserved.

The first run downloads the MIT MCP server and native engine from npm. Subsequent launches reuse npm's local cache.

Open Cursor MCP install link

Use a decoded barcode in a Cursor task

Barcode Scanner returns exact identifiers and symbologies so Cursor can verify labels without guessing digits.

Verify barcode test fixtures

Decode Code 128, EAN-13, UPC-A and 2D fixtures locally inside Cursor with exact digits and leading zeros preserved.

Scoped file access via scan_file

Keep scan_image bytes-only by default, or allow fixture directories explicitly via QRSCAN_MCP_ALLOWED_DIRECTORIES.

Rule, skill and MCP together

Clone the local plugin bundle to pair qrscan MCP with SKILL.md guardrails that keep product lookups separate.

Try a barcode image in Cursor

Provide the image, copy the request and compare the returned content.

barcode-reference.png

Create a Code 128 barcode containing STOCK-4827 and save it as barcode-reference.png.

Ask Cursor to read it

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.
Expected result · Code 128
STOCK-4827

With the scanner, Cursor returns the exact identifier and its format rather than a guess.

Example output for barcode-reference.png.

Cursor Barcode Scanner MCP & Plugin questions

Setup routes, barcode formats, leading zeros, local privacy and MIT licence.

Add the mcpServers.qrscan entry to your Cursor mcp.json file, select Cursor's official MCP install link in the setup panel or clone qrcode-barcode-scanner-plugin into ~/.cursor/plugins/local/qrcode-barcode-scanner and reload.

qrscan exposes scan_image (base64 bytes) by default and never downloads URLs. Add "env": { "QRSCAN_MCP_ALLOWED_DIRECTORIES": "/absolute/path/to/labels" } to the qrscan entry and reload Cursor to enable scan_file.

It decodes 16 barcode symbologies: Code 128, Code 39, Code 93, EAN-13 (including ISBN), EAN-8, UPC-A, UPC-E, ITF, Codabar, Telepen, GS1 DataBar, GS1 DataBar Expanded, Data Matrix, PDF417, Aztec and MaxiCode, plus QR codes.

Yes. content.text is always returned as an exact text string so leading zeros stay intact, and EAN-13 reports also include the 14-digit GS1 GTIN. No external retail, pricing or ISBN database is queried.

All detected symbols return together in detections, each with its symbology and content.text. Check each item's symbology rather than assuming index 0 is the barcode.

Delete the qrscan block from mcp.json. If you cloned the local plugin, remove ~/.cursor/plugins/local/qrcode-barcode-scanner and reload the Cursor window.

Decoding runs locally on your machine via Node.js 22.19+ or 24+ (Cursor still sends conversation text to your configured LLM). Current releases are free and open-source under the MIT licence, separate from QR Code AI paid plans.

Cursor setup and Barcode Scanner references

Inspect the official Cursor setup source and the MIT scanner adapter contract.