Skip to content
MCP server
Registry

qrcode-mcp MCP Server

Decode, repair and generate QR codes; safely route QR URLs and run pluggable OCR.

qrcode-mcp scores 66 (Good), licensed MIT and written in Python. It installs as a local process. It declares 9 tools. Filed under Uncategorized. GitHub shows 0 stars. Package registries report about 235 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by xiaobingerMITPython0 stars
Trust score
66Good
Trust score 66 of 100, Good

Good trust

66 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 66 comes from

22 + 20 + 0 + 10 + 4 + 10 = 66. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity0 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 0 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "xiaobinger-qrcode-mcp": {      "command": "python -m qrmcp --transport stdio",      "args": [        "qrcode-mcp"      ],      "env": {        "QRMCP_OUTPUT_DIR": "",        "QRMCP_URL_ALLOWLIST": "",        "QRMCP_HTTP_TOKEN": "YOUR_QRMCP_HTTP_TOKEN",        "QRMCP_ALLOW_REMOTE": ""      }    }  }}

Environment variables

NameRequiredNotes
QRMCP_OUTPUT_DIROptionalDirectory where generated images are written. Defaults to ./out
QRMCP_URL_ALLOWLISTOptionalComma-separated allowed hostnames for qr_open. Wildcards such as *.example.com are supported. Empty means all public hosts are allowed with explicit confirmation.
QRMCP_HTTP_TOKENSecretOptionalOptional bearer token required by the HTTP and SSE transports.
QRMCP_ALLOW_REMOTEOptionalSet to 1 to allow fetching images from http(s) URLs. Disabled by default to prevent SSRF.

Tools9Tool docs quality grade C

All capabilities
  • Full text, line / word boxes and confidence via the pluggable OCR backends

  • Batch scan a directory or file list, optionally combining QR + OCR

  • Layered decode across engines and preprocessing variants; multi-code, corner points, confidence, payload parsing; falls back to qrrepair

  • Locate symbols without decoding — bounding boxes for cropping before repair

  • Generate QR codes with EC / version / mask / scale / border / colors; PNG · SVG · ASCII · base64

  • Validate and optionally open a QR URL in the system browser

  • Interpret URL / WiFi / vCard / phone / email / payment payloads, split query parameters, flag phishing-style patterns

  • Recover glare / blur / low-resolution symbols (QR versions 1–4); returns diagnostics, verification score and a rebuilt scannable PNG

  • Version, protocol versions, registered tools, backend availability, active safety policy

About

[!NOTE] Run it from source (pip install -e .) or from the published package (pip install qrcode-mcp / uvx qrcode-mcp). Either way the client setup is the same — see Usage in MCP clients.


Why this exists

Every QR decoder assumes a reasonably clean symbol. Real-world captures — a phone pointed at a glossy screen, a payment terminal under ceiling lights — come back with a diagonal glare band that erases a dozen modules. zxing, OpenCV and ZBar all return a checksum error. That is where this server starts working.

The demo pair is synthetic and contains no real device identifiers. Regenerate it with python assets/build_assets.py.

On the real glare-damaged sample this project was built from: grid fitting landed on Version 3 / pitch 2.948 px / 99.2% function-pattern agreement, format information resolved to EC-L / mask 6, and hint verification reached 93.6% module agreement with the reconstructed symbol.

Features

🔍 Layered decodingzxing-cpp → OpenCV → ZBar → preprocessing variants → automatic repair fallback. Multi-code images, corner points, confidence and payload parsing.
🩺 Damaged-code repairModule-grid fitting, format-information decoding, multi-segment parsing, Reed–Solomon erasure / Chase correction, then module-by-module self-verification.
🎨 Generationsegno-based, EC / version / mask / scale / border / colors, PNG · SVG · ASCII · base64, optional file output.
🧠 Pluggable OCRWindows built-in WinRT OCR, RapidOCR (offline ONNX) and Tesseract, with auto fallback and word-level boxes.
🔐 Safe by defaultURL opening requires explicit confirmation, blocks dangerous schemes and private hosts, remote image fetching disabled, output confined to one directory.
🔌 Three transportsstdio, Streamable HTTP and legacy SSE over a pure-standard-library JSON-RPC 2.0 core — no MCP SDK, no port unless you ask for one.

Quick start

From source (works today):

git clone https://github.com/xiaobinger/qrcode-mcp
cd qrcode-mcp
python -m venv .venv && . .venv/bin/activate     # Windows: .venv\Scripts\activate
pip install -e .              # core dependencies
pip install -e '.[full]'      # optional: OpenCV, ZBar, all OCR backends
qrmcp --version

From the published PyPI package:

