播客转录摘要工具

一个基于MCP协议的播客内容抓取、转录和摘要生成工具,可与Claude Code或Claude Desktop集成使用。

  • by walid-koleilat
  • TypeScript
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 wkoleilat-happytitan/mcp-podcast-scraper

使用说明

MCP播客刮刀

一个MCP(模型上下文协议)服务器,用于抓取和转录播客剧集。设计用于与 克劳德代码 或 克劳德桌面版 -你提供播客,MCP转录它,克劳德总结它。

建造于 瓦利德·科列拉特 端到端学习MCP并解决真正的工作流程:在不离开克劳德的情况下,将数小时的播客音频转化为有用的以PM为重点的摘要。

它做什么

  • 🎙️ 废弃播客 来自YouTube视频或RSS源
  • 🎯 转录音频 使用Deepgram的快速Nova-2模型
  • 📁 整理文件 按播客名称和剧集日期
  • 🔄 跟踪播客 对于新剧集
  • ⏭️ 跳过重复项 -不会重新抓取已处理的剧集
  • 📋 发现未完成的工作 -列出需要总结的剧集
  • ✏️ 自定义摘要提示 -根据您的需求自定义Claude的总结方式

运作原理

You: "Check for new episodes and summarize them"
         ↓
Claude: Calls check_new_episodes() → Finds new episodes
         ↓
Claude: Calls scrape_podcast() → Downloads & transcribes
         ↓
Claude: Calls get_summary_prompt() → Reads your custom instructions
         ↓
Claude: Calls get_transcript() → Reads the transcript
         ↓
Claude: Summarizes following your prompt
         ↓
Claude: Calls save_summary() → Saves the .md file
         ↓
Done! transcript.md + summary.md saved

安装指南

第一步:先决条件

安装所需的系统工具(macOS):

# Install Homebrew if you don't have it
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install yt-dlp (for YouTube) and ffmpeg (for audio)
brew install yt-dlp ffmpeg

步骤2:克隆和构建

# Clone the repository
git clone https://github.com/walid-koleilat/mcp-podcast-scraper.git
cd mcp-podcast-scraper

# Install dependencies
npm install

# Build
npm run build

步骤3:获取Deepcram API密钥

  1. 首选 https://console.deepgram.com/
  2. 注册(免费套餐包括 200美元信贷 -足够播放约300小时的音频)
  3. 创建API密钥
  4. 复制密钥

步骤4:配置

复制示例配置文件并添加您的API密钥:

# Copy the example config
cp config.example.json config.json

# Edit config.json and add your Deepgram API key

你的 config.json 应该看起来像:

{
  "outputDirectory": "./podcasts",
  "deepgramApiKey": "YOUR_ACTUAL_DEEPGRAM_API_KEY",
  "tempDirectory": "./temp"
}

⚠️ 重要提示: 永不承诺 config.json 到git-它包含您的API密钥!这 .gitignore 已经将其排除在外。

步骤5:添加到克劳德代码

将此添加到您的Claude Code MCP设置中(~/.cursor/mcp.json 或通过设置→ MCP):

{
  "mcpServers": {
    "podcast-scraper": {
      "command": "node",
      "args": ["/FULL/PATH/TO/mcp-podcast-scraper/dist/index.js"]
    }
  }
}

重要提示: 替换 /FULL/PATH/TO/ 安装的实际路径。

步骤5(备选):添加到Claude桌面

编辑 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "podcast-scraper": {
      "command": "node",
      "args": ["/FULL/PATH/TO/mcp-podcast-scraper/dist/index.js"]
    }
  }
}

然后重新启动Claude Desktop。


文件结构

mcp-podcast-scraper/
├── config.example.json     # Template - copy to config.json
├── config.json             # Your config (git-ignored, contains API key)
├── tracking.example.json   # Example tracking file
├── tracking.json           # Your tracked podcasts (git-ignored)
├── prompts/
│   └── summary-prompt.md   # Customize how Claude summarizes (editable)
├── podcasts/               # Your transcripts & summaries (git-ignored)
├── src/                    # Source code
├── dist/                   # Compiled code (git-ignored)
└── node_modules/           # Dependencies (git-ignored)

用法示例

删除特定剧集

"Scrape this YouTube podcast: https://youtube.com/watch?v=..."

