
QR for Agent
io.github.benswelPublished by GitHub account benswelv0.12.2Updated Oct 27, 2026
Dynamic QR codes for AI agents — custom styling, scan tracking, webhooks
Overview
Lets an assistant create, restyle, retarget and track dynamic QR codes through the hosted QR for Agent API.
- What you can do
- Create QR codes of 11 types (URL, vCard, WiFi, email, SMS, phone, event, text, location, social, app store) with custom styling
- List, inspect, update and delete QR codes, including changing the destination URL, UTM parameters and conditional redirect rules
- Run bulk create, update and delete operations, and CSV-based creation of up to 500 codes
- Read scan analytics with device, browser, OS, country, city and referrer breakdowns, and record or read conversion events
- Register, list and delete webhooks, and check usage quota
- Manage billing and custom domains, and register for an API key
- When to use it
- Useful when you want an assistant to generate QR codes for campaigns, print material or events, and later change where they point without reprinting, or to pull scan and conversion numbers into a conversation.
- Requirements
- Runs locally via npx (Node.js) as a stdio process. Needs an API key in the API_KEY environment variable, obtainable through self-service registration; BASE_URL optionally points at a different API base. Requires network access to the hosted API.
Installation
In SourceWeft
- Open QR for Agent in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
QR for Agent
[benswel/qr-for-agent-api MCP server]
QR-as-a-Service API built for AI agents. Create, update, and track dynamic QR codes programmatically via REST API or MCP (37 tools).
QR codes point to short URLs (/r/:shortId) that you can retarget at any time — the QR image never changes, but scanning it goes to the new destination. Multi-tenant by design, with full scan analytics.
Live API: api.qrforagent.com | Site: qrforagent.com | MCP: qr-for-agent
Features
- Dynamic QR codes — change the destination URL without regenerating the image
- 11 QR types — URL, vCard, WiFi, Email, SMS, Phone, Event, Text, Location, Social, App Store
- Custom styling — dot shapes (square, rounded, dots, classy-rounded), corner styles, colors, gradients, logo embedding, frames with CTA text
- SVG & PNG — vector and bitmap output
- Enriched analytics — device type, browser, OS, country, city, referrer, scans-by-day
- Real-time webhooks — HMAC-SHA256 signed payloads with delivery logging
- UTM tracking — auto-append UTM parameters to redirect URLs
- GTM support — intermediate page with Google Tag Manager snippets
- Conditional redirects — route by device, OS, country, language, time range, or A/B split
- Custom domains — Pro users brand short URLs with their own domain (
qr.yourbrand.com/r/abc123) - Expiration & scheduling — auto-expire QR codes or schedule URL swaps
- Conversion tracking — tracking pixel + API for post-scan events (purchases, signups) with ROI analytics
- Frames & templates — decorative frames around QR codes (banner_top, banner_bottom, rounded) with CTA text
- Bulk operations — create, update, or delete up to 50 QR codes per request, or up to 500 via CSV upload (Pro)
- Multi-tenant — each API key sees only its own data
- MCP server —
qr-for-agentwith 37 tools for Claude Desktop, Cursor, etc. - Plan-based quotas — Free (10 QR, 1K scans/month) and Pro ($19/month, unlimited)
- Self-service registration —
POST /api/registerwith email, no credit card - Stripe integration — checkout, billing portal, webhook-driven plan management
- OpenAPI docs — Swagger UI at
/documentation - AI-discoverable —
/.well-known/ai-plugin.jsonand/.well-known/mcp.json - Open source — MIT license, self-hostable via Docker
Quick Start
On first startup, an API key is auto-generated and printed to the console.
API Endpoints
QR Code Management (X-API-Key required)
Analytics (X-API-Key required)
Conversions (X-API-Key required)
Webhooks (X-API-Key required)
Custom Domain (X-API-Key required, Pro only)
Account (X-API-Key required)
Public (no auth)
Admin (X-Admin-Secret header required)
Authentication
All /api/* endpoints require an X-API-Key header.
- Format:
qr_+ 32-character random string - Auto-generated: on first startup if no keys exist
- Multi-tenant: each key only sees its own QR codes
- Create a key:
npm run key:create "my-label" - List keys:
npm run key:list
Public endpoints (/r/*, /i/*, /health, /documentation, /.well-known/*) don't require auth.
MCP Server
Published as qr-for-agent on npm. 37 tools for AI agents to manage QR codes natively.
Claude Desktop / Cursor
Add to your MCP config (claude_desktop_config.json or .cursor/mcp.json):
Available Tools (37)
Configuration
Copy .env.example to .env and edit:
Database
SQLite with Drizzle ORM. Six tables:
api_keys— key storage with label, email, plan (free/pro), Stripe IDs, custom domainqr_codes— QR metadata, target URLs, type/type_data, style options, UTM, GTM, redirect rules, expiration/schedulingscan_events— scan tracking: timestamp, user-agent, referer, IP, device, browser, OS, country, citywebhooks— webhook endpoints per API key, HMAC secret, subscribed eventswebhook_deliveries— delivery log: status, response code, error messagesconversion_events— conversion tracking: event name, value, metadata, referer, IP, timestamp
Migrations run automatically on server startup.
Deployment
Docker
The database is persisted in a Docker volume.
Railway
The project includes railway.toml and a multi-stage Dockerfile. Connect your GitHub repo to Railway — it builds and deploys automatically with health checks on /health.
Tests
195 integration tests covering all endpoints, auth, multi-tenant isolation, QR types, webhooks, bulk operations, custom domains, frames, conversions, CSV upload, and analytics.
Scripts
License
MIT
Source: README.md at commit 1ab7277
Tools
0Version history
1- v0.12.2LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts