
Turns YouTube into a queryable research database with 41 tools covering search, transcript analysis, visual search via frame extraction, and playlist indexing. Works immediately without API keys through a three-tier fallback system (YouTube API, yt-dlp, page scraping). The explore pipeline handles full research workflows in one prompt: searches videos, ranks by relevance, reads transcripts, extracts benchmark data, and generates comparison charts. Semantic search uses Gemini embeddings to query across entire playlists by meaning. Visual search pulls keyframes, runs OCR on slides, and lets you search by what appears on screen rather than just spoken content. Includes sentiment analysis, content gap detection, and hook pattern analysis. Zero-config setup wizard auto-detects Claude Desktop and Claude Code.
Your AI can read the web.
Now it can also watch it.
npx vidlens-mcp setup
VidLens is an MCP server that gives your AI agent eyes on video — YouTube, X, TikTok, Instagram, other video pages, or a file on your disk. Paste a link and ask a question. VidLens reads the transcript, looks at the frames, and answers with timestamps you can check. Everything it ingests lands in a library on your own machine, so your agent never has to watch the same video twice.
No API keys to start. Works in Claude Desktop, Claude Code, and Codex. Capable clients can turn VidLens's structured results into native charts, cards, tables, and visual reports in their own response surfaces.
▶ Watch the 1:46 demo on YouTube
Once VidLens is set up, paste any of these into your AI client:
"Search YouTube for M5 Max MacBook Pro reviews. What do reviewers agree on, and where do they disagree?"
VidLens searches, reads the transcripts across reviewers, and synthesizes consensus and disagreement with sources and timestamps.
"Transcribe this video and summarize it: https://x.com/username/status/123..."
A single public X, Instagram, or TikTok video URL usually needs no API key at all. VidLens fetches it, transcribes it, and keeps the transcript so you can ask follow-up questions later — in this session or any future one.
"Find the frame in this video where they show the benchmark chart."
Visual search looks at what is on screen — slides, charts, whiteboards, product shots — and shows the actual frame image with its timestamp in the local browser gallery, not just a text guess.
VidLens returns portable structured evidence: sources, timestamps, scores, OCR, descriptions, provenance, and limitations. Codex, Claude, and other capable clients can compose that evidence into their own native charts, comparison cards, tables, and visual reports.
The presentation belongs to the client rather than an embedded VidLens UI. For extracted-frame inspection, searchVisualContent can also open the browser gallery.
Video sources go in on the left. VidLens ingests them through whichever route works — the YouTube API when a key is configured, yt-dlp, or direct page extraction — and stores the results in a local library: transcripts, frames, and embeddings. Your agents query that library from any MCP client.
Two honesty guarantees are built in:
Everything lives in one directory on your disk. No external database, no Docker. Back it up by copying it; delete it to start fresh.
npx vidlens-mcp setup
The wizard detects Claude Desktop, Claude Code, and Codex, checks the local dependencies VidLens needs, and offers one simple choice:
Press Enter to choose Free, or run npx vidlens-mcp setup --enhanced whenever you want Enhanced capabilities. For Claude Code, setup also registers VidLens in the user MCP registry, installs the shared VidLens workflow skill, and checks the result with claude mcp list when possible.
Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"vidlens-mcp": {
"command": "npx",
"args": ["-y", "vidlens-mcp", "serve"]
}
}
}
Claude Code — prefer the wizard:
npx vidlens-mcp setup --client claude_code
claude mcp list
If you configure it by hand instead, add the same mcpServers.vidlens-mcp entry to ~/.claude.json.
Codex — use the setup helper so the MCP server and bundled VidLens skills are registered together:
npx vidlens-mcp setup --client codex
Fully quit and reopen Claude Desktop (⌘Q, not just close the window) — MCP servers load on startup. For Claude Code, start a new session or run /mcp after setup.
npm install in a checkout does not put the binary on your PATH. Use npm run setup from the checkout, or npm install -g . / npm link if you want the bare vidlens-mcp command while developing.
VidLens is durable memory for video work, not a per-session scratchpad. Everything you import persists on disk under VIDLENS_DATA_DIR: transcript collections, comment collections, downloaded media, and visual indexes. Even the active collection is remembered.
Recall it in one call. At the start of a session, recallWorkspace returns a compact digest of everything already stored, so an agent knows what it has before searching or importing again. Tool descriptions carry the same reminder into every client, so agents check first instead of re-fetching.
Reuse by URL or asset key. An imported social video's transcript can be pulled up again by its original URL or by its asset key — no re-download, no re-transcription.
One shared library across agents. The default data directory is the same for every client, so Claude Desktop, Claude Code, and Codex all share one library — import a video in one, search it from another.
⚠️ Do not put
VIDLENS_DATA_DIRinside Dropbox, iCloud, Google Drive, or any file-sync folder. VidLens uses SQLite (with WAL), and live databases under a file syncer get corrupted or spawn conflict copies. Keep the data dir on a local disk — the default location already does.
For X, Instagram, TikTok, and generic video pages, VidLens uses a capability ladder: it takes the cheapest route that works, and an API key is an uplift, not a prerequisite.
| Route | Cost | Best for | What happens |
|---|---|---|---|
| Local reuse | Free | Anything imported before | recallWorkspace finds the stored transcript or media; nothing is re-fetched |
| Public direct URL | Free | One X status, Instagram reel/post, or TikTok video | yt-dlp tries the canonical post URL anonymously; ffmpeg and local or configured STT handle media with no captions |
| Browser-assisted | Free with a supported host | Finding or verifying a post, or using an existing signed-in session | Your client's browser control captures the canonical URL and visible metadata, then hands the URL back to VidLens |
| Local-file handoff | Free | A video you are permitted to save | Import the saved file for transcription and visual indexing |
| API-enhanced | Provider pricing | Bulk, unattended, or repeatable discovery | Configured ScrapeCreators, Brave, SerpAPI, YouTube, Gemini, or OpenAI capabilities are selected automatically |
Three caveats, stated plainly:
For social and local video work beyond plain download, install ffmpeg (brew install ffmpeg on macOS) — frame extraction, visual indexing, and STT audio chunking need it.
| Tool | What it does |
|---|---|
exploreYouTube | Intent-aware search with multi-query ranking, transcript summaries, structured benchmark data, and background indexing. One call replaces 5–8 individual tool calls. |
| Tool | What it does |
|---|---|
findVideos | Search YouTube by query with metadata |
inspectVideo | Deep metadata — tags, engagement, language, category |
inspectChannel | Channel stats, description, recent uploads |
listChannelCatalog | Browse a channel's full video library |
readTranscript | Full transcript with timestamps and chapters |
readComments | Top comments with likes and engagement |
expandPlaylist | List all videos in any playlist |
| Tool | What it does |
|---|---|
importPlaylist | Index an entire playlist's transcripts |
importVideos | Index specific videos by URL or ID |
searchTranscripts | Natural-language search across indexed content |
listCollections | Browse your indexed collections |
setActiveCollection | Scope searches to one collection |
clearActiveCollection | Search across all collections |
removeCollection | Delete a collection and its index |
| Tool | What it does |
|---|---|
measureAudienceSentiment | Comment sentiment with themes and risk signals |
analyzeVideoSet | Compare performance across multiple videos |
analyzePlaylist | Playlist-level engagement analytics |
buildVideoDossier | Complete single-video deep analysis |
| Tool | What it does |
|---|---|
scoreHookPatterns | Analyze what makes video openings work |
researchTagsAndTitles | Tag and title optimization insights |
compareShortsVsLong | Short-form vs long-form performance |
recommendUploadWindows | Best times to publish for engagement |
| Tool | What it does |
|---|---|
discoverNicheTrends | Momentum, saturation, and content gaps in any topic |
exploreNicheCompetitors | Channel landscape and top performers |
| Tool | What it does |
|---|---|
inspectVideoSource | Resolve YouTube, X, Instagram, TikTok, generic URLs, and local files into source metadata and capability flags |
searchVideoSources | Search native YouTube and local assets, with ScrapeCreators support for TikTok/Instagram plus configurable Brave/SerpAPI/DuckDuckGo fallback |
searchSocialTrends | Search social platforms through ScrapeCreators; returns a ranked list with engagement metrics and importable URLs where available |
importVideoSources | Import URLs or local files into the local media store, optionally building a visual index or transcript |
transcribeVideoSource | Transcribe YouTube, social/generic URLs, and local files via native captions or configured STT |
| Tool | What it does |
|---|---|
downloadAsset | Download or ingest video, audio, or thumbnails from any supported source |
listMediaAssets | Browse stored media files |
removeMediaAsset | Clean up downloaded assets |
extractKeyframes | Extract key frames from videos |
mediaStoreHealth | Storage usage and diagnostics |
| Tool | What it does |
|---|---|
indexVisualContent | Extract frames; run Apple Vision OCR and feature prints, Gemini frame descriptions, and Gemini semantic embeddings |
searchVisualContent | Search frames by meaning and text; returns timestamped evidence and can open the external browser gallery |
findSimilarFrames | Image-to-image frame similarity using Apple Vision feature prints |
Visual search is a dedicated index, separate from transcripts. Every match includes its timestamp, source video, OCR text, and visual description. Local frame paths and file: URLs are removed from MCP results; the browser gallery reads the images locally without exposing those paths to the client.
| Tool | What it does |
|---|---|
importComments | Index a video's comments for search |
searchComments | Natural-language search over the comment corpus |
listCommentCollections | Browse comment collections |
setActiveCommentCollection | Scope comment searches |
clearActiveCommentCollection | Search all comment collections |
removeCommentCollection | Delete a comment collection |
| Tool | What it does |
|---|---|
recallWorkspace | Session-start digest of everything already imported — call first to avoid re-importing |
checkSystemHealth | Full system diagnostic report |
checkImportReadiness | Validate before importing content |
VidLens works without any keys. Add them for scale and reliability:
| Key | What it unlocks | Free? | Where |
|---|---|---|---|
YOUTUBE_API_KEY | Better metadata, comment API, YouTube API search | Google quota applies | Google Cloud Console → enable YouTube Data API v3 → create API key |
GEMINI_API_KEY | Higher-quality embeddings for semantic and visual search, frame descriptions | Provider pricing and limits apply | Google AI Studio |
OPENAI_API_KEY | Optional STT provider for transcription | Paid | OpenAI Platform |
SCRAPECREATORS_API_KEY | Direct social search and trending for TikTok, Instagram, Threads, Pinterest, Reddit, and supported endpoints | Provider pricing applies | ScrapeCreators |
BRAVE_API_KEY / SERPAPI_KEY | Structured web search for social and generic URL discovery | Varies | Brave Search API or SerpAPI |
⚠️ The YouTube and Gemini keys are separate keys from separate Google services. A Gemini key will not work for YouTube API calls, and vice versa.
# Free setup asks for no keys.
npx vidlens-mcp setup
# Enhanced setup optionally prompts for keys, STT, web search, and cookies.
npx vidlens-mcp setup --enhanced
# Or pass everything non-interactively.
npx vidlens-mcp setup \
--youtube-api-key YOUR_YOUTUBE_KEY \
--gemini-api-key YOUR_GEMINI_KEY \
--stt-provider auto \
--cookies-from-browser chrome
For platforms that rate-limit anonymous access, the wizard can persist cookies by browser profile or file path:
npx vidlens-mcp setup --cookies-from-browser chrome --cookies-profile Default
npx vidlens-mcp setup --x-cookies-file /path/to/x-cookies.txt
Or via environment variables: VIDLENS_COOKIES_FROM_BROWSER, VIDLENS_X_COOKIES_FILE, VIDLENS_INSTAGRAM_COOKIES_FILE, VIDLENS_TIKTOK_COOKIES_FILE.
STT selection is automatic: local whisper.cpp first, then Gemini, then OpenAI. Override with VIDLENS_STT_PROVIDER=whisper-cpp|gemini|openai|none|auto. When the wizard asks, pressing Enter for auto is the right answer for most people.
npx vidlens-mcp # Start MCP server (stdio)
npx vidlens-mcp serve # Start MCP server (explicit)
npx vidlens-mcp setup # Configure clients, keys, STT, cookies
npx vidlens-mcp doctor # Run diagnostics
npx vidlens-mcp doctor --no-live # Diagnostics without network checks
npx vidlens-mcp update-deps # Refresh managed yt-dlp and Deno helpers
npx vidlens-mcp version # Print version
doctor checks Node.js version, yt-dlp freshness, STT and web-search providers, API key validity, data directory health, and MCP client registration for Claude Desktop, Claude Code, and Codex.
| Requirement | Status | Notes |
|---|---|---|
| Node.js ≥ 22 | Required | Uses node:sqlite — check with node --version |
| yt-dlp | Auto-installed | Downloaded during npx vidlens-mcp setup |
| ffmpeg + ffprobe | Recommended | Needed for media validation, frame extraction, visual indexing, and STT audio processing |
| YouTube API key | Optional | Better metadata and comment access |
| Gemini API key | Optional | Better embeddings and frame descriptions |
| macOS | Optional | Apple Vision powers native OCR and image similarity; other platforms can use Gemini descriptions when configured |
VIDLENS_ALLOW_PRIVATE_URLS=1."Tool not found" in Claude Desktop. Fully quit (⌘Q) and reopen. MCP servers load only on startup.
"YOUTUBE_API_KEY not configured" warning. Informational, not an error. VidLens works without it.
"API_KEY_SERVICE_BLOCKED". The key is not allowed to call the requested Google service. In Google Cloud Console, enable the YouTube Data API v3 and allow that API in the key's API restrictions. Keep appropriate application restrictions for where you run VidLens; do not make the key unrestricted unless you are only doing a short diagnostic and will restrict it again immediately.
Gemini key doesn't work for YouTube. They are separate services with separate keys. See Optional API keys.
Social video downloads but visual analysis fails. Install ffmpeg, then re-run setup:
brew install ffmpeg
npx vidlens-mcp doctor --no-live
downloadAsset can often fetch a video without ffmpeg, but indexVisualContent, extractKeyframes, media validation, and STT audio processing need ffmpeg or ffprobe.
Anything else:
npx vidlens-mcp doctor
MIT
YOUTUBE_API_KEYsecretYouTube Data API v3 key (optional — works without it via fallback scraping)
GEMINI_API_KEYsecretGoogle Gemini API key for AI-powered visual descriptions (optional)