"Find and scrape the latest Lex Fridman episode"

追踪新剧集的播客

"Track the Huberman Lab podcast: https://feeds.megaphone.fm/hubermanlab"

"Check my tracked podcasts for new episodes"

"List all podcasts I'm tracking"

查找未完成的工作

"Show me episodes that need summaries"

"List incomplete episodes"

MCP工具参考

工具 说明
scrape_podcast 抄录一集。返回文件路径和预览。
get_transcript 阅读一段被删减的片段的完整文字记录。
get_summary_prompt 获取自定义摘要说明。
save_summary 将生成的摘要保存到markdown文件中。
check_new_episodes 检查跟踪的播客中是否有新的(未剪辑的)剧集。
list_incomplete 查找有文字记录但没有摘要的剧集。
search_podcast 搜索YouTube或解析RSS提要以查找剧集。
add_tracking 将播客RSS提要添加到您的跟踪列表中。
list_tracking 列出您正在跟踪的所有播客。
remove_tracking 从跟踪列表中删除播客。

工作流程

典型会话

  1. 检查新剧集:

    "Check my tracked podcasts for new episodes"
    
  2. 删除每一集新内容:

    "Scrape the first one"
    
  3. 获取成绩单并总结:

    "Get the transcript and summarize it"
    
  4. 对剩余剧集重复此操作

恢复未完成的工作

如果您在会话中途停止:

"Show me episodes that need summaries"

然后,对于每一个不完整的情节:

"Get the transcript for [episode] and summarize it"

输出结构

文件按播客和剧集组织:

podcasts/
├── Huberman Lab/
│   ├── 2024-12-10 - Episode Title/
│   │   ├── transcript.md
│   │   └── summary.md
│   └── 2024-12-05 - Another Episode/
│       ├── transcript.md
│       └── summary.md
└── Lex Fridman Podcast/
    └── 2024-12-08 - Guest Name/
        ├── transcript.md
        └── summary.md

配置选项

选项 描述 默认值
outputDirectory 在哪里保存成绩单和摘要。可以是相对路径或绝对路径。 ./podcasts
deepgramApiKey 用于转录的Deepcram API密钥 必需
tempDirectory 音频文件的临时目录(启动时自动清理) ./temp

环境变量(config.json的可选替代方案):

  • DEEPGRAM_API_KEY
  • OUTPUT_DIRECTORY
  • TEMP_DIRECTORY

自定义摘要提示

通过编辑控制Claude如何总结播客 prompts/summary-prompt.md.

默认提示是为 产品经理 包括:

  • 🎯 剧集概述
  • 💡 产品经理的关键见解
  • 🧠 心智模型和框架
  • 📈 个人发展要点
  • ✅ 行动项目
  • 💬 著名语录
  • 🔗 相关主题

根据您的需求进行定制

编辑 prompts/summary-prompt.md 致:

  • 改变目标受众(工程师、设计师、创始人等)
  • 添加/删除部分
  • 调整摘要长度
  • 专注于特定主题
  • 更改格式样式

自定义示例:

工程师:

Focus on:
- Technical concepts and architecture decisions
- Implementation details worth noting
- Tools and technologies mentioned
- Code patterns and best practices

对于创始人:

Focus on:
- Business strategy insights
- Fundraising advice
- Growth tactics
- Leadership lessons
- Mistakes to avoid

Claude将在生成每个摘要之前阅读此提示,以确保一致、个性化的输出。


发展

# Watch mode (auto-rebuild on changes)
npm run dev

# Build once
npm run build

# Run MCP server directly
npm start

# Clean build artifacts and temp files
npm run clean

# Test with MCP Inspector (interactive UI)
npx @modelcontextprotocol/inspector node dist/index.js

故障排除

“未找到ffprobe和ffmpeg”

brew install ffmpeg

“未配置Deepcram API密钥”

确保您已复制 config.example.json 到 config.json 并添加了您的API密钥。

MCP服务器未连接

  1. 跑 npm run build
  2. 验证MCP配置中的路径是否正确
  3. 重新启动克劳德代码/桌面

“不支持跟踪YouTube URL”

请改用RSS源。在以下网址查找播客RSS提要https://getrssfeed.com/


许可证

麻省理工学院