Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/Qencode-Corp/mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/qencode-corp/mcp/player-widget-cache)<a href="https://agentmods.dev/rules/qencode-corp/mcp/player-widget-cache"><img src="https://agentmods.dev/badge/rules/qencode-corp/mcp/player-widget-cache/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/qencode-corp/mcp/player-widget-cache"><img src="https://agentmods.dev/badge/rules/qencode-corp/mcp/player-widget-cache.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01404 | $0.01404 |
| Opus 5.5 | $0.00562 | $0.00562 |
| Sonnet 5.5 | $0.00281 | $0.00281 |
| Haiku 4.5 | $0.00140 | $0.00140 |
Grade A, and why
player-widget-cache scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 15d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Player widget / MCP cache keys (ChatGPT)
ChatGPT caches MCP tools/list and ui:// widgets. Stale cache = missing tools, Failed to fetch template, or old HLS/CSP bugs.
The full host matrix (ChatGPT / Claude / Cursor / Grok / Codex), CSP lists, HLS routing, sizing, and the Grok proxy scrollbar are in docs/mcp-widgets.md. Read that before another CSS/height pass. This rule is the bump-the-version checklist plus the two facts that have cost days more than once.
Cache key is a hand-bumped constant
WIDGET_VERSIONinwidgets.pyis a hand-bumped literal, andPLAYER_WIDGET_URIis built from it.JOBS_WIDGET_VERSIONinjobs_widget.pyis a separate literal for the jobs-list card. Bump it when that HTML or its_metachanges — not when the player changes.- Bump it in the same change that touches the player HTML, its CSP/
_meta, or/player-embed.html. Nothing busts the cache automatically. - A per-deploy id (Unix timestamp) was tried and removed: it changed the URI and every tool title on each restart, which showed up as version noise in the client's tool-permission list. Restarts vastly outnumber widget changes.
- URI template
ui://widget/qencode-player-{version}.htmlserves current HTML for any older id, including the timestamp-based ones already cached by live sessions — do not append them toPLAYER_WIDGET_LEGACY_URIS.
HLS is black / "CSP off" — check the SDK first, not the widget
Hard facts (OpenAI Apps SDK + MCP Apps spec):
- MSE/HLS requires
media-src blob:(+worker-src blob:). There is no way around it —srcObjectforMediaSourceis Safari-only. openai/widgetCSParrays accept https origins only. Puttingblob:/data:there fails the whole connector with 424 (every tool dies, not just the player). This one is hard — never put a scheme-source there.ui.csp(Claude/Cursor) does carryblob:, because those hosts blockframe-src, so in-widget MSE is their only HLS path. The earlier claim that a scheme-source poisons that allowlist came from prod while it ranmcp 1.19, where_metawas never sent at all — the list was not poisoned, it never arrived. If it ever does poison, the widget sayspolicy LACKS player-static.openai/widgetDomainmust be set, or ChatGPT has no sandbox origin to bind the policy to and applies none ofopenai/widgetCSP(this is what the "CSP off" badge means). Never mirror it asui.domain— Claude derives that itself and rejects a server-supplied value.- So inline HLS in the ChatGPT sandbox is only possible via
frame_domains→ nested/player-embed.htmlon the RS origin, which sets its own CSP. - Claude/Cursor block
frame-src, so routing them through the embed breaks HLS that would have played.open_playergatesprefer_nested_embedon the host: ChatGPT gets the nested embed, everyone else mounts MSE in-widget. - A manifest must be served from a public URL. A presigned one plays the
playlist and 403s every relative segment, which looks like an endless spinner
with nothing in any log.
open_playerrejects those (_require_self_contained_manifest);get_download_urlalways presigns, so it is the wrong tool for a manifest.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 15d ago First seen · 86 lines · 1,404 tokens per session scan A f866668a70d9
player-widget-cache is a cursor rule published in the GitHub repository Qencode-Corp/mcp (1 stars, last pushed 15d ago), licensed MIT. It adds 1,404 tokens to every session, about $0.0056 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-22.
Other cursor rules, from other repositories
css-render-blocking-diagnosis
Cursor rule "css-render-blocking-diagnosis" from adobecom/da-express-milo, covering css render-blocking diagnosis & resolution, critical learning from 98 pagespeed achievement, primary diagnostic protocol, step 1: css blocking symptom recognition and step 2: css loading sequence audit.
lint-config
OXC and React Doctor config rationale - .oxlintrc.json options, front override, better-tailwindcss rule set, oxfmt class order.
talos
Hotfix express lane — direct fixes for small bugs, CSS, typos, minor logic. No TDD ceremony, no orchestration overhead. Standalone, no subagents. Escalates complex issues to zeus.
ultracite
Ultracite Rules - AI-Ready Formatter and Linter.
error-handling-and-validation
A code-quality guide for handling errors, invalid inputs, edge cases, preconditions, logging, and user-friendly error messages.
shadcn-tailwind-guide
A guide to building new components with shadcn/ui and Tailwind CSS, a utility-based system for styling interfaces.