Give Codex YouTube video access
Two commands give the Codex CLI 21 tools for reading YouTube videos — transcripts with timestamps it can cite, and the frames of the video when the answer is on screen.
The short answer
codex mcp add vidwords --url https://vidwords.com/mcp
codex mcp login vidwords
The first adds the server to ~/.codex/config.toml; the second opens a browser to sign in to VidWords or create a free account. If your address needs confirmation, open the link in your inbox or enter its 6-digit code in the VidWords banner, then return to approve the connection. You can resend the email in that banner. If the flow expired, run codex mcp login vidwords again. Codex stores the credential and refreshes it itself. Nothing secret is written to the config file.
The same thing by hand is a two-line block:
# ~/.codex/config.toml
[mcp_servers.vidwords]
url = "https://vidwords.com/mcp"
Put it in .codex/config.toml inside a trusted project instead to scope it to that project.
Headless: a token instead of a browser
CI jobs and containers cannot open a sign-in page, so they send the API token as a header. Create a free account, verify the email, copy a key from the API & MCP page, and use env_http_headers:
# ~/.codex/config.toml
[mcp_servers.vidwords]
url = "https://vidwords.com/mcp"
env_http_headers = { "Authorization" = "VIDWORDS_MCP_AUTH" }
export VIDWORDS_MCP_AUTH="Basic YOUR_API_TOKEN"
Do not reach for bearer_token_env_var. It is the obvious-looking field and it sends Authorization: Bearer <value>, but a VidWords API token is sent with Basic — the token as-is, not a base64 user:pass pair. env_http_headers is the escape hatch for exactly this, and it keeps the token in the environment rather than in a file you might commit.
Using it
- Give it the link. "Summarise the keynote" invites an answer from memory; the URL makes the tool the obvious route.
- Ask for timestamps. That steers it to
search_transcriptinstead of a fullget_transcript, so you get the moments that answer the question rather than two hours of text in the context window. - Screen recordings. When the code or config is only on screen,
analyze_videoreads the frames andask_videoanswers with citations it has checked against them.
The 21 tools
| Tool | What it does | Cost |
|---|---|---|
search_transcript | Find where a video — or a list of up to 25 — discusses something; returns timestamps and deep links. | 1 Cloud Request per new video |
get_transcript | Full text for up to 25 videos, a span between timecodes, or a page at a time with maxChars. | 1 Cloud Request per new video |
search_library · list_library | Search and list the transcripts you have already saved. | Free |
list_languages | A video's caption tracks, and which ones transcribe the speech. | Free |
list_channel_videos | Recent uploads for a channel. | 1 Cloud Request · Starter and up |
list_watchlists · watchlist_activity | Radar monitoring — channels you track and what they published. | Free |
create_watchlist · add_watchlist_channel · check_watchlist · preview_watchlist_filters | Set up Radar: create a watchlist, add channels, check them for new uploads now, and test title filters before saving them. | Free |
update_watchlist · set_radar_paused | Rename, pause or filter a watchlist, or pause all of Radar. Turning on automatic analysis spends AI Units at Watch rates, so an assistant should only do it when you ask. | Free; automatic analysis is billed |
remove_watchlist_channel · delete_watchlist | Stop monitoring a channel, or delete a watchlist and the videos it recorded. | Free |
account | Plan and remaining Cloud/AI balances. | Free |
analyze_video | Frame-level analysis — slides, charts, demos, on-screen text. estimateOnly quotes the price first. | 1 Cloud Request, then AI Units per minute: Standard analysis 4, Deep 30, Quick 2.8 |
list_analyses | Your AI Watch analyses, newest first, so one can be reopened. | Free |
get_analysis | Read a finished analysis; waitSeconds waits for it. | Free |
ask_video | Ask against a finished analysis; citations verified or dropped. | 6 AI Units per question |
Re-reading a video the account already has is free — another time range, another page, or a search after a fetch — and every metered result reports what it charged.
If it does not connect
- 401 after
codex mcp add. Expected until you runcodex mcp login vidwords. - 401 with a token. The header must be
Basic, notBearer— see above. - 403 on every call. The account's email is not verified yet; click the link from the signup email.
- 429 during a wide search. The limit is per minute by plan — 60 on Free, 200 on Starter, 500 on Pro, 1,000 on Team — and a stateless server re-handshakes on every call, so a fan-out across many videos reaches it quickly.