afo-visual-browser-subagent-mcp
Cloudflare-native MCP server for visual evidence and browser investigation, providing deterministic screenshot capture, snapshot generation, and signed artifact retrieval with receipt logging.
README
AFO Visual Browser Sub-Agent MCP
Cloudflare-native visual evidence and browser-investigation service. The current release is deliberately public, read-only, deterministic, and receipt-first.
Phase 1 tools
visual_browser_statuscapture_screenshotcapture_snapshotcapture_multi_viewportenqueue_visual_auditget_visual_receiptget_visual_artifactcreate_visual_artifact_url
Capture reliability behavior
capture_screenshot is a true screenshot-only path. It captures and stores the PNG plus a minimal manifest, navigation timing, page metadata, and cheap console/network counts. It does not call page.content(), generate Markdown, request an accessibility snapshot, serialize full console/network artifacts, or create embeddings.
capture_snapshot and capture_multi_viewport retain the richer evidence pipeline. Text artifacts are limited by encoded UTF-8 byte size, and optional artifact truncation or failure is recorded in artifact_summary and warnings without invalidating a successfully stored screenshot. Successful runs with optional evidence warnings report status: "ok_with_warnings".
Artifact access behavior
get_visual_artifact retrieves only artifacts registered in a persisted run manifest. Callers provide run_id or investigation_id, an artifact_type, and optional viewport and response_mode. Arbitrary object_key, key, and r2_key inputs are rejected.
Small PNGs can be returned as native MCP image content with base64 data and MIME type. Text and JSON evidence is returned inline only below conservative limits. Oversized artifacts return metadata, byte size, SHA-256, and requires_url: true. Sensitive URL query values are redacted before text evidence is returned.
create_visual_artifact_url creates a manifest-bound HMAC-SHA-256 URL with a 10-minute default TTL and a 60-minute maximum. The signed claim covers run ID, artifact type, viewport, and expiry. The private route streams only the R2 object registered by the persisted manifest, returns Cache-Control: private, no-store, and fails closed with HTTP 403 for expiry, tampering, traversal, substitutions, unknown runs, or absent artifacts.
Required initial bindings
- Browser Rendering:
BROWSER - Workers AI:
AI - D1:
DB - R2:
RECEIPTS - Vectorize:
VECTORIZE - Queues:
AUDIT_QUEUE - Analytics Engine:
ANALYTICS - Worker secret:
ARTIFACT_SIGNING_SECRET(minimum 32 characters; never commit its value)
Vectorize, Queues, and Analytics Engine are foundational requirements, not optional roadmap items.
Security boundary
The Worker accepts public https: URLs only. Localhost, private IPv4 ranges, link-local ranges, and private IPv6 ranges are blocked. Query parameters that look like credentials are redacted from receipts.
Before deployment
- Create the D1 database, R2 bucket, Vectorize index, producer/consumer queue, dead-letter queue, and Analytics Engine dataset.
- Confirm the D1 database ID and all binding names in
wrangler.jsonc. - Add
CLOUDFLARE_API_TOKEN,CLOUDFLARE_ACCOUNT_ID, andARTIFACT_SIGNING_SECRETto GitHub Actions or the local environment. - Install
ARTIFACT_SIGNING_SECRETwithwrangler secret put ARTIFACT_SIGNING_SECRET; never place it inwrangler.jsonc, logs, receipts, D1, or analytics. - Apply D1 migrations.
- Run
npm install,npm run check, andnpm test. - Deploy and verify
/status,/tools, MCP initialization, direct artifact retrieval, signed URL retrieval, strict headers, expiry rejection, and component-tampering rejection against persisted Link Lane evidence.
See ROADMAP.md for the complete build order.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.