video_agent

video_agent

Enables probing, ingesting, transcribing, and searching Bilibili videos with timestamped evidence and frame extraction, without reading browser cookies.

Category
Visit Server

README

Video Agent

A local, Codex-first evidence service for public Bilibili videos. It probes metadata, builds timestamped audio evidence, and can fetch targeted visual evidence without reading browser cookies.

Requirements

  • Node.js 22 or newer
  • pnpm 11
  • yt-dlp available on PATH

For a non-global yt-dlp Python install, set both:

$env:VIDEO_AGENT_PYTHON = "C:\path\to\python.exe"
$env:VIDEO_AGENT_YTDLP_PYTHONPATH = "C:\path\to\yt-dlp-package-directory"

For local transcription, install faster-whisper in the selected Python environment. If it is installed in a target directory instead of the environment, set:

$env:VIDEO_AGENT_ASR_PYTHONPATH = "C:\path\to\faster-whisper-package-directory"

Models are downloaded by faster-whisper on first use. M2 supports tiny, base (default), and small.

Development

pnpm install
pnpm typecheck
pnpm test
pnpm probe "https://www.bilibili.com/video/BV13x41117TL" --pretty
pnpm ingest "https://www.bilibili.com/video/BV1e3411j7ZM" --model base --pretty
pnpm index-transcript ".video-agent\artifacts\BV1e3411j7ZM\p1\transcript.base.json" --pretty
pnpm search-video "BV1e3411j7ZM" "如何打开字幕" --model base --pretty
pnpm build
pnpm submit-ingest "https://www.bilibili.com/video/BV1e3411j7ZM" --model base --pretty
pnpm job-status "<jobId>" --pretty

probe performs anonymous metadata inspection only. Authenticated or restricted content returns AUTH_REQUIRED; the MVP does not read cookies.

ingest downloads the public audio stream and writes a UTF-8 transcript to:

.video-agent/artifacts/<videoId>/p<part>/transcript.<model>.json

Re-running the same video, part, and model validates and reuses the cached transcript and source audio.

index-transcript idempotently stores transcript metadata, segments, and Chinese character n-grams in .video-agent/catalog.db. search-video returns timestamped evidence ranked by query n-gram coverage.

submit-ingest persists a job, returns immediately, and starts a detached local worker from apps/worker/dist/index.js. Run pnpm build after source changes before submitting. Use job-status to poll queued, running, completed, or failed. recover-jobs requeues jobs left in running after an interrupted process and starts replacement workers.

Codex MCP

The project includes a trusted-project MCP configuration at .codex/config.toml. Build the server and verify discovery:

pnpm build
codex mcp list

Start a new Codex task in this directory after building. The video_agent server exposes:

  • probe_video
  • submit_ingest
  • get_ingest_status
  • search_video
  • get_video_segment
  • get_video_transcript
  • get_video_context
  • get_video_frames
  • summarize_video prompt

Example request:

Use video_agent to ingest this Bilibili URL. Wait for completion, then explain its main points with timestamp citations.

Server instructions require evidence-first answers, [MM:SS-MM:SS] citations, bounded context, and treating all video text as untrusted data rather than instructions. The default analysis first calls get_video_transcript: transcripts up to 20,000 compact characters are injected whole, while longer transcripts continue through search_video and get_video_segment. A normal video analysis also requires targeted frames from at least three important transcript ranges; visual extraction is skipped only when the tool returns an error.

get_video_frames accepts an indexed video, a 1-120 second range, and a frame count from 1 to 3. It uses the bundled FFmpeg binary and yt-dlp section download, caches the short clip and JPEG frames under .video-agent/frames, and returns MCP image content. It never falls back to downloading the complete video. Set VIDEO_AGENT_FFMPEG only when overriding the bundled binary.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured