
SmartTokenGuard
io.github.nwjnjjj由 GitHub 帳號 nwjnjjj 發布v1.2.2更新於 Nov 2, 2026
Stop burning credits on broken AI video: check every render before you pay for the next one.
概覽
檢查 AI 生成的關鍵影格與影片片段是否有技術缺陷,並在你為下一個渲染步驟付費前給出通過、重試、換模型或停止的結論。
- 可以做什麼
- 檢測影像與影片的模糊、曝光、黑畫面、凍結片段、閃爍、硬切,以及相對於參考圖的色彩與光線偏移,並回傳可供複核的影格。
- 依量測結果與助手的觀察給出通過、同模型重試、切換備援模型、停止或停止預算的判定,並附上具體修正建議,例如負向提示詞、降低動作幅度或更換種子。
- 定位撞擊、閃光與剪接的精确影格,方便放置音效。
- 報告專案花費、每個通過鏡頭的嘗試次數、首次通過率,以及在付費生成影片前被退回的關鍵影格數。
- 查詢授權用量與方案價格。
- 適用情境
- 適合在使用 ComfyUI、Kling、Runway、Veo、Hailuo、Seedance 等工具生成 AI 影片或關鍵影格時,希望每次渲染在進入下一個付費步驟前先被篩檢的情境。特別適用於先檢查靜態影格、避免為廢片付費的工作流程。
- 執行需求
- 需要來自 Polar 收據的 Starter 或 Pro 付費授權金鑰:本機安裝透過環境變數 STG_LICENSE_KEY 提供,遠端端點則透過 Authorization bearer 標頭提供。本機安裝需要 uv;遠端 MCP 端點免安裝,但只接受公開的 https 媒體網址。檔案限制為 32 MB、60 秒、1080p,每分鐘 30 次請求。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 SmartTokenGuard,將其新增到工作區。
- 連接 Authorization token 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/io.github.nwjnjjj%2Fsmart-token-guard/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"smarttokenguard": {
"type": "http",
"url": "https://stg-agent-560636228350.asia-east1.run.app/mcp",
"headers": {
"Authorization": "Bearer <YOUR_TOKEN>"
}
}
}
}README
SmartTokenGuard
English · 简体中文
Stop burning credits on broken AI video.
Every black frame, frozen shot and off-model keyframe is money you already paid for. SmartTokenGuard checks each keyframe and clip from ComfyUI, Kling, Runway, Veo, Hailuo, Seedance or any other AI video tool the moment it renders, and tells your AI assistant whether it's worth paying for the next step: pass it, retry with exact fixes, switch models, or stop spending on that shot.
How much are broken renders costing you? Try the calculator: https://nwjnjjj.github.io/smart-token-guard/
Check the keyframe first. A rejected still costs nothing. A rejected 5-second clip has already been paid for.
How verdicts work: measured checks run automatically, and your assistant reviews the returned frames for hands, faces and identity before a render can PASS, so nothing broken slips through to the next paid step.
Plans
Checks reset on the 1st of each month (UTC). One license per person; teams buy one per member. Checkout, tax and
invoices are handled by Polar, the merchant of record. The license key in your Polar receipt is your API key.
Cancel or change plans in the Polar customer portal. Run stg_pricing for the checkout links.
Install (MCP)
Requires uv.
Claude Desktop / Cursor: add to claude_desktop_config.json or ~/.cursor/mcp.json:
Claude Code
VS Code: .vscode/mcp.json → {"servers": {"smart-token-guard": {"type": "stdio", "command": "uvx", "args": [...same...], "env": {...}}}}
Then ask: "Inspect renders/sh010_keyframe.png against refs/kai.png. If it passes, I'll render the clip on Kling
(0.7 USD, fallback Runway)."
Python SDK
HTTP API: POST /v1/inspect (multipart file, optional reference, options JSON), POST /v1/qa-gate,
GET /v1/account with Authorization: Bearer <license key>. See GET /v1/capabilities.
For AI agents (remote MCP and A2A)
No install needed. Media is passed as a public https URL; the server downloads it, analyses it and deletes it.
- Remote MCP (Streamable HTTP):
https://stg-agent-560636228350.asia-east1.run.app/mcpwith headerAuthorization: Bearer <license key>. Tools:stg_inspect_media_url,stg_qa_gate,stg_account,stg_pricing. - A2A: Agent Card at
https://stg-agent-560636228350.asia-east1.run.app/.well-known/agent-card.json, JSON-RPCmessage/sendat/a2a. Send a data part{"media_url": "https://..."}(or text containing a link) to inspect, or{"skill": "qa-gate", ...}for a decision. - Same plans and monthly checks as above. URLs must be public https hosts; private and internal addresses are refused.
Limits and privacy
- Up to 32 MB, 60 seconds and 1080p per file (JPEG, PNG, WebP, MP4, MOV, WebM, MKV). 30 requests per minute.
- Files are uploaded to the SmartTokenGuard API (Google Cloud), analysed in a temporary file, and deleted before the response is sent. Nothing is stored and nothing is used for training.
- The API receives your license key and the file. Project ledgers stay on your computer (
~/.smart-token-guard/). - Measured checks catch technical render failures. They do not certify anatomy, identity, copyright or story quality.
Support
Refunds, invoices and cancellation: Polar customer portal (link in your receipt). The client code in this repository is MIT licensed; the hosted API requires a paid license.
來源:README.md,提交 9ab30ec
工具
0版本歷史
1- v1.2.2最新Sep 16, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具必需15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分