youtube-summary-skill

youtube-summary-skill

A local MCP server that generates bilingual (English + Traditional Chinese) study-oriented HTML summaries from YouTube URLs, including key points, quiz, and timestamped transcript.

Category
访问服务器

README

youtube-summary-skill

A local MCP server + Claude skill that turns any YouTube URL into a bilingual (English + Traditional Chinese) study-oriented HTML summary — with a thumbnail, richly-written key points, a multiple-choice quiz, and the full timestamped transcript baked in. Paste a URL into Claude Desktop, get back a self-contained offline HTML file. A markdown archive of every summary is auto-saved to disk so you can grep through them later.

Built on top of fastmcp and youtube-transcript-api, with an optional local Whisper fallback for videos with no captions.

Status: Windows-first. Tested on Windows 11 + Python 3.14 + Claude Desktop.

What you get

Each summary is a single self-contained HTML file (~250 KB with an embedded thumbnail) containing:

  • Header — thumbnail, real title/uploader (fetched via YouTube's public oEmbed), duration, topic, "Open on YouTube" link, and an EN / 中文 language toggle in the corner.
  • Summary — 3–5 sentence overview of the whole talk.
  • Takeaway — 2–3 sentence distilled answer to "if you remember one thing from this video…"
  • Key Points — 5–8 points, each a bold lead sentence followed by a 3–5 sentence paragraph explaining the mechanism and referencing the speaker by name. A subtle [MM:SS] link at the end of each paragraph seeks the corresponding moment on YouTube.
  • Quiz — 4–6 multiple-choice questions, teacher-testing-student style, with reveal-answer buttons and timestamp-cited explanations.
  • Full transcript — timestamped, collapsed by default, expands inline for reference. Every timestamp is a link to that moment on YouTube.
  • Markdown archive — same content saved to ~/claude_workspace/youtube-summaries/ (configurable) as a plain .md file with YAML frontmatter, so you can grep, sync, or feed to other tools.

All copy — summary, takeaway, key points, quiz, section headings — lives in a single JavaScript COPY = { en, zh } object and toggles instantly with no page reload. Only the transcript stays in its original language (that's the raw source).

Requirements

  • Python 3.10+ on PATH.
  • Claude Desktop — this skill uses MCP over stdio, which Claude Desktop supports natively. Claude.ai (browser) also supports local MCP servers via its connector settings.

Install (Windows)

git clone https://github.com/antwang0604/youtube-summary-skill.git
cd youtube-summary-skill
./install.ps1

That single command:

  1. Creates a Python venv under .venv/.
  2. Installs requirements.txt (fastmcp, youtube-transcript-api, truststore).
  3. Runs a smoke test that fetches the Cynthia Breazeal TED transcript.
  4. Merges an MCP entry into %APPDATA%\Claude\claude_desktop_config.json (preserving any existing servers).
  5. Copies SKILL.md and template_reference.html to %USERPROFILE%\.claude\skills\youtube-video-summary\.

Flags:

./install.ps1 -Whisper    # Also install yt-dlp + faster-whisper for captionless videos.
./install.ps1 -SkipTest   # Skip the smoke test (e.g. offline).

After install, fully quit Claude Desktop from the tray icon (closing the window keeps it running) and reopen it.

Optional: Whisper fallback

For videos with no captions at all, the server can transcribe audio locally. Install the deps and put ffmpeg on PATH:

./install.ps1 -Whisper
winget install Gyan.FFmpeg   # or: choco install ffmpeg

The fallback uses faster-whisper on CPU (int8 quantization, base model). Without it, captionless videos return a clear error.

Usage

Once installed, just paste a YouTube URL into any Claude Desktop chat:

https://www.youtube.com/watch?v=eAnHjuTQF3M

Claude will:

  1. Call the get_youtube_transcript MCP tool (transcript comes back with inline [MM:SS] markers roughly every 20 seconds).
  2. Emit a single self-contained HTML artifact following the structure in template_reference.html.
  3. Call the save_summary_markdown MCP tool to persist a markdown copy to ~/claude_workspace/youtube-summaries/.

Supported URL shapes:

  • https://www.youtube.com/watch?v=...
  • https://youtu.be/...
  • https://www.youtube.com/shorts/...
  • https://www.youtube.com/embed/...
  • https://www.youtube.com/live/...

Configuration

Change the save directory. The markdown archive defaults to ~/claude_workspace/youtube-summaries/. To point elsewhere, set YOUTUBE_SUMMARY_DIR in the MCP entry inside claude_desktop_config.json:

"youtube-summary": {
  "command": "…\\.venv\\Scripts\\python.exe",
  "args": ["…\\server.py"],
  "env": { "YOUTUBE_SUMMARY_DIR": "D:\\notes\\video-summaries" }
}

Skill instructions. All content-shape rules (how many key points, how the quiz is styled, bilingual requirements, timestamp handling) live in SKILL.md. Edit that file and Claude Desktop will pick up the changes on next chat.

HTML template. template_reference.html is the canonical structure Claude follows. Change design tokens (colors, fonts) or add fields there.

Manual install (no PowerShell script)

If install.ps1 errors out or you want to see every step:

cd youtube-summary-skill
python -m venv .venv
.venv\Scripts\activate           # Windows
# source .venv/bin/activate       # macOS/Linux
pip install -r requirements.txt
python test_server.py             # smoke test

Then hand-edit %APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "youtube-summary": {
      "command": "C:\\path\\to\\youtube-summary-skill\\.venv\\Scripts\\python.exe",
      "args": ["C:\\path\\to\\youtube-summary-skill\\server.py"]
    }
  }
}

