Metadata-Version: 2.4
Name: vidleaf-mcp
Version: 1.1.0
Summary: MCP server & CLI to read timestamped YouTube, Bilibili, TikTok, Vimeo, Douyin, Xiaohongshu, Facebook, and X video transcripts or jump to Vidleaf deep-reading.
Author-email: Vidleaf <support@vidleaf.app>
License-Expression: MIT
Project-URL: Homepage, https://vidleaf.app
Project-URL: Documentation, https://github.com/blackmirror69/vidleaf-mcp#readme
Project-URL: Repository, https://github.com/blackmirror69/vidleaf-mcp
Project-URL: Issues, https://github.com/blackmirror69/vidleaf-mcp/issues
Project-URL: Changelog, https://github.com/blackmirror69/vidleaf-mcp/blob/main/CHANGELOG.md
Project-URL: YouTube Transcript Tool, https://vidleaf.app/en/youtube-transcript
Project-URL: Bilibili Subtitle Extractor, https://vidleaf.app/zh/bilibili-transcript
Project-URL: Facebook Video Transcript, https://vidleaf.app/en/facebook-video-transcript
Project-URL: SRT Subtitle Converter, https://vidleaf.app/en/srt-converter
Project-URL: Public CC BY Transcripts, https://vidleaf.app/en/transcripts/
Keywords: mcp,mcp-server,model-context-protocol,vidleaf,youtube-transcript,bilibili,tiktok,vimeo,facebook-video,douyin,xiaohongshu,subtitles,srt,video-to-text
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Vidleaf MCP Server & CLI (`vidleaf-mcp`)

<!-- mcp-name: io.github.blackmirror69/vidleaf-mcp -->