pip install qrcode-mcp                 # or: pip install 'qrcode-mcp[full]'
uvx qrcode-mcp qrmcp --version        # no install, on-demand
qrmcp --transport stdio
ExtraWhat it adds
(core)numpy, Pillow, zxing-cpp, segno, reedsolo — decode / repair / generate / parse / open / health
visionopencv-python, pyzbar — extra decode & detection engines
ocr-windowsWindows 10+ built-in OCR, zh-Hans-CN recognizer, word boxes, no model download
ocr-rapidrapidocr_onnxruntime — offline Chinese + English ONNX models
ocr-tesseractpytesseract — needs the tesseract binary and traineddata
ocr / fullall OCR backends / everything above
devpytest, build, twine

Usage in MCP clients

mcp.entry.json in this repository is a ready-to-paste stdio fragment. Drop it into the mcpServers object of your client and restart it.

ClientWhere to put the configNotes
WorkBuddy~/.workbuddy/mcp.json → mcpServersTrust the new server once in the connector panel
Claude Desktopclaude_desktop_config.json (%APPDATA%\Claude\ on Windows, ~/Library/Application Support/Claude/ on macOS)Fully restart the app
Cursor.cursor/mcp.json (project) or ~/.cursor/mcp.json (global)Project scope is per-repository
VS Code / Copilot.vscode/mcp.jsonUses the servers key; wrap the snippet accordingly
Cline / Roo CodeExtension settings → MCP ServersPaste the JSON body
Cherry Studio / ContinueSettings → MCP / Tools → import JSONPick stdio as the transport
Any MCP clientstdio JSON belowWorks with protocol 2024-11-05 … 2025-06-18

From a local checkout — point command at the venv interpreter (or set PYTHONPATH to src):

{
  "mcpServers": {
    "qrcode_mcp": {
      "command": "python",
      "args": ["-m", "qrmcp", "--transport", "stdio"],
      "env": { "PYTHONIOENCODING": "utf-8", "PYTHONPATH": "C:/path/to/qrcode-mcp/src" }
    }
  }
}

From an installed package — use the console script:

{
  "mcpServers": {
    "qrcode_mcp": {
      "command": "qrmcp",
      "args": ["--transport", "stdio"],
      "env": { "PYTHONIOENCODING": "utf-8" }
    }
  }
}

On-demand, no install (uv):

{
  "mcpServers": {
    "qrcode_mcp": {
      "command": "uvx",
      "args": ["--from", "qrcode-mcp", "qrmcp", "--transport", "stdio"]
    }
  }
}

Shared / HTTP clients — start one server, point several clients at it:

qrmcp --transport http --port 8765 --token "$QRMCP_HTTP_TOKEN"
{
  "mcpServers": {
    "qrcode_mcp": { "type": "http", "url": "http://127.0.0.1:8765/mcp" }
  }
}

Then talk to your client in natural language:

"Decode the QR code in this screenshot — if it fails, try repairing it." "Generate a QR for this URL and save it under out/." "Read all text in this image and give me the line boxes." "Parse that QR link first and ask me before opening it."

Tools

ToolWhat it does
qr_decodeLayered decode across engines and preprocessing variants; multi-code, corner points, confidence, payload parsing; falls back to qr_repair
qr_repairRecover glare / blur / low-resolution symbols (QR versions 1–4); returns diagnostics, verification score and a rebuilt scannable PNG
qr_generateGenerate QR codes with EC / version / mask / scale / border / colors; PNG · SVG · ASCII · base64
qr_detectLocate symbols without decoding — bounding boxes for cropping before repair
qr_parseInterpret URL / WiFi / vCard / phone / email / payment payloads, split query parameters, flag phishing-style patterns
qr_openValidate and optionally open a QR URL in the system browser
ocr_imageFull text, line / word boxes and confidence via the pluggable OCR backends
qr_batchBatch scan a directory or file list, optionally combining QR + OCR
server_healthVersion, protocol versions, registered tools, backend availability, active safety policy

All image inputs accept a local path, file://, a data: URI, a bare base64 string, or an http(s) URL when explicitly enabled.

Damaged-code repair

flowchart LR
    A[Damaged image] --> B[Grid fitting<br/>finder patterns + quad]
    B --> C[Format info<br/>EC level + mask]
    C --> D[Segment parsing<br/>byte / numeric / alnum]
    D --> E[RS erasure<br/>+ Chase search]
    E --> F[Rebuild QR<br/>module-by-module verify]
    F --> G[Clean scannable PNG]
    E -. soft reading .-> H[soft_decode<br/>character candidates]
    H -. hint= .-> F

When glare destroys more codewords than the EC budget can restore, the server does not invent a result. It returns a soft_decode with per-character candidates; pass your best guess as hint= to verify it and obtain a scannable rebuild:

