Sight Cache
Provides tools for inspecting camera history stored in Cloudflare R2 and processed by Cloudflare Images, using Cloudflare D1 for device activity and Cloudflare Access for authentication. Enables AI agents to list active devices, retrieve contact sheets, list frames, compare selected frames, and access original JPEGs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Sight Cacheshow me the driveway camera's contact sheet from the last hour"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Sight Cache — A serverless camera history pipeline built on Cloudflare that gives AI agents a compact, inspectable visual memory through MCP.
How it works
Administrator <--> Cloudflare Access <--> Admin Worker
+--> D1 devices + token hashes
`--> Collector Token (shown once)
RTSP camera --> FFmpeg Collector --> Ingest Worker --> D1 activity
`--> R2 original JPEGs
MCP client <--> Access Managed OAuth <--> Image Worker
^ | |
Hourly cron --> Queue ---------------------' | +--> Cloudflare Images
R2 original JPEGs ----------------------------' `--> R2 contact sheets + manifestsRelated MCP server: C2PA Intake Verifier MCP
Components
Component | Runtime | Responsibility |
Node.js or Docker | Capture and upload RTSP frames | |
Cloudflare Workers | Manage devices, issue Collector Tokens, rotate credentials, and disable access | |
Cloudflare Workers | Authenticate collectors, validate image uploads, and store original frames | |
Cloudflare Workers | Build contact sheets and expose protected MCP inspection tools |
Cloudflare services
This project uses the following Cloudflare services and Workers features:
Service or feature | Used by | Purpose |
Cloudflare Workers | Admin, Ingest, and Image Workers | Run the administration interface, image ingestion API, MCP endpoint, schedules, and Queue handlers |
Cloudflare Access | Admin and Image Workers | Protect administration and MCP; MCP uses Managed OAuth, and the Worker validates the Access JWT assertion |
Cloudflare D1 | Admin, Ingest, and Image Workers | Store devices, Collector Token hashes, and activity timestamps, and provide recent active-device information |
Cloudflare R2 | Ingest and Image Workers | Store original images, contact sheets, and manifests |
Cloudflare Images | Image Worker | Resize and crop original frames, then compose JPEG contact sheets |
Cloudflare Queues | Image Worker | Deliver hourly contact-sheet jobs |
Cron Triggers | Image Worker | Enqueue contact-sheet jobs for the previous complete hour near the start of each hour |
Workers Static Assets | Admin, Ingest, and Image Workers | Serve administration CSS and JavaScript, service-page assets, and the blank contact-sheet canvas |
MCP inspection
The Image Worker exposes a stateless /mcp endpoint protected by Cloudflare Access Managed OAuth.
Tool | Purpose |
| List active devices and their latest upload time |
| Return one JPEG contact sheet with exact metadata for each slot |
| List exact capture timestamps in an interval of up to five minutes |
| Compare 2–10 selected exact frames in one derived JPEG |
| Return the unmodified JPEG at an exact capture timestamp |
| When enabled, create temporary download URLs for up to 20 original frames |
Hourly windows contain 60 one-minute samples across six contact sheets. Minute windows contain 12 five-second samples across two contact sheets and are built on the first request after a five-minute finalization delay.
Storage layout
Object keys use the normalized UTC capture time:
frames/{deviceId}/{YYYY}/{MM}/{DD}/{HH}/{mm}/{UTC_TIMESTAMP}.jpg
contact-sheets/v1/{deviceId}/{YYYY}/{MM}/{DD}/{HH}/
|-- manifest.json
|-- generations/{generationId}/sheet-{NN}.jpg
`-- {mm}/
|-- manifest.json
`-- generations/{generationId}/sheet-{NN}.jpgThe hour-level manifest publishes scheduled hourly sheets. A minute directory contains its on-demand sheets.
Requirements
Node.js 24.19.0 or later
FFmpeg, or Docker with Compose, for the Collector
A reachable RTSP camera stream
Cloudflare Workers Paid plan
Getting started
Install all workspace dependencies and run the available type checks:
npm ci
npm run typecheckBefore deployment, provision the shared D1 database and R2 bucket, the
contact-sheet Queues, and the required Access applications, then complete each
wrangler.jsonc for your environment.
Apply the D1 migration from the repository root:
# Local D1
npm run dev:migrate --workspace admin-worker
# Remote D1
npm run prod:migrate --workspace admin-workerRun each service in its own terminal:
npm run dev --workspace admin-worker
npm run dev --workspace ingest-worker
npm run dev --workspace image-worker
npm start --workspace @sight-cache/collectorCreate a device in the Admin Worker, save the Collector Token when it is shown,
then configure apps/collector/.env from apps/collector/.env.example with the Ingest
URL, token, and RTSP URL. See each component guide for its detailed
configuration and behavior.
After completing the account-specific configuration and applying the remote D1 migration, deploy the Workers:
npm run deploy --workspace admin-worker
npm run deploy --workspace ingest-worker
npm run deploy --workspace image-workerSecurity and retention
Protect the Admin Worker and every route that can reach
/mcpwith the matching Cloudflare Access applications.Every identity admitted by the MCP Access policy can currently inspect every active device. Keep that policy restricted until per-device authorization is implemented.
Before enabling image ingestion, consider configuring the shared R2 bucket with a lifecycle rule that expires objects after 14 days.
Documentation
This server cannot be deployed
Maintenance
Related MCP Connectors
A paid remote MCP for HyperFrames, built to return verdicts, receipts, usage logs, and audit-ready J
Create images & video from any MCP agent — 17 models, spend limits, one URL.
Remote MCP for C2PA intake verifier MCP, structured receipts, audit logs, and reviewer-ready evidenc
Zero-secret MCP gateway for AI agents: risk-scored, audited calls with human-in-the-loop approval.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server that gives AI agents instant access to public camera feeds worldwide via simple HTTP GET, saving snapshots to disk.1328 npm4MIT
- AlicenseNot gradedqualityDmaintenanceA hosted remote MCP server for verifying C2PA intakes, classifying source risk, issuing media receipts, and exporting intake logs. Designed for AI governance, trust and safety, and compliance teams.MIT
- AlicenseNot gradedqualityAmaintenanceA local, read-only MCP server that lets AI agents inspect and analyze photo libraries by scanning files, aggregating EXIF stats, finding duplicates, scoring blur, and generating cull reports without uploading any data.MIT
- FlicenseNot gradedqualityBmaintenanceMCP server enabling AI agents to perform autonomous photographic color science and screenshot annotation with deterministic computer vision, film emulation, and real-time live preview.1-