> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentcdn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Play a moment in an AI app

> How an AI app searches your moments, answers with time-coded citations, and plays the cited second inside the chat.

With the AgentTV MCP server connected, an AI app can do three things with your library:

1. **Search moments.** Find the moments that answer a question, by what is said, shown and written on screen.
2. **Answer with time-coded citations.** Quote the evidence and cite the second it comes from.
3. **Play the moment.** Load a player card in the chat that starts at that second.

MCP (Model Context Protocol) is how AI apps connect to outside tools. The person turns on a connector once. No code runs on your side.

## The flow

```mermaid theme={null}
sequenceDiagram
  participant P as Person
  participant A as AI app
  participant M as AgentTV MCP
  participant S as Your stream host
  P->>A: Who won the final, and show me the run
  A->>M: search_videos(query)
  M-->>A: Moments with times, evidence, confidence. No stream URL.
  A->>P: Answer with the cited time
  A->>M: get_video_stream(video_id, segment_id)
  M->>M: Check rights, sign a session
  M-->>A: Signed playback, share link, player card
  A->>M: Player asks for the stream
  M->>S: Read segments from your allowed host
  S-->>A: Video plays from the cited second
  A->>M: record_usage(moment)
  M-->>A: Signed usage receipt
```

## Connect a library

Every listed library has its own MCP server. It needs no sign-in and no key.

```text theme={null}
https://mcp.agentcdn.com/c/your-brand/mcp
```

* **Claude:** Settings, Connectors, Add custom connector. Paste the URL.
* **ChatGPT:** Settings, Apps, Advanced settings, turn on Developer mode, then Create. Paste the URL. Developer mode needs a paid plan.
* **Other apps:** see [Connect an MCP](https://docs.agentcdn.com/guides/connect-mcp.md).

Any person you share the URL with can add it. You do not need an app directory listing. See [App directories](https://docs.agentcdn.com/guides/connect-mcp.md#app-directories).

## The tools

| Tool | What it does |
| - | - |
| `search_videos` | Finds the moments that answer a question, best first, with matched text, confidence band and time range. |
| `search`, `fetch` | The same search and full context, in the shape ChatGPT looks for. |
| `get_moment_context` | Transcript, chapters, shot captions, on-screen text and entities for a time window. |
| `get_video_stream` | A signed playback response for one moment, with the inline player card. |
| `get_segment_rights` | The rights for quoting, clipping, training, licensing and playback. |
| `record_usage` | Reports that the app showed, quoted, cited or played a moment. Returns a signed receipt. |
| `get_memory_page` | A cited summary of the library, or of one video, topic or person. |
| `get_creator_profile` | Who owns the library and what it holds. |

The tool descriptions tell the AI app when to use each one. The app decides which to call.

## What plays where

| AI app | Your HLS stream | Notes |
| - | - | - |
| Claude | Plays inline, from the cited second | |
| ChatGPT | Does not play inline | ChatGPT plays MP4 files only today. For an HLS-only video, the card cannot play the file and keeps the link that opens the moment. |

HLS (HTTP Live Streaming) is the streaming format that uses `.m3u8` playlists. Today the player card in the chat is the AgentTV player, so your own web player and its tags do not load inside the chat.

When the AgentTV player plays your video, it reads the stream from your own hosts through AgentTV's stream proxy. Your CDN serves the bytes. The proxy reads only from hosts on your allow list. See [Play in your own player](https://docs.agentcdn.com/guides/playback.md).

## Playback sessions

`get_video_stream` returns a signed session next to `stream_url`, `share_url` and `expires_at`. The session is signed for one video and one start time. Store `video_id` and `segment_id`, not the stream URL. After `expires_at`, call `get_video_stream` again.

Search, `fetch` and the ARV record never return a stream URL. Only `get_video_stream` does, after it checks your rights.

## Tracking

* Every signed play and every reported use is logged against your account.
* The AI app usage report shows which AI apps cited or played your videos, and how often. Read it with `GET /v1/reports/agent-usage`.
* Usage receipts are signed. Check them against the keys at `https://api.agentcdn.com/.well-known/jwks.json`.

See [Measure usage](https://docs.agentcdn.com/guides/measure.md).

## Try it

Ask in a new chat once the connector is on:

* "Find the moment where the winning run starts, and play it."
* "What happened in the second set? Cite the times."
* "List every match in this replay with its start time."


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.