Why I built it

Ask AI about a video and the answer often stops at text or a link to the beginning. I built WebMCP Video so ChatGPT can find the exact scene, explain it, and prepare the site's official player at that moment.

Video takes a huge share of our attention. EMARKETER forecasts that video will account for just under half of US digital media time in 2026. DataReportal reports that online adults say they spend 11 hours and 39 minutes with online video each week, 14% more than television, including streaming TV.

For creators and media brands, much of their most valuable knowledge now lives inside video.

If I ask what a motorized exoskeleton looks like, I should see that moment. If I ask about robotic massage, I should not have to scrub through the video to find it.

Multimodal models can analyze video. Repeating that work for every agent visit is slow and costly. The agent may need to fetch the video, transcribe it, inspect the frames, and still return only a summary.

AgentCDN prepares the transcript, visual context, and timing once. WebMCP gives the open page a standard way to share that prepared understanding with an agent. The agent finds and explains the right moment. The page checks current permission and prepares its official player. The person decides when playback starts.

What it does

WebMCP Video gives ChatGPT three tools from the page:

  1. search_this_catalog finds the best matching video moment.
  2. get_moment_context returns what was said and what appeared on screen.
  3. play_moment prepares the official player at the requested time.

The person asks a normal question. ChatGPT uses the page tools. The page updates the same player the person can see. The person presses play when ready.

In the demo, ChatGPT finds a motorized exoskeleton at 46 seconds. On my founder site, it finds robotic massage at 53 seconds. Both results use the official YouTube player already controlled by the page.

Why WebMCP fits

WebMCP connects the agent's answer to the live page and its real player.

Without WebMCP, a viewer must install a separate MCP connection or plugin for each video provider, wait while an agent processes the video again, or open a link and search the timeline manually.

With WebMCP, the capability travels with the page. ChatGPT can use the tools that the open site provides. The site keeps control of its catalog, permission checks, player, and visible state.

People and agents now do different parts of the same task:

The person asks. The agent finds and explains. The page prepares the official player. The person chooses when to watch.

How I built it

The public demo uses TypeScript, document.modelContext, and the YouTube IFrame API. It registers the three tools directly in the browser. It has no backend, model calls, secrets, or bundled media.

Search returns an exact start and end time plus a short-lived moment_ref. Context and playback must use that same reference. The reference is tied to the page and expires after five minutes.

Playback reports only what the browser can prove:

  • cued means the correct video and time are ready.
  • sought means the loaded player reached the requested time.
  • fallback means the page could not confirm either result.

None of these states claim that playback started.

I also shipped the same three WebMCP tools on AgentCDN's production watch page. That version searches a live catalog, checks current permission before playback, delivers an audit outcome, and never returns a raw stream URL.

I then added the tools to the video page on my founder site. The site controls its official player. AgentCDN handles search, context, permission, and the audit outcome.

The public repository contains the complete standalone example, a replaceable YouTube adapter, setup instructions, adversarial browser tests, CI, and an Apache 2.0 license.

What was hard

The hard part was making a WebMCP result match the visible page honestly.

Tool discovery had to work in the supported browser. The descriptions had to guide ChatGPT through search, context, and play in the correct order. Every later call had to use the exact short-lived reference returned by search.

The YouTube player is asynchronous. Accepting a command does not prove that the player selected the correct video or reached the requested time. I added bounded checks for the video ID, requested time, and player state. The page reports cued or sought only after stable browser evidence.

Permission can also change between search and playback. The production version checks it again before acting. Expired, altered, cross-page, and denied references fail closed.

Finally, the agent and the person must see the same result. Each tool updates structured output for ChatGPT and visible state on the page. This made browser testing as important as API testing.

What I learned

WebMCP works best when tools describe useful user actions, not internal API endpoints.

The agent should understand the question and select a moment. The page should control the player, check current permission, and report what actually happened.

For video, a valid data response is not enough. The visible player is part of the result.

What is next

First, I will add adapters for more official players, content management systems, and video platforms, including WordPress and Brightcove. The public tool can remain play_moment while AgentCDN translates the request for each supported player.

Next, I plan to add controlled video editing tools through WebMCP. An agent could draft a clip, adjust its timing, add captions, and render a preview. AgentCDN would keep permissions, attribution, and version history attached.

Longer term, this could support personalized video experiences with agent as an editor and host assembling video content based on individual interests, while keeping the original source and attribution attached, so original authors get credited.

These are roadmap items. This submission proves exact search, prepared transcript and visual context, current permission checks, and official YouTube player preparation.

Built With

Share this project:

Updates

Submission history