
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 创建、美化、改指向并追踪动态二维码。
- 可以做什么
- 创建 11 种类型的二维码(网址、vCard、WiFi、邮件、短信、电话、日程、文本、位置、社交、应用商店),并支持自定义样式
- 列出、查看、更新和删除二维码,包括修改目标网址、UTM 参数和条件跳转规则
- 批量创建、更新、删除二维码,并可从 CSV 一次创建最多 500 个
- 读取扫描分析,含设备、浏览器、操作系统、国家、城市和来源细分,并记录或查询转化事件
- 注册、列出和删除 Webhook,查看用量配额
- 管理账单与自定义域名,并注册获取 API 密钥
- 适用场景
- 适合让助手为营销活动、印刷物料或活动生成二维码,之后无需重印即可更改指向;也适合在对话中直接获取扫描与转化数据。
- 运行要求
- 通过 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 分