And copy the skill into place:

$dest = "$env:USERPROFILE\.claude\skills\youtube-video-summary"
New-Item -ItemType Directory -Force -Path $dest
Copy-Item SKILL.md, template_reference.html $dest

How it works

┌────────────────┐   paste URL     ┌────────────────┐
│ Claude Desktop │ ──────────────> │ your prompt    │
└────────────────┘                 └────────┬───────┘
        ▲                                   │  matches SKILL.md
        │                                   │  activation rule
        │                                   ▼
        │                          ┌────────────────┐
        │  transcript + saved      │ Claude decides │
        │  markdown path returned  │ to call MCP    │
        │                          └────────┬───────┘
        │                                   │
        │                                   ▼
        │                          ┌────────────────┐
        └──────────────────────────│  server.py     │
                                   │  (fastmcp)     │
                                   │                │
                                   │ get_youtube_   │
                                   │  transcript()  │
                                   │ save_summary_  │
                                   │  markdown()    │
                                   └────────┬───────┘
                                            │
                                            ▼
                                   ┌────────────────┐
                                   │ youtube-       │
                                   │ transcript-api │
                                   │  (or Whisper)  │
                                   └────────────────┘

The MCP server is spawned on demand by Claude Desktop — you never run python server.py yourself. Config in claude_desktop_config.json tells Claude how to launch it.

Repo layout

File Purpose
server.py FastMCP server — two tools: get_youtube_transcript, save_summary_markdown.
requirements.txt Core Python deps (Whisper fallback deps commented out).
test_server.py Direct smoke test of the transcript fetcher, no MCP involved.
SKILL.md Instructions the Claude client loads when a YouTube URL appears.
template_reference.html Canonical HTML structure Claude produces.
install.ps1 One-shot Windows installer (venv, deps, config merge, skill copy).
LICENSE MIT.

Troubleshooting

  • ERROR: Transcripts are disabled … — the uploader turned captions off. Enable the Whisper fallback (./install.ps1 -Whisper + ffmpeg) to handle these.
  • ERROR: No transcript available in any language … — YouTube has no captions at all for this video. Same fix.
  • Whisper fallback is unavailable … — install yt-dlp and faster-whisper, and make sure ffmpeg is on PATH.
  • ERROR: Failed to list transcripts … — usually a network issue, IP block from YouTube, or a stale youtube-transcript-api. Try pip install -U youtube-transcript-api.
  • CERTIFICATE_VERIFY_FAILED — corporate CA / TLS-inspecting proxy. The truststore dep should handle this automatically; if it doesn't, check that truststore is installed in your venv.
  • Claude doesn't call the tool — confirm youtube-summary shows up in Claude Desktop's MCP indicator with 2 tools. If it says 0 tools or red, check %APPDATA%\Claude\logs\ for spawn errors.
  • Skill doesn't fire on a URL — confirm SKILL.md is at %USERPROFILE%\.claude\skills\youtube-video-summary\SKILL.md and matches one of the URL shapes in the "When to activate" list.

Contributing

Bug reports and feature requests welcome — open an issue. Small PRs (typo fixes, additional URL patterns, translations of SKILL.md prompt language) are the easiest to review.

Design changes to the HTML template or SKILL.md content-shape are best discussed in an issue first, since they change what every future summary looks like.

License

MIT — see LICENSE.

Credits

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选