MediaVault MCP
MediaVault MCP is a local, key-free stdio MCP server for extracting, downloading, and analyzing native media from pasted share links.
parse_url: extract all URLs from share text and return normalized metadata, streams, and no-watermark status without downloading.download: download native media for every URL atcompat,quality, orspeedinto the local media library.analyze: return cached JSON evidence (title, author, caption, timestamped transcript, pipeline status) plus keyframe image blocks for the agent's own vision model; no server-side API key required.summarize: optional async server-side fused summary job using an OpenAI-compatible endpoint, polled viaget_job.list_library: list cached analyze/summary artifacts;list_jobsandget_jobtrack background jobs.Supports multi-link inputs, adapter fallback across platforms, local ASR/keyframes, caching, and honest degradation.
Enables parsing, downloading, and analyzing Bilibili videos through f2 and yt-dlp adapters, returning native media, transcripts, and keyframe evidence.
Enables parsing, downloading, and analyzing Instagram posts and media through gallery-dl and yt-dlp, including image sets and video evidence.
Enables parsing, downloading, and analyzing Kuaishou videos through f2 and yt-dlp adapters, returning native media, transcripts, and keyframe evidence.
Enables parsing, downloading, and analyzing Pinterest media through gallery-dl and yt-dlp, including image sets.
Enables parsing, downloading, and analyzing Reddit videos through yt-dlp, returning native media and evidence.
Enables parsing, downloading, and analyzing TikTok videos through f2 and yt-dlp adapters, returning native media, transcripts, and keyframe evidence.
Enables parsing, downloading, and analyzing Vimeo videos through yt-dlp, returning native media and evidence.
Enables parsing, downloading, and analyzing Xiaohongshu videos and image sets through f2, gallery-dl, and yt-dlp adapters.
Enables parsing, downloading, and analyzing YouTube videos through yt-dlp, returning native media, transcripts, and keyframe evidence.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MediaVault MCP analyze this video and give me the transcript plus keyframes: https://v.douyin.com/abc123/"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🗄️ MediaVault MCP
Paste a link, get the original. A local, key-free stdio MCP server that pulls native no-watermark media from 1800+ platforms and hands your AI agent real video evidence — transcript plus keyframe images — without ever calling a second LLM.
Your agent already has a model. Why should a media MCP demand another API key? MediaVault collects deterministic evidence on your machine (yt-dlp / f2 / gallery-dl → ffmpeg → local Whisper) and returns it as MCP content blocks, so the agent you already run does the reasoning. An optional server-side summary fusion is there if you want it, but it is never required.
✨ Why MediaVault?
🔑 Zero required API keys.
parse_url,downloadandanalyzework with no key and never call a third-party model. Speech is transcribed on-device with faster-whisper; frames come back as image blocks for the agent's own vision.🛡️ Honest no-watermark claims. We fetch the platform's own source stream and report
native/unknown/noneper item. No cropping, no inpainting, no pretending a watermark was removed.🔗 Scored adapter fallback chain. f2 (CN-first) → gallery-dl (image sets) → yt-dlp (1800+ sites). A stale extractor degrades transparently instead of failing the request.
🧠 Agent-native video understanding. One
analyzecall returns a JSON evidence block (caption, timestamped transcript, pipeline status) plus one image content block per keyframe — exactly what a vision-capable agent needs.📚 Persistent media library. Every result is atomically cached per video; repeat calls skip re-downloading and re-transcribing, with
refresh=trueto force a fresh run.🔒 Local-first and private. Cookies and proxies stay on your machine, are validated before use, and never appear in logs or cached evidence.
Related MCP server: avv-mcp
🧩 How it works
flowchart LR
A[AI Agent / MCP Client] -->|stdio JSON-RPC| B[MediaVault MCP Server]
B --> C[Scored Adapter Registry]
C --> D0["local browser · 220 (opt-in)<br/>clears JS-VM challenge, Douyin/XHS/Kuaishou"]
C --> D1["f2 · score 200<br/>Douyin / XHS / Kuaishou / TikTok"]
C --> D1b["SSR fetch · 175<br/>binary-free, XHS/Kuaishou hydrated state"]
C --> D2["gallery-dl · 150<br/>image sets"]
C --> D3["yt-dlp · 100<br/>1800+ sites"]
D0 -. AdapterStale .-> D1
D1 -. AdapterStale .-> D1b -. AdapterStale .-> D2 -. AdapterStale .-> D3
B --> E[Key-free Evidence Pipeline]
E --> Gf[ffmpeg keyframes]
E --> Gw[faster-whisper on-device ASR]
B --> H[("Media Library<br/>evidence.json cache")]
B -. optional .-> I[OpenAI-compatible endpoint<br/>summarize fusion only]The MCP surface never changes when a platform shifts: only the adapter behind
the registry does, and AdapterStale automatically walks the chain.
🚀 Quick start
Requires Python 3.11+, uv, and ffmpeg
(brew install ffmpeg on macOS, or your distro's package).
git clone https://github.com/Majiturbo/mediavault-mcp.git
cd mediavault-mcp
uv venv --python 3.11
uv pip install -e ".[dev]"
uv pip install -e ".[local-asr]" # optional: fully offline speech-to-text
cp .env.example .env # optional: proxy/cookies/LLM settingsRun the stdio server:
uv run python -m mediavault
# or the installed console script: mediavaultPoint any MCP client at it (stdio):
{
"mcpServers": {
"mediavault": {
"command": "uv",
"args": ["--directory", "/abs/path/to/mediavault-mcp",
"run", "python", "-m", "mediavault"]
}
}
}Optional backends are auto-detected on PATH — install none, one, or all:
pipx install f2 # first-class Douyin/Xiaohongshu/Kuaishou/TikTok/Weibo/Bilibili
pipx install gallery-dl # image-set posts (Xiaohongshu, Instagram, Pinterest, Weibo)
# M4: local real-browser path for JS-VM challenges (Douyin, Xiaohongshu, Kuaishou), anonymous
uv pip install -e ".[browser]" && playwright install chromium
export MEDIAVAULT_BROWSER_BOOTSTRAP=onThe browser adapter never logs in. It opens a local Playwright browser, lets the
JS-VM challenge resolve on its own, reads the platform detail from inside the
page (Douyin detail API / Xiaohongshu hydrated note state / Kuaishou Apollo
cache; external clients are rejected even with the full cookie jar), and streams
the signed media URL directly. Playwright missing or the switch off simply falls
through to the f2 → SSR → gallery-dl → yt-dlp chain. On a datacenter IP,
Xiaohongshu risk control can return a 300012 network risk page and Kuaishou a
bare {"result": 2} body with no hydrated state; the adapter then reports an
honest Stale marker and falls through rather than guessing.
The browser context always applies stealth fingerprint normalisation — a
desktop Chrome User-Agent (never HeadlessChrome) plus an init script that
masks navigator.webdriver, the empty plugin list and language signals. On a
clean residential network this let the anonymous page hydrate real Xiaohongshu
notes (image and video) and reach the Kuaishou recommendation feed with a real
did cookie. Headless Chromium is still detected by Xiaohongshu/Kuaishou edge
risk control even with stealth, so set MEDIAVAULT_BROWSER_HEADLESS=false for
those platforms; Douyin works headless. Dense automated visits can trip a
temporary quarantine (login/300012 redirect) that clears after a cooldown —
the adapter reports Stale rather than retrying in a loop.
The always-on SSR adapter (score 175) is the lightweight, binary-free path:
it requests the share document with a browser-like User-Agent and parses state
already embedded in the server-rendered HTML (__INITIAL_STATE__ for
Xiaohongshu, __APOLLO_STATE__ for Kuaishou) without launching Chromium or
executing JavaScript. On a trusted residential network that state can hold the
detail object before any script runs; on shell/risk pages it contains no detail
and the adapter raises Stale. It deliberately stays below f2 (200) until a live
residential success path is verified.
🛠️ The seven tools
Tool | Input | What it does |
| share text or URL | Normalized metadata, no bytes downloaded |
| share text or URL, | Native media under |
| share text or URL, | No key: JSON evidence + keyframe image blocks, cached per video |
| share text or URL, | Optional server-side fused summary job (needs an OpenAI-compatible endpoint); poll with |
| job id | Job polling (queued/running/succeeded/failed) |
| — | Recent background jobs, newest first |
| — | Index cached evidence/summary artifacts |
Collection responses use an explicit envelope {"count": n, "results": [...]},
so a pasted blob with several links never silently loses one. analyze is
single-resource (its images belong to one clip) and reports urls_detected /
additional_urls so the agent knows which links still need a call.
🌐 Platform coverage
Platform | Video | Image sets | Primary adapter |
Douyin (抖音) | ✅ | ✅ | local browser (opt-in) → f2 → yt-dlp |
Kuaishou (快手) | ✅ | — | local browser (opt-in) → f2 → SSR → yt-dlp fallback |
Xiaohongshu (小红书) | ✅ | ✅ | local browser (opt-in) → f2 → SSR → gallery-dl → yt-dlp |
TikTok, Weibo (微博), Bilibili (B站) | ✅ | partial | f2 → yt-dlp |
YouTube, X/Twitter, Vimeo, Reddit | ✅ | — | yt-dlp (native clean streams) |
Instagram, Pinterest | ✅ | ✅ | gallery-dl → yt-dlp |
1800+ other yt-dlp sites | ✅ | partial | yt-dlp |
External CLIs are optional: when f2 or gallery-dl is absent, its adapter raises
AdapterStale and the registry falls through automatically — the same MCP
call keeps working.
🧠 Two ways to understand a video
1. analyze — agent-native, no key (recommended). Deterministic evidence:
title/author/caption, a timestamped transcript (local faster-whisper or your ASR
endpoint), and up to MEDIAVAULT_KEYFRAME_MAX downscaled JPEG keyframes
returned as MCP image blocks. Keyframes can stay evenly spread (interval, the
default) or track real edits via ffmpeg scene-cut detection (hybrid /
scene), always within the same frame budget; an optional, dependency-free
heuristic labels transcript segments with SPEAKER_A / SPEAKER_B turn tags.
Every stage reports itself honestly in pipeline (ok / off /
not-configured / extracted / skipped-* / empty / error); one failed
stage never kills the run. Your agent reads the transcript and looks at the
frames with its own model.
2. summarize — optional server-side fusion. Runs the same evidence
collection, then makes one OpenAI-compatible chat call that fuses caption,
transcript and visual observations into a stable schema (tldr, chapters,
entities, hooks, ...). Fails fast with an actionable message when no
endpoint is configured — in which case analyze is the answer.
Fully local, no commercial key
Point everything at a local stack and keep audio on-device:
OPENAI_BASE_URL=http://localhost:11434/v1 # Ollama / LM Studio / vLLM
OPENAI_API_KEY=ollama # placeholder, local servers ignore it
MEDIAVAULT_LLM_MODEL=qwen2.5
MEDIAVAULT_VLM_MODEL=llava
MEDIAVAULT_ASR_BACKEND=local # faster-whisper, audio never leaves the machine
MEDIAVAULT_WHISPER_MODEL=base
MEDIAVAULT_WHISPER_DEVICE=mps # cpu on CI/Linux · mps on Apple Silicon · cuda on NVIDIA⚙️ Configuration
All settings come from environment variables or .env (see
.env.example for the full list).
Variable | Default | Purpose |
|
| Download + cache root ( |
| — |
|
| — | Netscape cookies.txt, validated before use; bad paths skipped with a warning |
| — | Reuse a logged-in browser (chrome/firefox/...) |
|
| Override optional CLI paths |
|
|
|
|
|
|
|
|
|
|
| Challenge readiness and CDN download timeout |
|
| Timeout for the binary-free SSR HTML fetch |
|
|
|
|
| Local ASR size and device (cpu/mps/cuda) |
|
| Frame budget and downscale width |
|
|
|
|
|
|
| OpenAI / — | Only needed for |
Downloads land in ~/MediaVault/<platform>/<canonical_id>/ alongside
resource.json, evidence.json (the analyze cache) and optional
summary.json; media runs also write audio.wav and a keyframes/ folder.
🧭 Design principles
The host agent is the brain. MCP servers should gather evidence, not rent a second LLM behind the caller's back. Model calls are opt-in.
Degrade honestly, per stage. Every adapter failure, skipped media stage and ignored cookie file is surfaced as a marker or note — never hidden.
No-watermark means source-native, not "removed". We never crop or blur; unverifiable streams stay
unknown.Credentials stay local. No third-party parser keys, no telemetry, no credentials in URLs, logs or caches.
Test the seams, mock the world. 349 offline tests at 100% statement and branch coverage; real ffmpeg smoke tests (including scene detection) run when ffmpeg is present and skip themselves otherwise.
🗺️ Roadmap
Shipped: ffmpeg scene-cut-aware keyframes (
hybrid/scene) and dependency-free speaker turn labeling, both key-free and fully offline.Shipped (M4): opt-in local-browser adapter that clears the Douyin/Xiaohongshu/Kuaishou JS-VM challenge anonymously and reads the signed media in-page — Douyin verified end-to-end on a real share link without any account login; Xiaohongshu (note state) and Kuaishou (Apollo cache) are parsed defensively and degrade honestly on network risk control.
Shipped (SSR): a binary-free SSR adapter (score 175) that fetches the share document over plain HTTP and parses hydrated Xiaohongshu/Kuaishou state without launching a browser; shell/risk pages raise an honest Stale marker. It ranks below f2 until a residential-network success path is verified.
Next: embedding-based voiceprint diarization behind the same
Diarizerinterface, and live residential-network calibration of the XHS/Kuaishou SSR and browser paths.Always: keeping the adapter chain and evidence schema stable while platforms drift.
🧪 Development
.venv/bin/ruff check src tests # lint
.venv/bin/python -m pytest -q --cov-fail-under=100 # offline suite, 100% gate
uv build # wheel + sdistCI runs the same three checks on Ubuntu/macOS × Python 3.11/3.12. See CONTRIBUTING.md for the adapter contract and coverage policy, CODE_OF_CONDUCT.md for community standards, CHANGELOG.md for release history, and SECURITY.md for vulnerability reporting.
⚖️ License
MIT. Only process publicly available content, respect each platform's terms of service and applicable copyright, and keep downloads for personal study. This project performs no DRM circumvention.
Available Tools
7 toolsanalyzeA
Collect video evidence WITHOUT any server-side API key, for this agent's own model to summarize. Returns one JSON text block (title, author, caption, timestamped transcript, pipeline status) followed by one image content block per extracted keyframe, so a vision-capable agent can see the frames directly. Local faster-whisper handles speech when configured; nothing is sent to a third-party model. Set with_media=false for caption/metadata only (no download). Results are cached per video: repeat calls return cached evidence (cached=true); set refresh=true to re-download and re-analyze. Use summarize instead only if you want the MCP server itself to produce the fused structured summary.
Inputs: text (required), refresh, with_media.
downloadB
Download native media for every URL in the pasted text.
quality: "compat" (default, <=1080p H.264 MP4), "quality" (highest source), or "speed" (smallest). Returns local file paths under MEDIAVAULT_HOME.
Inputs: text (required), quality.
get_jobA
Return status and result of a summarize job (queued/running/succeeded/failed).
Inputs: job_id (required).
list_jobsB
List recent background jobs, newest first.
Inputs: no named parameters.
list_libraryA
List cached analyze/summary artifacts under MEDIAVAULT_HOME, newest discovery order, with canonical id, title and whether a fused summary is available. Re-run analyze with refresh=true to update an entry.
Inputs: no named parameters.
parse_urlA
Extract every URL from pasted share text and return normalized media metadata (platform, author, caption, direct streams, no-watermark status). Does not download any bytes.
Inputs: text (required).
summarizeA
Submit an async multimodal summary job. Returns a job id; poll with get_job. With with_media=true (default) the video is downloaded at speed profile and analyzed through ASR transcript + keyframe VLM when those backends are configured; failures degrade honestly to caption-only. Set with_media=false for a metadata-only caption summary.
Inputs: text (required), with_media.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools are clearly separated by resource and action: parse_url only extracts metadata, download only fetches bytes, and get_job/list_jobs/list_library are distinct. The only fuzzy pair is analyze vs summarize, which both process a video but differ in who produces the summary; the descriptions call this out explicitly, so an agent can distinguish them.
The set mostly uses a verb_noun pattern (parse_url, list_library, get_job, list_jobs) but mixes in bare verbs (download, analyze, summarize). It is still readable and intuitive, just not a single uniform convention.
Seven tools is well-scoped for a media ingest/analyze/summarize server: metadata parsing, downloading, local evidence collection, server-side summarization, job polling/listing, and library listing. Each tool has a clear role without filler.
The core lifecycle is covered: parse, download, analyze, summarize, track jobs, and list cached artifacts. Minor gaps remain, such as no job cancellation, no deletion/cleanup of library entries, and no single-item library lookup, but these are workable omissions.
Related MCP Connectors
Transcripts, summaries, chapters and timestamped search for video links, for AI agents.
Turn any video or audio link into files, transcripts and metadata, right from your AI agent.
Turn any video into context for AI agents: transcripts, metadata, chapters, timestamps.
Any video URL to LLM-ready transcript. ASR built in, no captions needed. TikTok, X, TED and more.
Related MCP Servers
- AlicenseAqualityCmaintenanceLet AI agents watch videos: local transcripts, speaker labels, scenes, chapters and exact-moment search from any video URL or file. Fully local, no API keys.43AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to download, convert, and visually analyze videos by providing timestamped frames and locally transcribed speech, all without API keys.MIT
- AlicenseNot gradedqualityBmaintenanceProvides local, offline transcription, keyframe extraction, OCR, and pre-publish review of audio, video, and image files, enabling AI agents to see and hear media without cloud or API keys.52 npmApache 2.0
- AlicenseAqualityBmaintenanceEnables AI agents to analyze videos by producing timestamped transcripts, keyframe contact sheets, and metadata reports from local files or online URLs, fully offline and without API keys.6MIT