npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lazymac/qr-code-api

v1.0.0

Published

QR Code generation REST API and MCP server. Supports text, URLs, vCards, WiFi configs, email, phone, custom colors/sizes.

Readme

lazymac API Store Gumroad MCPize

QR Code API

QR code generation REST API and MCP server. Generate QR codes from text, URLs, vCards, WiFi configs, email, and phone numbers. Returns PNG, SVG, or base64. No external APIs required.

Quick Start

npm install
npm start
# Server runs on http://localhost:3700

Endpoints

| Method | Path | Description | |--------|------|-------------| | GET | /api/v1/generate?data=... | Generate QR from query params | | GET | /api/v1/generate/base64?data=... | Return base64 data URL as JSON | | POST | /api/v1/generate | Generate QR with full options | | POST | /api/v1/vcard | Generate QR from vCard fields | | POST | /api/v1/wifi | Generate QR from WiFi credentials | | GET | /api/v1/health | Health check |

Examples

Simple text/URL QR

# PNG image (default)
curl "http://localhost:3700/api/v1/generate?data=https://example.com" -o qr.png

# SVG
curl "http://localhost:3700/api/v1/generate?data=hello&format=svg" -o qr.svg

# Custom colors and size
curl "http://localhost:3700/api/v1/generate?data=hello&size=500&darkColor=%23ff0000&lightColor=%23ffffff" -o qr.png

# Base64
curl "http://localhost:3700/api/v1/generate/base64?data=hello"

vCard

curl -X POST http://localhost:3700/api/v1/vcard \
  -H "Content-Type: application/json" \
  -d '{"firstName":"John","lastName":"Doe","phone":"+1234567890","email":"[email protected]","org":"Acme"}' \
  -o vcard.png

WiFi

curl -X POST http://localhost:3700/api/v1/wifi \
  -H "Content-Type: application/json" \
  -d '{"ssid":"MyNetwork","password":"secret123","encryption":"WPA"}' \
  -o wifi.png

Email / Phone (via POST /generate)

# Email
curl -X POST http://localhost:3700/api/v1/generate \
  -H "Content-Type: application/json" \
  -d '{"type":"email","to":"[email protected]","subject":"Hi","data":"_"}' \
  -o email.png

# Phone
curl -X POST http://localhost:3700/api/v1/generate \
  -H "Content-Type: application/json" \
  -d '{"type":"phone","number":"+1234567890","data":"_"}' \
  -o phone.png

Query Parameters / Body Options

| Parameter | Description | Default | |-----------|-------------|---------| | data | Text/URL to encode | required | | format | png, svg, base64 | png | | size | Image width in px (50-2000) | 300 | | errorCorrectionLevel | L, M, Q, H | M | | darkColor | Hex color for dark modules | #000000 | | lightColor | Hex color for light modules | #ffffff | | margin | Quiet zone modules | 2 |

MCP Server

Use as a Model Context Protocol tool server:

node src/mcp-server.js

Claude Desktop config

{
  "mcpServers": {
    "qr-code": {
      "command": "node",
      "args": ["/path/to/qr-code-api/src/mcp-server.js"]
    }
  }
}

MCP Tools

  • generate_qr — Text/URL to QR
  • generate_vcard_qr — vCard contact QR
  • generate_wifi_qr — WiFi credentials QR
  • generate_email_qr — Email mailto QR
  • generate_phone_qr — Phone number QR

Docker

docker build -t qr-code-api .
docker run -p 3700:3700 qr-code-api

License

MIT