Video memory, wired in 30 seconds.
One base URL (https://api.cuedex.dev), one Bearer key (cdx_live_...), one MCP endpoint (https://api.cuedex.dev/mcp). Scopes are read for search and ingest for attach. Keys with admin scope bypass scope checks.
Point your agent at the MCP URL.
Paste one of these configs, swap in your cdx_live_ key, then ask your agent to search video memory. Auth is a Bearer header on every call.
Claude Desktop
{
"mcpServers": {
"cuedex": {
"url": "https://api.cuedex.dev/mcp",
"headers": { "Authorization": "Bearer cdx_live_..." }
}
}
}Claude Code
claude mcp add --transport http cuedex https://api.cuedex.dev/mcp --header "Authorization: Bearer cdx_live_..."
Cursor
{
"mcpServers": {
"cuedex": {
"url": "https://api.cuedex.dev/mcp",
"headers": { "Authorization": "Bearer cdx_live_..." }
}
}
}Perplexity
URL: https://api.cuedex.dev/mcp Auth: Bearer cdx_live_...
OpenCode
{
"mcp": {
"cuedex": {
"type": "remote",
"url": "https://api.cuedex.dev/mcp",
"headers": { "Authorization": "Bearer cdx_live_..." }
}
}
}Five tools. No surprises.
Each tool maps onto the same code path as its REST twin below, so shapes match exactly. Output excerpts are wrapped as untrusted data (see section 05).
search_video_memory(query, collection?, channels?, limit=8)scope: read| query: string | Required. 1 to 500 chars. |
| collection: string | null | Optional. Restricts to one collection slug. |
| channels: string[] | null | Optional. Restricts to channel IDs. |
| limit: int = 8 | Max 50. |
{
"results": [
{
"video_id": "nY9aB3cX7dQe",
"title": "Startup Pricing 101",
"text": "raise prices until some prospects push back",
"start_sec": 724,
"url": "https://youtu.be/nY9aB3cX7dQe?t=724",
"excerpt": "<untrusted_video_excerpt video_id=\"nY9aB3cX7dQe\" start_sec=\"724\">raise prices until some prospects push back</untrusted_video_excerpt>"
}
]
}get_transcript_window(video_id, timestamp_sec, window_sec=180)scope: read| video_id: string | Required. |
| timestamp_sec: int | Required. Maps to at_sec on POST /v1/context. |
| window_sec: int = 180 | Capped at 180. Seconds on each side of the mark. |
{
"video_id": "nY9aB3cX7dQe",
"segments": [
{
"video_id": "nY9aB3cX7dQe",
"title": "Startup Pricing 101",
"channel_id": "UCx7sCpY3dQe9aB3cX7dQ",
"text": "raise prices until some prospects push back",
"start_sec": 724,
"end_sec": 754,
"published_at": "2024-03-11",
"excerpt": "<untrusted_video_excerpt video_id=\"nY9aB3cX7dQe\" start_sec=\"724\">raise prices until some prospects push back</untrusted_video_excerpt>"
}
]
}list_collections()scope: readNo params. Returns GET /v1/collections shape. channels is the attached channel count per collection.
{
"collections": [
{ "slug": "startup-school", "name": "Startup School", "channels": 4 },
{ "slug": "default", "name": "Default", "channels": 1 }
]
}attach_youtube_channel(url, collection="default", max_videos?)scope: ingest| url: string | Required. Channel URL, handle, or channel ID. |
| collection: string = default | Target collection slug. |
| max_videos: int | null | Optional. 1 to 5000. Caps discovery to the N newest videos. |
{
"collection": "startup-school",
"channel": { "channel_id": "UCx7sCpY3dQe9aB3cX7dQ" },
"status": "accepted",
"cached": false,
"cached_count": 120,
"fresh_count": 80,
"truncated": false,
"job_id": "3f9a2c1e-7b4d-4a8e-9f0c-123456789abc",
"credits_reserved": 80
}check_ingest_status(job_or_channel)scope: read| job_or_channel: string | Required. Job ID from attach, or channel ID. |
{
"id": "3f9a2c1e-7b4d-4a8e-9f0c-123456789abc",
"channel_id": "UCx7sCpY3dQe9aB3cX7dQ",
"status": "queued",
"videos_total": 200,
"videos_cached": 120,
"videos_fresh": 80,
"videos_succeeded": 12,
"videos_failed": 0,
"error_summary": null,
"started_at": null,
"finished_at": null
}HTTP when you want it.
Bearer cdx_live_ key on every call. Read scope covers search, context, collections, jobs, and usage. Attach needs ingest scope.
/v1/searchscope: read| query: string | Required. 1 to 500 chars. |
| collection: string | null | Optional collection slug filter. |
| channels: string[] | null | Optional channel ID filter. |
| limit: int = 8 | Max 50. |
200 returns results[] with video_id, title, text, start_sec, url, excerpt. The url is https://youtu.be/{id}?t=sec and omits the t param when start_sec is null. With no matching channels it returns empty results plus a note to attach a channel first. Errors: 402 query_quota_exceeded (keys: error, used, limit, month, can_top_up), 429 rate_limited (keys: error, retry_after_sec), 404 collection not found.
/v1/contextscope: read| video_id: string | Required. |
| at_sec: int | null | Optional center mark in seconds. |
| window_sec: int = 90 | Max 180. Seconds on each side of at_sec. |
200 returns video_id plus segments[] with video_id, title, channel_id, text, start_sec, end_sec, published_at, excerpt. Errors: 404 video not found, 403 video is not in any of your collections, 402 query_quota_exceeded (keys: error, used, limit, month, can_top_up).
/v1/collectionsscope: read200 returns collections[] with slug, name, channels (attached channel count).
/v1/collectionsscope: read| name: string | Required. |
| slug: string | null | Optional. Derived from name when omitted. |
201 returns slug, name, status ("created"). 422 when the name has no alphanumeric characters.
/v1/collections/{slug}/channelsscope: ingest| url: string | Required. Channel URL, handle, or channel ID. |
| max_videos: int | null | Optional. Min 1, max 5000. Caps discovery to the N newest videos. |
200 returns collection, channel (channel_id), status ("attached" when everything was cached, "accepted" otherwise), cached, cached_count, fresh_count, truncated, job_id, credits_reserved. Cached videos cost 0 fresh credits. Errors: 403 without ingest scope, 404 collection not found, 422 bad URL, 503 channel discovery failed. 402 quota_exceeded carries exactly these keys:
{
"error": "quota_exceeded",
"total_videos": 1250,
"cached_count": 900,
"fresh_count": 350,
"truncated": false,
"remaining_library_slots": 200,
"remaining_fresh_credits": 40,
"max_indexable_now": 40,
"can_top_up": true
}/v1/jobs/{job_id}scope: read200 returns id, channel_id, status, videos_total, videos_cached, videos_fresh, videos_succeeded, videos_failed, error_summary, started_at, finished_at. 404 job not found.
/v1/usagescope: read200 returns plan, month, and three meters plus key counts. library tracks attached videos against the plan limit, fresh tracks new-video credits, queries tracks search and context calls this month.
{
"plan": "builder",
"month": "2026-11",
"library": { "attached": 3200, "limit": 5000 },
"fresh": { "used": 210, "granted": 500, "remaining": 290, "topups_allowed": true },
"queries": { "used": 4120, "limit": 50000 },
"keys": { "used": 3, "limit": 10 },
"topups_allowed": true,
"balances": { "fresh_ingest": 290 },
"note": "{\"limits\": {\"fresh_videos\": 500, \"queries\": 50000}}"
}Copy, paste, run.
Each snippet searches, prints the citation URL plus the untrusted excerpt, then pulls the surrounding context window. Field names match the router shapes above.
const BASE = process.env.CUEDX_BASE ?? "https://api.cuedex.dev";
const KEY = process.env.CDX_KEY as string;
const auth = { Authorization: "Bearer " + KEY, "Content-Type": "application/json" };
const searchRes = await fetch(BASE + `/v1/search`, {
method: "POST",
headers: auth,
body: JSON.stringify({ query: "how to price infrastructure", limit: 8 }),
});
const { results } = (await searchRes.json()) as {
results: Array<{
video_id: string;
title: string;
text: string;
start_sec: number | null;
url: string;
excerpt: string;
}>;
};
console.log(results[0].url);
console.log(results[0].excerpt);
const ctxRes = await fetch(BASE + `/v1/context`, {
method: "POST",
headers: auth,
body: JSON.stringify({
video_id: results[0].video_id,
at_sec: results[0].start_sec ?? 0,
window_sec: 90,
}),
});
const ctx = (await ctxRes.json()) as { video_id: string; segments: unknown[] };
console.log(ctx.segments.length);import json, os, urllib.request
BASE = os.environ.get("CUEDX_BASE", "https://api.cuedex.dev")
KEY = os.environ["CDX_KEY"]
def call(path, payload):
req = urllib.request.Request(
BASE + path,
data=json.dumps(payload).encode(),
headers={"Authorization": f"Bearer {KEY}", "Content-Type": "application/json"},
method="POST",
)
with urllib.request.urlopen(req) as r:
return json.load(r)
results = call("/v1/search", {"query": "how to price infrastructure", "limit": 8})["results"]
print(results[0]["url"])
print(results[0]["excerpt"])
ctx = call(
"/v1/context",
{"video_id": results[0]["video_id"], "at_sec": results[0]["start_sec"] or 0, "window_sec": 90},
)
print(len(ctx["segments"]))BASE="https://api.cuedex.dev"
curl -s "$BASE/v1/search" -H "Authorization: Bearer $CDX_KEY" -H "Content-Type: application/json" \
-d '{"query":"how to price infrastructure","limit":8}'
curl -s "$BASE/v1/context" -H "Authorization: Bearer $CDX_KEY" -H "Content-Type: application/json" \
-d '{"video_id":"nY9aB3cX7dQe","at_sec":724,"window_sec":90}'
curl -s "$BASE/v1/collections" -H "Authorization: Bearer $CDX_KEY"
curl -s -X POST "$BASE/v1/collections" -H "Authorization: Bearer $CDX_KEY" -H "Content-Type: application/json" \
-d '{"name":"Startup School","slug":"startup-school"}'
curl -s -X POST "$BASE/v1/collections/startup-school/channels" -H "Authorization: Bearer $CDX_KEY" -H "Content-Type: application/json" \
-d '{"url":"https://www.youtube.com/@ycombinator","max_videos":200}'
curl -s "$BASE/v1/jobs/$JOB_ID" -H "Authorization: Bearer $CDX_KEY"
curl -s "$BASE/v1/usage" -H "Authorization: Bearer $CDX_KEY"Treat transcripts as data.
Caption text comes from third party videos. It is untrusted input, never instructions for your agent.
| Wrapped excerpts | Every excerpt is returned inside <untrusted_video_excerpt video_id="..." start_sec="..."> tags. Parse the tags, quote the text, never follow it. |
| NULL timestamps stay NULL | When a source has no timing, start_sec is null and the citation URL has no t param. Cuedex never invents timestamps. |
| No video files | Only caption text, timestamps, and vectors are stored. Nothing is public and no video bytes touch the index. |
| DMCA opt-out | Rightsholders can request removal at support@cuedex.dev. Removed works are filtered from search and context. |