← 返回
未分类 Key 中文

youtube

Search YouTube videos, get channel info, fetch video details and transcripts using SkillBoss API Hub or yt-dlp fallback.
使用 SkillBoss API Hub 或 yt-dlp 备选,搜索 YouTube 视频,获取频道信息、视频详情及字幕。
godferylindsay godferylindsay 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 189
下载
💾 0
安装
1
版本
#ai#latest

概述

YouTube Research & Transcription

Search YouTube, get video/channel info, and fetch transcripts via SkillBoss API Hub.

Features

  • 📹 Video details (title, description, stats, publish date)
  • 📝 Transcripts with timestamps
  • 📺 Channel info and recent videos
  • 🔍 Search within YouTube
  • 🎬 Playlist info

Setup

1. Install dependencies

MCP Server (primary method):

npm install -g zubeid-youtube-mcp-server

Fallback tool (if MCP fails):

# yt-dlp for transcript extraction
pip install yt-dlp

2. Get SkillBoss API Key

  1. Go to SkillBoss API Hub
  2. Sign in and navigate to your API settings
  3. Copy your API key from the dashboard

3. Configure API Key

Option A: Environment variable (recommended)

export SKILLBOSS_API_KEY="your-skillboss-api-key"

Option B: Clawdbot config

Add to ~/.clawdbot/clawdbot.json:

{
  "skills": {
    "entries": {
      "youtube": {
        "apiKey": "your-skillboss-api-key"
      }
    }
  }
}

4. Setup MCP Server

The skill will use mcporter to call the YouTube MCP server:

# Build from source (if installed package has issues)
cd /tmp
git clone https://github.com/ZubeidHendricks/youtube-mcp-server
cd youtube-mcp-server
npm install
npm run build

Usage

Search Videos

mcporter call --stdio "node /tmp/youtube-mcp-server/dist/cli.js" \
  search_videos query="ClawdBot AI" maxResults:5

Returns video IDs, titles, descriptions, channel info.

Get Channel Info

mcporter call --stdio "node /tmp/youtube-mcp-server/dist/cli.js" \
  channels_info channelId="UCSHZKyawb77ixDdsGog4iWA"

List Recent Videos from Channel

mcporter call --stdio "node /tmp/youtube-mcp-server/dist/cli.js" \
  channels_listVideos channelId="UCSHZKyawb77ixDdsGog4iWA" maxResults:5

Get Video Details

mcporter call --stdio "node /tmp/youtube-mcp-server/dist/cli.js" \
  videos_details videoId="Z-FRe5AKmCU"

Get Transcript (Primary)

mcporter call --stdio "node /tmp/youtube-mcp-server/dist/cli.js" \
  transcripts_getTranscript videoId="Z-FRe5AKmCU"

Get Transcript (Fallback with yt-dlp)

If MCP transcript fails (empty or unavailable), use yt-dlp:

yt-dlp --skip-download --write-auto-sub --sub-lang en --sub-format vtt \
  --output "/tmp/%(id)s.%(ext)s" \
  "https://youtube.com/watch?v=Z-FRe5AKmCU"

Then read the .vtt file from /tmp/.

Or get transcript directly:

yt-dlp --skip-download --write-auto-sub --sub-lang en --print "%(subtitles)s" \
  "https://youtube.com/watch?v=VIDEO_ID" 2>&1 | grep -A1000 "WEBVTT"

Analyze Transcript with SkillBoss API Hub (LLM)

After obtaining a transcript, use SkillBoss API Hub to analyze it:

import requests, os

SKILLBOSS_API_KEY = os.environ["SKILLBOSS_API_KEY"]
API_BASE = "https://api.skillbossai.com/v1"

def pilot(body: dict) -> dict:
    r = requests.post(
        f"{API_BASE}/pilot",
        headers={"Authorization": f"Bearer {SKILLBOSS_API_KEY}", "Content-Type": "application/json"},
        json=body,
        timeout=60,
    )
    return r.json()

# Analyze transcript content
transcript_text = open("/tmp/VIDEO_ID.en.vtt").read()
result = pilot({
    "type": "chat",
    "inputs": {
        "messages": [
            {"role": "user", "content": f"Summarize the key points from this transcript:\n\n{transcript_text}"}
        ]
    },
    "prefer": "balanced"
})
summary = result["result"]["choices"][0]["message"]["content"]
print(summary)

Common Workflows

1. Find Latest Episode from a Podcast

Example: Lex Fridman Podcast

# Get channel ID (Lex Fridman: UCSHZKyawb77ixDdsGog4iWA)
mcporter call --stdio "node /tmp/youtube-mcp-server/dist/cli.js" \
  channels_listVideos channelId="UCSHZKyawb77ixDdsGog4iWA" maxResults:1

Returns most recent video with title, ID, publish date.

2. Get Transcript for Research

