roku-raf-ad-tool
Builds and audits Google Ad Manager and Google DAI VOD/live ad requests, emulates Google DAI endpoints, and can proxy or forward ad beacons to Google Ad Manager.
Provides tools for scanning Roku BrightScript/SceneGraph channels, sideloading and attaching to Roku devices, profiling memory and VRAM, running certification/chaos suites, and controlling RAF ad flows.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Roku RAF Ad Tool
Unified engineering, debugging, and certification workbench for the Roku Advertising Framework (RAF) — built for both humans (5-tab Web Workbench + Roku SceneGraph TV UI) and AI agents (raf --json CLI, MCP server, /llms.txt, and OpenAPI).
Covers static BrightScript channel scanning, CSAI (VAST 2.0–4.2 / VMAP 1.0 / FreeWheel SmartXML), Client-Stitched Pods, Custom Skippable SceneGraph UI, VOD & Live Linear SSAI (#EXT-X-DATERANGE / SCTE-35), MPEG-DASH (.mpd), and Google Ad Manager DAI.

Expected-vs-Actual Beacon & Certification Auditor | Roku Roster, |
|
|
Core Capabilities
1. Validator, Manifest Inspector, Vendor Builder & BrightScript Repo Scanner
Static BrightScript / SceneGraph Channel Scanner (
raf scan-repo): Scans any Roku channel directory (manifest,source/*.brs,components/*.xml,components/*.brs) for missingbs_libs_required=roku_ads_lib, SceneGraph Render-Thread violations, RIDA/Limit-Ad-Tracking privacy leaks, missing Nielsen/OMID metadata, and Roku OS 16 runtime/compiler traps.VAST / VMAP / FreeWheel SmartXML Validator: Unrolls
<Wrapper>chains, expandsROKU_ADS_*macros, previews MP4 creatives, and validates Roku codec, bitrate, pod sequence,skipoffset, and buffet fallback rules.HLS (
.m3u8) & MPEG-DASH (.mpd) Inspector: Parses multivariant & media playlists,#EXT-X-DISCONTINUITY,#EXT-X-DATERANGE,#EXT-X-CUE-OUT,#EXT-X-OATCLS-SCTE35, and DASH<EventStream>cues.Vendor Request Builder & BrightScript Code Generator: Builds and audits ad requests for GAM, Google DAI (VOD & Live), SpringServe, Publica, and FreeWheel (verifying RIDA,
is_lat/dnt/lmt,us_privacy,gpp,correlator) and generates copy-readyRoku_Ads.brsSceneGraph Task snippets.
2. Live Mock Ad, SSAI, Google DAI & Chaos Fault Studio
Live Linear HLS Sliding-Window Server (
/mock/live/master.m3u8) with real-time "Cue Live SCTE-35 / DATERANGE Ad Break Now" injection, plus a 3-Rung (234p/432p/720p) Multi-Ad Stitched ABR Stream (/mock/ssai-abr/master.m3u8), External#EXT-X-DATERANGE↔ RAF Metadata Bridge (/api/ssai/bridge-metadata?manifestUrl=...), and Loopback-to-LAN Stream Relay (/proxy/stream?url=...).Ad Chaos & Network Fault Injector (
/api/chaos/?chaos=): SimulateHTTP 503,HTTP 429,corrupt-xml,empty-vast-303, mid-chain wrapper drops (drop-wrapper-hop), broken MP4 CDNs (media-500), and socket hangs (timeout-hang) to verify Roku channels fall back to content instead of freezing on a black spinner.Google DAI VOD & Live Emulator (
POST /mock/dai/ondemand/...&POST /mock/dai/live/...).Built-in & SQLite-persisted custom VAST/VMAP/Pod/Wrapper/Error endpoints with auto-generated animated commercials, HLS
.tssegments, and MPEG-DASH.mpdstreams.
3. Expected-vs-Actual Beacon Diff, Roku Ad-Load Policy & Certification Auditor
Tag Instrumentation Proxy (
/proxy/tag): Intercepts and optionally forwards (forward=1) beacons and nested VMAP/Wrapper hops from external ad servers (e.g. Google Ad Manager).Roku Ad-Load Certification Policies: Audits VMAP & SmartXML schedules against Roku Certification rules (prohibiting midrolls on
<15mshortFormVideo, enforcing>= 7 minmidroll spacing, and checking pod duration/spot caps).Reconciles expected vs. fired beacons with
±squartile timing drift detection, AdTTFF(ms) startup metrics, and intentional post-skip/early-exit quartile suppression.Evaluates 9 Roku Ad Certification & Privacy Checks: RIDA + Limit Ad Tracking (
LAT=1) leak check,Roku/DVPUser-Agent, Impression/Start parity, Back-button early exit suppression,[ERRORCODE]macro substitution, quartile drift,:8085BrightScript compile/runtime crash detection,:8080Texture VRAM headroom, and LAN firewall reachability.
4. Multi-Roku Roster, :8080 Memory/VRAM Profiler, External Channel Attach & 20-Case Suite Runner
Attach to Your Own Channel (
raf attach): Deep-link cold (/launch) or warm (/input) into any channel already installed indev(contentId+mediaTypeRoku Cert 4.x) without overwritingdev, while monitoring:8085RAF logs and:8080memory/VRAM live.Roku OS
:8080Profiler (raf perf): Sampleschanperf,r2d2_bitmaps, andsgnodesfor live Channel RAM (MB), CPU %, GPU Texture VRAM utilization %, and SceneGraph node counts.Complete sideloadable Roku channel (
roku-channel/) supporting Standard CSAI (showAds), Client-Stitched Pods (constructStitchedStream), Custom SceneGraph Skippable UI (csai-skippable), VOD & Live SSAI (stitchedAdsInit), and Google DAI, plus a toggleable on-TV RAF Debug HUD (*) androRegistrytag bookmarks.SSDP device discovery, pure-Node PKZIP packaging + HTTP Digest sideloading (
/plugin_install),/plugin_inspectscreenshot capture,:8085debug console bridge, and a 20-scenario Automated Certification & Chaos Suite Runner (hardware or--simulatemode).
5. Sessions, Snapshots & HAR Traffic Importer
Stores test sessions in local SQLite (
node:sqlite), imports Charles / mitmproxy.harcaptures (sample included insamples/public-gam-roku-capture.har), and exports.jsonbundles or.mdQA Certification Reports.
Related MCP server: agentguard
Prerequisites & Quick Start
Node.js
>= 22(uses built-innode:sqlite)ffmpeg(optional — automatically generates rich animated 720p commercials, HLS, and DASH media; falls back to valid embedded test clips if absent)
Option A — Run Directly via npx or Global npm Install
# Launch the 5-tab Web Workbench & Mock Ad Server immediately
npx roku-raf-ad-tool
# Or install globally (`raf`, `roku-raf-ad-tool`, and `roku-raf-mcp` binaries)
npm install -g roku-raf-ad-tool
raf scan-repo ./my-roku-channel --json
raf serve --port 4321Option B — Clone from Source
git clone https://github.com/rdaci23/roku-raf-ad-tool.git
cd roku-raf-ad-tool
npm install
cp .env.example .env # Optional: set ROKU_IP and ROKU_DEV_PASSWORD
npm run build
npm startWeb Workbench:
http://127.0.0.1:4321(ornpm run devfor Vite HMR onhttp://localhost:5173)Roku LAN Setup: Ensure your Roku has Developer Mode enabled (
Home 3x, Up 2x, Right, Left, Right, Left, Right) and that your computer's firewall allows inbound TCP port4321from your Roku's LAN IP so the TV can fetch mock/proxied streams.
CLI (raf) & MCP Server
Link the CLI globally with npm link (or run via npm run raf -- ...). Add --json to any command for structured agent output:
raf status --json
raf scan-repo ./roku-channel --json
raf validate "http://127.0.0.1:4321/mock/vast/pod-3-ads.xml" --json
raf inspect-manifest "http://127.0.0.1:4321/mock/ssai/stream.m3u8" --json
raf sideload --ip <roku-ip> --password <dev-password> --json
raf attach --ip <roku-ip> --channel dev --content-id ep-101 --media-type episode --json
raf perf --ip <roku-ip> --json
raf chaos --mode http-503 --json
raf run --ip <roku-ip> --scenario single-preroll --mode csai --screenshot --json
raf suite --simulate --json # Offline CI / agent simulation
raf suite --ip <roku-ip> --json # Full 20-case physical Roku hardware & chaos suite
raf har ./samples/public-gam-roku-capture.har --jsonMCP Stdio Configuration (mcp_config.json)
{
"mcpServers": {
"roku-raf-ad-tool": {
"command": "npx",
"args": ["-y", "--package=roku-raf-ad-tool", "roku-raf-mcp"]
}
}
}Programmatic TypeScript / Node.js SDK
import {
scanRokuChannelRepo,
validateAdTag,
inspectStreamManifest,
auditVendorAdRequestUrl,
generateBrightScriptSnippet,
} from 'roku-raf-ad-tool';
const scan = scanRokuChannelRepo('./my-roku-channel');
const validation = validateAdTag(rawVastXml, { mediaType: 'shortFormVideo', contentLengthSec: 300 });Verification & Releases
npm run verify # Media generation + TypeScript/SDK build + Vitest unit/API/MCP tests
npm run test:e2e # Playwright 5-tab Chromium E2E test
npm run release:dry # Preview next SemVer bump & auto-generated CHANGELOG.md
npm run release # Verify, update CHANGELOG.md, tag, GitHub Release & npm publishLicense
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP tools for 3-vendor AI workflow diagnostics, HAR sandboxes, 50v audits, and rubrics.
Give your AI agent a clear picture of a website's privacy and tracking behavior. CertScore.ai checks public websites for cookies, trackers, consent controls, privacy-policy disclosures, and transport-security signals, then returns prioritized findings, retained evidence, and a shareable report. Use it before a website launch, when reviewing a vendor, or to investigate tracking and consent behavior. Start with CertScore MCP Light—no account, API key, or OAuth setup required. Try asking your agent: "Check my website's privacy and tracking behavior. Show me the top findings, supporting evidence, and report link." The simple three-tool workflow scans the site, checks progress, and retrieves the results. Connect in minutes: https://certscore.ai/mcp/light
Zero-config MCP security scanner for AI-generated apps. 25K+ vulnerability patterns.
AI Visibility and Content Intelligence tools for Claude and MCP-compatible agents.
Related MCP Servers
AlicenseAqualityDmaintenanceEnables AI agents to scan MCP servers and AI packages for vulnerabilities, prompt injection, and supply chain attacks.7AGPL 3.0- AlicenseNot gradedqualityCmaintenanceEnables scanning of AI agent code for security vulnerabilities such as prompt injection, tool abuse, and data exfiltration, directly from MCP-compatible clients like Claude Code.92 PyPI3LGPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to audit URLs or raw HTML for SEO, AEO, and GEO performance, generate llms.txt manifests, and check the tool version via MCP tools.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables an agent or MCP client to scan MCP server configs and AI-agent tool manifests on demand, exposing tools that list detection rules and report hidden prompt injections, data-exfiltration attempts, embedded secrets, deceptive Unicode, unpinned packages and shell-launching tools. Each finding comes with a severity and location so risky tool descriptions can be caught before an attacker exploits them.58 PyPI1Apache 2.0
