# SmartTokenGuard [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/nwjnjjj/smart-token-guard  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/smarttokenguard

## Description
Stop paying for broken AI video renders: QA checks and PASS/RETRY/SWITCH/HALT decisions. Paid plans.

## Tools
Capabilities this server exposes over MCP:

- **stg_pricing** — Plans, prices and checkout links for SmartTokenGuard. No license needed.
- **stg_account** — Check the configured license: who it is licensed to, checks used and checks remaining.
- **stg_inspect_render** — 
    Measure a rendered image or video (local path, max 32 MB / 60 s / 1080p): blur, exposure, black and frozen frames,
    flicker, hard cuts, impacts and flashes, and colour/lighting drift against `reference_image`. Uses 1 check.
    Returns a JSON report plus review frames — look at them for anatomy/identity defects, then call stg_qa_gate.
    
- **stg_detect_events** — Frames and times of impacts, flashes and cuts in a video — for placing sound effects in an editor. Uses 1 check.
- **stg_qa_gate** — 
    Decide what to do with a render: PASS / NEEDS_VISUAL_REVIEW / RETRY_SAME_MODEL / SWITCH_TO_FALLBACK / HALT /
    HALT_BUDGET, with concrete fixes (negative-prompt terms, lower motion, new seed). technical_issues: the `issues`
    array from stg_inspect_render. semantic_defects: what you saw in the review frames ("other" + notes if unlisted).
    Records the attempt and its cost in a local project ledger. Free (needs a license, uses no checks).
    
- **stg_spend_report** — What a project spent on renders, attempts per shot, first-try pass rate and failed renders caught. Local only.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "smarttokenguard": {
    "command": "uvx",
    "args": ["--from","git+https://github.com/nwjnjjj/smart-token-guard","smart-token-guard"],
    "env": {
      "STG_LICENSE_KEY": ""
    }
  }
}
```

**Requires environment variables:** `STG_LICENSE_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What SmartTokenGuard MCP server does

SmartTokenGuard MCP server evaluates still images and video clips before an AI video workflow proceeds to another paid stage. It can inspect keyframes and rendered media for technical problems including soft focus, blur, overexposure, underexposure, black frames, frozen sections, flicker, hard cuts, impacts, flashes, and color or lighting changes relative to a reference image. The inspection response includes review frames so an assistant can examine hands, faces, and identity.

The service is intended for workflows using tools such as ComfyUI, Kling, Runway, Veo, Hailuo, and Seedance, but the material does not require a specific video-generation provider. A rejected still can be identified before paying for a video clip.

## How it works

Measured inspection results feed the QA gate along with defects observed by the assistant. The gate returns one of five outcomes: PASS, RETRY_SAME_MODEL, SWITCH_TO_FALLBACK, HALT, or HALT_BUDGET. It can also provide corrective actions, such as negative-prompt terms, reduced motion, or a different seed. The decision can include a render model, cost, and fallback model.

The local client keeps a per-project spending ledger on the user's computer. Spend reports expose total project cost, attempts per successful shot, first-attempt pass rate, and keyframes rejected before video generation. Event detection identifies exact frames for impacts, flashes, and cuts, which can help place sound effects.

## Setup and configuration

The local MCP server requires uv. Claude Desktop and Cursor can launch it with `uvx` from the Git repository, while Claude Code can register the same command with `claude mcp add`. VS Code uses an `.vscode/mcp.json` stdio entry. Each local configuration supplies `STG_LICENSE_KEY`; the license key from the Polar receipt is the API key.

A Python client is also available from the Git repository. Its `Client` reads the same environment variable and exposes inspection and QA-gate operations. The HTTP API provides `/v1/inspect`, `/v1/qa-gate`, `/v1/account`, and `/v1/capabilities`.

Remote use is available through Streamable HTTP at the documented MCP endpoint, using a Bearer license key. Remote inspection accepts public HTTPS media URLs, downloads the files for analysis, and removes them afterward. A2A access is also documented through the agent card and JSON-RPC endpoint.

## Tools and capabilities

The SmartTokenGuard MCP server exposes these local tools:

- `stg_inspect_render` measures image or video defects and returns review frames.
- `stg_qa_gate` produces a render decision and corrective actions while updating the spend ledger.
- `stg_detect_events` locates impacts, flashes, and cuts.
- `stg_spend_report` summarizes project spending and pass statistics.
- `stg_account` and `stg_pricing` provide license and plan information.

The remote MCP interface lists URL-based inspection, QA gating, account, and pricing tools. Plans provide 300 or 3,000 checks per month, depending on the selected tier.

## Limitations and notes

Each file is limited to 32 MB, 60 seconds, and 1080p, with JPEG, PNG, WebP, MP4, MOV, WebM, and MKV supported. The service allows 30 requests per minute. Remote URLs must be publicly reachable HTTPS addresses; private and internal addresses are refused.

Uploads go to the hosted API, are analyzed in a temporary file, and are deleted before the response is sent. The documentation states that files are not stored or used for training. Project ledgers remain under `~/.smart-token-guard/` locally. Technical checks do not certify anatomy, identity, copyright, or story quality. The repository client is MIT licensed, while the hosted API requires a paid license.

_Full upstream README: https://allmcps.com/mcp/smarttokenguard/readme_