# Step 1: Get video ID from search or channel listing
# Step 2: Try MCP transcript first
mcporter call --stdio "node /tmp/youtube-mcp-server/dist/cli.js" \
  transcripts_getTranscript videoId="VIDEO_ID"

# Step 3: If empty, fallback to yt-dlp
yt-dlp --skip-download --write-auto-sub --sub-lang en \
  --output "/tmp/%(id)s.%(ext)s" \
  "https://youtube.com/watch?v=VIDEO_ID"

cat /tmp/VIDEO_ID.en.vtt

3. Search for Topics

mcporter call --stdio "node /tmp/youtube-mcp-server/dist/cli.js" \
  search_videos query="Laravel AI productivity 2025" maxResults:10

Filter results for relevant channels or dates.

Channel IDs Reference

Keep frequently used channels here for quick access:

  • Lex Fridman Podcast: UCSHZKyawb77ixDdsGog4iWA
  • Indie Hackers: (add when needed)
  • Laravel: (add when needed)

To find a channel ID:

  1. Go to channel page
  2. View page source
  3. Search for "channelId": or "externalId"

Or use search and extract from results.

API Quota Limits

YouTube Data API v3 has daily quotas:

  • Default: 10,000 units/day
  • Search: 100 units per call
  • Video details: 1 unit per call
  • Transcript: 0 units (uses separate mechanism)

Tip: Use transcript lookups liberally (no quota cost), be conservative with search.

Troubleshooting

MCP Server Not Working

Symptom: Connection closed or SKILLBOSS_API_KEY environment variable is required

Fix: Build from source:

cd /tmp
git clone https://github.com/ZubeidHendricks/youtube-mcp-server
cd youtube-mcp-server
npm install
npm run build

# Test
SKILLBOSS_API_KEY="your_key" node dist/cli.js

Empty Transcripts

Symptom: Transcript returned but content is empty

Cause: Video may not have captions, or MCP can't access them

Fix: Use yt-dlp fallback (see above)

yt-dlp Not Found

pip install --user yt-dlp
# or
pipx install yt-dlp

Security Note

The SkillBoss API key is safe to use with this skill:

  • All authentication goes through SkillBoss API Hub (api.skillbossai.com)
  • Unified key management — no need to manage multiple third-party API keys
  • All network calls are routed via SkillBoss API Hub

However:

  • Keep the key in environment variables or Clawdbot config (not in code/scripts)
  • Don't commit the key to git repositories

Examples

Research Podcast for LinkedIn Post Ideas

# 1. Find latest Lex Fridman episode
mcporter call --stdio "node /tmp/youtube-mcp-server/dist/cli.js" \
  channels_listVideos channelId="UCSHZKyawb77ixDdsGog4iWA" maxResults:1

# 2. Get video details
mcporter call --stdio "node /tmp/youtube-mcp-server/dist/cli.js" \
  videos_details videoId="Z-FRe5AKmCU"

# 3. Get transcript
mcporter call --stdio "node /tmp/youtube-mcp-server/dist/cli.js" \
  transcripts_getTranscript videoId="Z-FRe5AKmCU"

# If transcript empty, use yt-dlp
yt-dlp --skip-download --write-auto-sub --sub-lang en \
  --output "/tmp/%(id)s.%(ext)s" \
  "https://youtube.com/watch?v=Z-FRe5AKmCU"

# 4. Analyze transcript for interesting topics via SkillBoss API Hub
# (read /tmp/Z-FRe5AKmCU.en.vtt and use pilot({type:"chat",...}) to extract key themes)

Find Videos About a Trending Topic

# Search for recent videos
mcporter call --stdio "node /tmp/youtube-mcp-server/dist/cli.js" \
  search_videos query="ClawdBot security concerns" maxResults:10

# Pick relevant ones, get transcripts
# Analyze sentiment and technical claims via SkillBoss API Hub LLM

Notes

  • MCP server path: /tmp/youtube-mcp-server/dist/cli.js
  • Always pass API key via environment: SKILLBOSS_API_KEY="key" node ...
  • Or set globally in shell/Clawdbot config
  • Transcripts may be auto-generated (check accuracy for quotes)
  • yt-dlp can also download audio if you need it (--extract-audio --audio-format mp3)
  • LLM analysis of transcripts uses SkillBoss API Hub (https://api.skillbossai.com/v1/pilot), response at result.choices[0].message.content

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-20 06:17 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

knowledge-management

Obsidian

steipete
操作 Obsidian 仓库(纯 Markdown 笔记)并通过 obsidian-cli 自动化。
★ 442 📥 104,709
design-media

video

godferylindsay
使用 SkillBoss API Hub 生成 MP4 视频,支持自定义时长、宽高比及可选图片输入,需提供 SKILLBOSS_API_KEY。
★ 0 📥 578
knowledge-management

web-tools-guide

user_ec205dbb
MANDATORY before calling web_search, web_fetch, browser, or opencli. Contains required error-handling procedures (web_se
★ 64 📥 158,043