[![Glama Score](https://glama.ai/mcp/servers/blackmirror69/vidleaf-mcp/badges/score.svg)](https://glama.ai/mcp/servers/blackmirror69/vidleaf-mcp)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
[![Vidleaf](https://img.shields.io/badge/Web_Reader-vidleaf.app-0f766e)](https://vidleaf.app/en/)

**[English](README.md)** · **[简体中文](README.zh-CN.md)** · **[Changelog](CHANGELOG.md)**

Zero-dependency **Model Context Protocol (MCP) server and CLI** for reading timestamped transcripts, searching exact quotes, and opening deep-reading sessions from **YouTube, Bilibili, TikTok, Vimeo, Facebook (Videos & Reels), Douyin, Xiaohongshu (RedNote), and X (Twitter)** via **[Vidleaf](https://vidleaf.app/en/)**.

Most LLM chat apps cannot natively read **Bilibili subtitles** (BV IDs, `b23.tv`, multi-part `?p=` courses, Bangumi), unwrap **TikTok / Douyin / Xiaohongshu mobile share copy**, or safely fall back when a video has **no captions**. `vidleaf-mcp` bridges that gap in **Claude Desktop, Cursor, Cherry Studio, Windsurf, Cline, ChatGPT / Codex, and terminal workflows** with zero API keys required for caption reading.

---

## Why `vidleaf-mcp`?

- **8 Video Platforms, 1 Unified Schema**: Works across [YouTube](https://vidleaf.app/en/youtube-transcript), [Bilibili](https://vidleaf.app/en/bilibili-transcript) (`BV...`, `b23.tv`, `?p=N`, Bangumi & Courses), TikTok (`tiktok.com/@.../video/`, `vm.tiktok.com`, `vt.tiktok.com`), Vimeo (`vimeo.com/<id>`, `player.vimeo.com/video/<id>`), [Facebook Videos/Reels](https://vidleaf.app/en/facebook-video-transcript) (`fb.watch`), [Douyin](https://vidleaf.app/zh/douyin-transcript), [Xiaohongshu](https://vidleaf.app/zh/xiaohongshu-transcript), and [X / Twitter](https://vidleaf.app/en/x-video-transcript).
- **Free Anonymous Caption Reading**: Existing official or auto-generated subtitles load immediately with `[MM:SS]` timestamps—no API key, no browser extension, and no login required.
- **Safe No-Caption Fallback (`vidleaf.app/open?url=...`)**: Never triggers surprise audio billing. When a video has zero captions (such as hard-subtitled clips or raw recordings), `vidleaf-mcp` returns `status: "asr_confirmation_required"` with a one-click `https://vidleaf.app/open?url=...` link so you can inspect duration and confirm [speech-to-text transcription](https://vidleaf.app/en/guides/youtube-transcript-without-captions) or [podcast speaker diarization](https://vidleaf.app/en/guides/youtube-podcast-transcription) in the browser.
- **Zero Runtime Dependencies**: Pure standard library in both Python (`>=3.10`, `uvx` / `pipx`) and Node.js (`>=18`, `npx` / `.mcpb`).

---

## Quick Setup (Claude Desktop / Cursor / Cherry Studio / Windsurf)

### Option A: `npx` (Node.js — zero install directly from GitHub)

```json
{
  "mcpServers": {
    "vidleaf": {
      "command": "npx",
      "args": ["-y", "github:blackmirror69/vidleaf-mcp"]
    }
  }
}
```

### Option B: `uvx` (Python — zero install directly from GitHub)

```json
{
  "mcpServers": {
    "vidleaf": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/blackmirror69/vidleaf-mcp", "vidleaf-mcp"]
    }
  }
}
```

### Option C: Claude Desktop 1-Click Extension (`.mcpb` — Official MCP Registry bundle)

Download **[`vidleaf-mcp.mcpb`](https://github.com/blackmirror69/vidleaf-mcp/releases/latest/download/vidleaf-mcp.mcpb)** from the latest GitHub Release and open or drag it into **Claude Desktop → Settings → Extensions** (zero terminal setup).

### Option D: Docker (build locally from source, zero registry login)

```bash
docker build -t vidleaf-mcp https://github.com/blackmirror69/vidleaf-mcp.git
```

```json
{
  "mcpServers": {
    "vidleaf": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "vidleaf-mcp"]
    }
  }
}
```

> **Optional environment variable**: Set `VIDLEAF_SESSION_COOKIE` to your `vsub_session` value only if you want MCP reads saved to your personal Vidleaf reading history. Leave unset for free anonymous reading.

### Cherry Studio / Claude Code / Codex CLI

- **Claude Code**: `claude mcp add vidleaf -- npx -y github:blackmirror69/vidleaf-mcp`
- **Cherry Studio**: Settings → MCP Servers → Add Server → Type `STDIO`, Command `npx`, Args `-y github:blackmirror69/vidleaf-mcp`.

---

## MCP Tools Exposed

| Tool | Purpose | Network |
| :--- | :--- | :--- |
| `read_video_transcript` | Fetch paginated `[MM:SS]` subtitle cues (`timestamped`, `markdown`, `srt`, or `plain`), track list, and Vidleaf deep-reader links (`open_url`, `summary_open_url`). | Read-only (`vidleaf.app`) |
| `search_video_transcript` | Search 1–10 exact phrases or keywords inside a video's captions and return timestamped matches with surrounding context lines—ideal for 2-hour lectures without filling context windows. | Read-only (`vidleaf.app`) |
| `build_vidleaf_open_link` | Deterministically extract a clean video URL from mobile share text and build `https://vidleaf.app/open?url=...` (`goal="transcript"` or `"summary"`), domain-swap shortcuts, and Markdown citations across all 8 platforms. | Offline (`openWorldHint: false`) |

---

## CLI Usage

Both the Python and Node packages install `vidleaf-mcp` and `vidleaf` CLI commands:

```bash
# 1. Read timestamped transcript (YouTube, Bilibili BV ID, Vimeo, TikTok, or mobile share copy)
vidleaf-mcp read "https://www.bilibili.com/video/BV1GJ411x7h7" --lang zh --format markdown
vidleaf-mcp read "https://www.youtube.com/watch?v=UF8uR6Z6KLc" --limit 100

# 2. Search exact quotes inside a long lecture without dumping all captions
vidleaf-mcp search "https://www.youtube.com/watch?v=UF8uR6Z6KLc" "connect the dots" "stay hungry"

# 3. Unwrap TikTok / Douyin / Xiaohongshu / Bilibili share text into a direct Vidleaf reader or summary URL
vidleaf-mcp open "7.43 复制打开抖音看看 https://v.douyin.com/iYxxxxxx/" --goal summary --locale zh
```

---

## Try Online & Quality Score (Glama MCP)

You can inspect tool schemas, verify our **A-rated** Tool Definition Quality Score (TDQS), and test `vidleaf-mcp` directly in your browser before installing via our **[Glama MCP Server listing](https://glama.ai/mcp/servers/blackmirror69/vidleaf-mcp)** or the [Glama MCP Inspector](https://glama.ai/mcp/inspector).

---

## Official Vidleaf Web Tools & Documentation

- **Web Workspaces (6 Languages)**: [English](https://vidleaf.app/en/) · [简体中文](https://vidleaf.app/) · [Español](https://vidleaf.app/es/) · [日本語](https://vidleaf.app/ja/) · [Português (BR)](https://vidleaf.app/pt-BR/) · [繁體中文](https://vidleaf.app/zh-Hant/)
- **Dedicated Video & Subtitle Tools**: [YouTube Transcript Extractor](https://vidleaf.app/en/youtube-transcript) · [YouTube Video Summarizer](https://vidleaf.app/en/youtube-summary) · [Bilibili Subtitle Extractor](https://vidleaf.app/en/bilibili-transcript) · [Facebook Video & Reels Transcript](https://vidleaf.app/en/facebook-video-transcript) · [X (Twitter) Video Transcript](https://vidleaf.app/en/x-video-transcript) · [MP4 to Text (Browser Audio Extraction)](https://vidleaf.app/en/mp4-to-text) · [Meeting Recording Transcript](https://vidleaf.app/en/meeting-recording-transcript) · [Free Local SRT/VTT Converter](https://vidleaf.app/en/srt-converter)
- **Chinese Platform Extractors**: [B站字幕提取](https://vidleaf.app/zh/bilibili-transcript) · [抖音视频转文字](https://vidleaf.app/zh/douyin-transcript) · [小红书视频转文字](https://vidleaf.app/zh/xiaohongshu-transcript) · [Facebook 视频转文字](https://vidleaf.app/zh/facebook-video-transcript) · [X 视频字幕提取](https://vidleaf.app/zh/x-video-transcript)
- **1-on-1 Tool Comparisons**: [DownSub Alternative](https://vidleaf.app/en/alternatives/downsub) · [NoteGPT Alternative](https://vidleaf.app/en/alternatives/notegpt) · [Tactiq Alternative](https://vidleaf.app/en/alternatives/tactiq) · [Filmot Alternative](https://vidleaf.app/en/alternatives/filmot)
- **Research Guides & CC BY Archive**: [Transcripts Without Captions](https://vidleaf.app/en/guides/youtube-transcript-without-captions) · [Podcast Speaker Labels](https://vidleaf.app/en/guides/youtube-podcast-transcription) · [Search Exact Quotes](https://vidleaf.app/en/guides/search-youtube-transcript) · [Public CC BY Lecture Archive (93 Full Lectures, 6 Languages)](https://vidleaf.app/en/transcripts/) ([Español](https://vidleaf.app/es/transcripts/) · [中文文库](https://vidleaf.app/zh/transcripts/))
- **Browser Companion Scripts**: [blackmirror69/vidleaf-open](https://github.com/blackmirror69/vidleaf-open) (8-Platform Bookmarklet, Tampermonkey Userscript & Obsidian Citation Templates)

## License

Released under the [MIT License](LICENSE).
