
QR for Agent
io.github.benswel由 GitHub 帳號 benswel 發布v0.12.2更新於 Oct 27, 2026
Dynamic QR codes for AI agents — custom styling, scan tracking, webhooks
概覽
讓助理透過託管的 QR for Agent API 建立、美化、改指向並追蹤動態 QR 碼。
- 可以做什麼
- 建立 11 種型式的 QR 碼(網址、vCard、WiFi、電子郵件、簡訊、電話、行程、文字、位置、社群、應用程式商店),並支援自訂樣式
- 列出、檢視、更新與刪除 QR 碼,包括變更目標網址、UTM 參數與條件式轉址規則
- 批次建立、更新、刪除 QR 碼,並可從 CSV 一次建立最多 500 個
- 讀取掃描分析,含裝置、瀏覽器、作業系統、國家、城市與來源細分,並記錄或查詢轉換事件
- 註冊、列出與刪除 Webhook,查看用量配額
- 管理帳務與自訂網域,並註冊取得 API 金鑰
- 適用情境
- 適合讓助理為行銷活動、印刷品或活動產生 QR 碼,之後不必重印即可變更指向;也適合在對話中直接取得掃描與轉換數據。
- 執行需求
- 透過 npx(Node.js)以本機 stdio 程序執行。需在 API_KEY 環境變數提供 API 金鑰,可透過自助註冊取得;BASE_URL 為選用,可指向其他 API 位址。需要能連線至託管 API 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 QR for Agent,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
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
來源:README.md,提交 1ab7277
工具
0版本歷史
1- v0.12.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分