Pi Agent Barcode Scanner Extension & Skill

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

Install the Pi agent package

Requires Node.js 22.19+ or 24+.

  1. 1

    Run pi install (or append @<release-tag> from GitHub Releases to pin a specific version).

    Shell
    pi install git:github.com/qrcode-ai-com/qrcode-barcode-scanner-plugin
  2. 2

    Pi loads package.json (pi.skills and pi.extensions) to wire up skills/ and pi/extension.js, registering the qrscan MCP server.

  3. 3

    Try it out. Ask Pi agent:

    Decode the Code 128 barcode in barcode-reference.png and return the exact value with leading zeros intact.

Set QRSCAN_MCP_ALLOWED_DIRECTORIES in the server environment if you need scan_file alongside the default scan_image. Uninstall at any time with pi remove.

View plugin on GitHub

Use a decoded barcode in your Pi agent workflow

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

Verify barcode labels in Pi tasks

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

pi/extension.js MCP hook

Declared under pi.extensions in package.json to wire up the local qrscan stdio MCP server cleanly.

Skill guardrails, zero lookups

Loaded from skills/ via pi.skills so identifiers stay verbatim strings without external product catalogue calls.

Test a barcode image in Pi agent

Prepare the test image, copy the prompt and compare the returned output.

barcode-reference.png

Generate a Code 128 barcode encoding STOCK-4827 and save it as barcode-reference.png.

Ask Pi agent to decode 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 output · Code 128
STOCK-4827

With the scanner active, Pi agent returns the exact identifier and its format instead of guessing.

Sample output for barcode-reference.png.

Pi Agent Barcode Scanner Extension & Skill questions

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

Run pi install git:github.com/qrcode-ai-com/qrcode-barcode-scanner-plugin (or append @<release-tag> from GitHub Releases to pin a release).

Pi loads package.json (pi.skills and pi.extensions) from qrcode-barcode-scanner-plugin, activating skills/qrcode-barcode-scanner and pi/extension.js to register the local qrscan MCP server.

It supports 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, alongside QR codes.

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

Only once you opt in. By default qrscan exposes scan_image (base64 bytes) only; set QRSCAN_MCP_ALLOWED_DIRECTORIES in the server environment to allow local folders for scan_file.

Run pi remove git:github.com/qrcode-ai-com/qrcode-barcode-scanner-plugin.

Decoding runs locally on Node.js 22.19+ or 24+ (Pi sends chat text to your configured LLM). Current plugin, skill, MCP server and engine releases are free and MIT-licensed, separate from QR Code AI paid plans.

Pi agent setup and Barcode Scanner references

Review the official Pi agent setup documentation and the MIT scanner adapter contract.