{
  "name": "qr_repair",
  "arguments": {
    "image": "screenshot.png",
    "hint": "https://example.com/qrmcp?sn=12345678901234567890&eC=99",
    "save_clean": true
  }
}
  • Single-block QR versions 1–4 (21×21 … 33×33). Larger or rotated / mirrored symbols are reported as unsupported or best-effort rather than guessed.
  • A verification agreement of ≥ 92% on reliable modules is required before a reconstruction is accepted as valid.
  • Long URLs are encoded as byte + numeric + byte segments: segno alone would put them in one byte segment and overflow Version 3-L, so the verification path uses a small in-house multi-segment encoder.
  • Windows OCR needs a language pack; WinRT StorageFile path APIs are avoided in favour of in-memory streams for Python 3.13 compatibility.

Transports

TransportCommandEndpointUse case
stdio (default)qrmcp --transport stdio—MCP clients launching a subprocess; no port, logs to stderr only
httpqrmcp --transport http --port 8765POST/GET/DELETE /mcp + Mcp-Session-IdStreamable HTTP, spec 2025-03-26+
sseqrmcp --transport sse --port 8765GET /sse + POST /messagesLegacy clients on 2024-11-05

HTTP/SSE bind to 127.0.0.1 by default; set --token or QRMCP_HTTP_TOKEN to require a bearer token. All three share one tool registry.

Protocol support

2025-06-18 · 2025-03-26 · 2024-11-05. The server echoes the client's version when supported, otherwise falls back to the newest it implements. Implements initialize, tools/list, tools/call, ping, batch requests and graceful shutdown.

Safety by default

  • qr_open never opens a URL without confirm=true; without it, it only validates and returns the normalized URL plus risk flags.
  • Blocks file:, javascript:, data:, userinfo, non-standard schemes and hosts resolving to private / loopback addresses (SSRF protection).
  • QRMCP_URL_ALLOWLIST restricts allowed hosts (*.example.com supported).
  • Remote image fetching is off unless QRMCP_ALLOW_REMOTE=1.
  • Generated files stay inside QRMCP_OUTPUT_DIR (default ./out); absolute paths and .. traversal are rejected.
  • QRMCP_MAX_IMAGE_BYTES, QRMCP_MAX_IMAGE_PIXELS and QRMCP_DECODE_BUDGET_MS bound resource usage.
VariablePurpose
QRMCP_OUTPUT_DIRDirectory for generated images
QRMCP_URL_ALLOWLISTComma-separated allowed hosts for qr_open
QRMCP_ALLOW_PRIVATEAllow private / loopback hosts
QRMCP_ALLOW_REMOTEAllow fetching images over http(s)
QRMCP_HTTP_TOKENBearer token for HTTP / SSE
QRMCP_OCR_PRIORITYBackend order, e.g. rapid,windows
QRMCP_TESSERACT_CMDPath to the Tesseract binary
QRMCP_MAX_IMAGE_BYTES / QRMCP_MAX_IMAGE_PIXELSInput size caps
QRMCP_DECODE_BUDGET_MSDecode time budget
QRMCP_LOG_LEVELLogging verbosity

Test status

SuiteResultRun it
End-to-end self-test38 / 38 passingPYTHONPATH=src python tests/selftest.py
Portable CI smoke16 checks passingpython tests/ci_smoke.py
Wheel build24 modules, qrmcp console scriptpython -m pip wheel . --no-deps -w dist

The self-test covers all three protocol versions, batch requests, all nine tools, the three transports end-to-end, token auth, SSE delivery, OCR backends and the damaged-image repair path. CI runs on Linux + Windows across Python 3.10–3.13 with core dependencies only — see .github/workflows/ci.yml.

Contributing

Issues and PRs are welcome — see CONTRIBUTING.md. The shortest useful contribution is a damaged QR sample that currently fails: include the image and the expected payload.

License

MIT © qrmcp contributors

Frequently asked questions

What is qrcode-mcp MCP Server?

Decode, repair and generate QR codes; safely route QR URLs and run pluggable OCR.

How do I install qrcode-mcp MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. qrcode-mcp MCP Server is published as the PyPI package qrcode-mcp.

Is qrcode-mcp MCP Server free and open source?

Yes. qrcode-mcp MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does qrcode-mcp MCP Server support remote (HTTP) connections?

No remote endpoint is listed for qrcode-mcp MCP Server. It runs locally on your machine over stdio, started by your MCP client.

What tools does qrcode-mcp MCP Server provide?

qrcode-mcp MCP Server provides 9 tools, including ocr_image, qr_batch, qr_decode, and qr_detect. See the full tool list for descriptions and parameters.

How is qrcode-mcp MCP Server's trust score calculated?

qrcode-mcp MCP Server scores 66 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server