
CodeQR
io.codeqr由 codeqr.io 發布官方發布者v0.1.0更新於 Oct 24, 2026
Create and manage CodeQR short links, QR codes, and analytics from any MCP client.
概覽
CodeQR 遠端 MCP 伺服器讓助理在 CodeQR 工作區中建立與管理短連結、QR 碼、標籤及點擊分析資料。
- 可以做什麼
- 建立、列出、更新與刪除短連結,支援條件式路由與流量拆分的智慧規則
- 建立、列出、更新與刪除動態 QR 碼,可編碼網址、Wi-Fi、聯絡人名片、WhatsApp、電子郵件、簡訊、電話、文字或加密貨幣請求,並可設定錢包通行證品牌
- 依所選期間查詢點擊與掃描分析資料
- 列出自訂網域與標籤、建立標籤,並讀取已授權工作區的名稱、代稱與方案
- 適用情境
- 適合讓助理在對話中直接縮短連結、產生或改指向 QR 碼、查詢點擊與掃描數據。適用於已有 CodeQR 工作區的行銷、活動與推廣情境。
- 執行需求
- 遠端 Streamable HTTP 端點 mcp.codeqr.io/mcp,無需本機安裝。需要 OAuth 2.0 授權:使用者在 CodeQR 登入並選擇授權哪個專案,不需處理 API 金鑰。需要 CodeQR 帳號與工作區。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 CodeQR,將其新增到工作區。
- 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/io.codeqr%2Fcodeqr/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。
{
"mcpServers": {
"codeqr": {
"type": "http",
"url": "https://mcp.codeqr.io/mcp"
}
}
}README
CodeQR Remote MCP Server
Remote MCP server for CodeQR with OAuth 2.0 authentication. Compatible with ChatGPT, OpenAI Agents SDK, Grok (xAI), and any MCP client supporting Streamable HTTP transport.
How It Works
- Client discovers auth endpoints via
/.well-known/oauth-protected-resource - Client registers dynamically via
POST /oauth/register GET /oauth/authorizeshows this server's consent screen — the app's self-declared name, marked unverified unless its exact redirect URI is listed insrc/oauth/verified-clients.ts, and the host that redirect URI points at. On approval the user goes to CodeQR, where they log in, choose which project to grant access to, and approve — no API key is ever handled. The callback only completes in the browser that approved.- CodeQR returns them to
GET /oauth/callback, which trades the code for an access + refresh token pair - Client exchanges authorization code for access token (PKCE)
- Client sends MCP tool calls with Bearer token to
POST /mcp
The CodeQR access token lasts 7 days and is renewed transparently. Each
renewal gives the session another 120 days, so a connection in use does not
expire on a fixed date; an idle one ends 120 days after its last renewal, and
none outlives one year from when it was made (the expires_in the client is
given).
Quick Start
Deploy
Vercel (Recommended)
The project is configured for Vercel serverless functions:
The app will be available at https://your-project.vercel.app. All routes are handled by the serverless function at api/server.ts.
OAuth storage: Set Upstash Redis (UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN) so authorization codes, access tokens, and registered clients persist across serverless invocations. If these variables are omitted, the server falls back to an in-memory store (fine for local development only).
Docker
Railway / Render / Fly.io
Set environment variables:
SERVER_URL— Your public server URL (e.g.,https://mcp.codeqr.io)UPSTASH_REDIS_REST_URL/UPSTASH_REDIS_REST_TOKEN— Recommended for multi-instance or restartsPORT— Port (usually set automatically by the platform)
Connect to ChatGPT
- Deploy this server to a public URL
- In ChatGPT, go to Settings > Advanced > Developer Mode
- Go to the Connectors tab
- Click Add Connector
- Enter your server URL (e.g.,
https://mcp.codeqr.io/mcp) - ChatGPT will auto-discover the OAuth endpoints and prompt you to authorize
Connect to OpenAI Agents SDK
Available Tools
Conversion event tools are not offered. track_lead and track_sale need the
conversions.write scope, which CodeQR grants to workspace owners only, and
requesting it makes CodeQR reject the whole authorization for everyone else.
The per-link trackConversion toggle is a links.write field and IS exposed
on create_link/update_link (plans that include conversion tracking only).
Smart rules are exposed on create_link/update_link as rules: conditional
routing by any of the twelve attributes the API implements, and traffic
splitting across 2-4 destinations, which is how an A/B test is expressed — one
rule with no condition and a split. Where the workspace doesn't have smart
rules enabled, the API rejects the whole call — the create or update fails
outright, so no link or QR code is created without the rules it asked for —
and the server doesn't forward that rejection as-is: it reports that smart
rules aren't enabled on this workspace, with a link to details.
src/plan-limit-message.ts recognizes plan wording it knows: a capability
gate like this one becomes "isn't enabled on this workspace", a quota becomes
"has reached its limit of N …"; anything it doesn't recognize passes through
unchanged. Four of the field's invariants cannot be stated in JSON Schema
(weights totalling 100, url xor split, the all-or-nothing condition, the
unconditional rule coming last), so they are checked in src/smart-rules.ts
before the request is sent — which saves a round-trip and answers in a
sentence, rather than the serialized error body the SDK surfaces.
The trap worth knowing: value is compared whole and case-insensitively
against what the request carries, which for three attributes is narrower than
the name suggests. device is the operating system (iOS, Android,
Windows, Mac OS, Linux — never mobile), language a two-letter code,
referrer a bare domain. A wrong value is not an error anywhere: the API
accepts any string and the rule silently never matches.
create_qrcode/update_qrcode also take title and walletPass. title
sets the QR code's display title and is printed in large type on the
Google/Apple Wallet pass saved from the code (replacing "QR Code"). Within
walletPass, name and logo override the workspace name and logo shown on
that pass, and barcodeText sets the text shown under the QR code, e.g. a
member name or card number; when it is absent, CodeQR sends no text for that
line — the title is never repeated there. Custom branding is only available
on plans that include it, and never during a trial: a new non-null
walletPass is rejected with 403 on any other plan or during a trial, while
null (clearing it) is always accepted. Outside those plans, or during a
trial, a stored value is ignored when the pass is built, so passes fall back
to the workspace name and logo. logo is
an https URL: the API downloads it and stores its own copy, so the response
returns that copy's URL, not the one sent. barcodeText is 1-40 characters
after trimming. On update_qrcode, an object replaces the stored value as a
whole (a field left out of it is cleared, not merged) — send name, logo
and barcodeText together to keep all three; null clears the override and
reverts to the workspace branding, the same way rules: null ends a running
smart-rules test.
Interactive cards (MCP Apps)
With MCP_UI_ENABLED=1, hosts that render MCP Apps
(ChatGPT, Claude) show a card for the QR code or short link returned by
create_qrcode, update_qrcode, create_link, update_link and
get_link_info: its image, short link with a copy button, whether it is
dynamic, the destination and the scan or click count, plus a button to open it
in the CodeQR dashboard and one that asks how many scans or clicks it had.
- The tools'
_meta.ui.resourceUripoints atui://codeqr/item-card.v1.html, served throughresources/read(src/widgets/). Each read is logged asmcp.resource_read. - The result carries
structuredContent(an allowlist of fields; hosts show it to the model too) and_meta["io.codeqr/card"](image and dashboard URLs, for the card only).contentis unchanged, for clients without UI. get_analyticsgets an analytics card (ui://codeqr/analytics.v1.html): what is counted and for which period, the total, a trend line or the top five rows, and a button to open the analytics in the dashboard. Its 24h / 7d / 30d chips re-run the call from inside the card through the host (tools/call), only when the host says it can, and only with intervals every plan can read.- The pages live in
web/item-card/andweb/analytics/, with the bridge to the host inweb/shared/.yarn widgets:buildbundles them intosrc/widgets/generated/, which is committed;yarn verifyfails when it is stale. To look at them in a browser, runnode scripts/build-widgets.mjs --html, serveweb/dev/and openharness.html?fixture=qr&theme=dark&locale=pt-BR&width=375orharness.html?widget=analytics&fixture=countries&interval=30d.
Unset, the tool list, the resource list and every result are what they were.
API Endpoints
Architecture
Production Considerations
- OAuth persistence: Configure Upstash Redis (see
.env.example) for serverless and multi-instance deployments. Without it, the in-memory store is used (single process only). - Add rate limiting to the OAuth and MCP endpoints
- Add HTTPS (usually handled by your reverse proxy / platform)
- Add monitoring (the
/healthendpoint is ready for probes) - Consider token rotation for long-lived sessions
Publishing to the MCP Registry
This server is listed in the official registry as io.codeqr/codeqr. The registry
stores only the metadata in server.json — never the code.
Publishing is authorized by DNS: a TXT record on the apex of codeqr.io holds
the public half of an Ed25519 key pair. Apex, not a selector — MCP DNS auth follows
SPF-style placement, and a record under _mcp-auth. fails with a generic signature
error that does not name the cause.
If the key is ever rotated, remove the old TXT record — a stale one is tried first and makes verification fail.
Directory listings
Aggregators crawl the ecosystem and list servers whether or not anyone claims them, so an unclaimed entry still exists — as a bot's guess at what this server does. Claiming replaces the guess and unlocks editing the name and description a reader sees. None of this is done by merging a file; each one is a one-time action on the aggregator's own site.
The GitHub OAuth route Glama also offers only associates repos under a personal
account, which this repo is not — it belongs to the codeqr-io org. Hence the file.
License
MIT — CodeQR
來源:README.md,提交 0778ecf
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 75%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。