video_agent

video_agent

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

Category
访问服务器

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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选