Skip to main content
Glama
Magiprr

claude-youtube-transcript

by Magiprr

🎬 claude-youtube-transcript

Python MCP License: MIT macOS Windows

在 Claude Desktop 中粘贴 YouTube URL,即可获取该视频的完整转录。

一个极简的 MCP 服务器,为 Claude 提供一个工具——get_transcript——用于读取任何包含字幕的 YouTube 视频的字幕。无需 API 密钥、无需 Google 账户、无需下载视频:只要文字轨道,以连续的文本块呈现,便于模型进行总结、翻译或引用。


✨ 功能

  • 接受任何 URL 格式watch?v=youtu.be//shorts//embed//live/,或裸的 11 位 ID。

  • 优先使用西班牙语,否则回退到英语;如果没有人工字幕,则使用自动生成的字幕

  • 兼容 youtube-transcript-api 0.6 和 1.x — 依次尝试经典 API、实例 API 和字幕轨道列表。

  • 返回连续的纯文本,没有时间戳,也没有 [Música] 标记,以免浪费上下文。

Related MCP server: YouTube Transcript MCP Server

📋 System Requirements

  • Claude Desktop(macOS、Windows 或 Linux)。

  • Python 3.10 或更高版本位于 PATH 中。

  • 除此之外不需要任何东西:无需 API 密钥、无需 Google 账户、无需 ffmpeg

🚀 快速安装

macOS / Linux

git clone https://github.com/Magiprr/claude-youtube-transcript.git && cd claude-youtube-transcript && ./install.sh

Windows

在 PowerShell 中:

git clone https://github.com/Magiprr/claude-youtube-transcript.git; cd claude-youtube-transcript; powershell -ExecutionPolicy Bypass -File .\install.ps1

需要使用 -ExecutionPolicy Bypass,因为 Windows 默认会阻止未签名的脚本。它只对该次执行生效,不会改变系统策略。

安装器(在安装器上)会执行以下操作:

  1. 📦 使用 pip --break-system-packages 安装依赖。

  2. 🔍 检测 server.pypython3 二进制的绝对路径。

  3. 💾 在修改前先备份你的 claude_desktop_config.json

  4. 🤝 合并 youtube-transcript 配置块,不会覆盖你已有的 MCP 服务器。

  5. 🔄 提示你重启 Claude Desktop(Cmd + Q,而不是只关闭窗口)。

手动安装

如果你更愿意手动操作,请把下面这段添加到 ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "youtube-transcript": {
      "command": "/opt/homebrew/bin/python3",
      "args": ["/ruta/absoluta/a/claude-youtube-transcript/server.py"]
    }
  }
}

两条路径都必须是绝对路径。Python 的路径可以通过 which python3(Windows 中使用 where python)获取。

配置文件位置取决于操作系统:

系统

路径

macOS

~/Library/Application Support/Claude/claude_desktop_config.json

Windows

%APPDATA%\Claude\claude_desktop_config.json

Linux

~/.config/Claude/claude_desktop_config.json

在 Windows 上,JSON 中的路径应使用双反斜线(C:\\Users\\tu-usuario\\...)或正斜线。安装器会自行正确写入。

🔎 Claude 会收到什么

该工具返回一个连续文本块,没有 timestamp 或 sound mark:

Transcripcion de https://www.youtube.com/watch?v=VIDEO_ID

Hoy vamos a ver como funciona el protocolo MCP y por que cambia la forma
en que las aplicaciones le dan herramientas a un modelo de lenguaje...

这样模型就将上下文花费在内容上,而非元数据上。

💬提示示例

重启 Claude Desktop 后:

Resúmeme este video en 10 bullets: https://www.youtube.com/watch?v=dQw4w9WgXcQ
Extrae de este video todas las cifras que menciona, con el contexto de cada una:
https://youtu.be/dQw4w9WgXcQ
Traduce al español la transcripción de https://www.youtube.com/shorts/dQw4w9WgXcQ
Compara qué dicen estos dos videos sobre el mismo tema:
<url 1>
<url 2>
De este video, dame solo las partes donde habla de precios, citadas textual:
<url>

🩺 故障排除

完全退出应用再重新打开。在 macOS 下为 Cmd + Q;在 Windows 下,只点 X 还不够,还要通过右键点击系统托盘图标并选择 退出。这两种情况下,关闭窗口都不会结束进程。之后检查配置块是否已正确写入:

python3 -m json.tool ~/Library/Application\ Support/Claude/claude_desktop_config.json

这是 HomeBrew 的 Python 在自我保护。安装器已经使用了 --break-system-packages;如果你手动执行:

python3 -m pip install -r requirements.txt --break-system-packages

如果你不想改动系统 Python,可以使用 en架(virtual env)并指定 command 的路径为该环境中的 Python:

Claude Desktop 使用的是不同的 Python 版本,而不是安装依赖时所用的那一个。请检查在配置中放置的是哪个 Python,并确认同一个 Python 已安装该包:

/opt/homebrew/bin/python3 -c "import mcp, youtube_transcript_api; print('ok')"

并不是所有视频都有字幕:作者可能已经禁用了它们,或者视频可能是私有的、受年龄限制的或者正在直播。请在 YouTube 确认有 CC 按钮。

YouTube 限制了每个 IP 的请求次数。通常发生在共享网络或 VPN 中。等待几分钟,或从其他连接尝试。

这是 PowerShell 的执行策略。可以这样执行:

powershell -ExecutionPolicy Bypass -File .\install.ps1

如果 Windows 另外还将该文件标记为“从 Internet 获取”,可以这样:

Unblock-File .\install.ps1

那是 Windows 自带的 stub 别名。请从 python.org 安装正式的 Python,并勾选 “Add python.exe to PATH”。安装器在查找解释器时已经会忽略那个 stub。

# macOS
tail -f ~/Library/Logs/Claude/mcp-server-youtube-transcript.log
# Windows
Get-Content -Wait "$env:APPDATA\Claude\Logs\mcp-server-youtube-transcript.log"

🚧 开发

可以手动运行服务器来验证它是否能启动:

python3 server.py

Keep waiting on stdio (as Claude Desktop does): nothing printed is a sign that everything is fine.

##明下来 ...

📄 许可

MIT © 2026

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Magiprr/claude-youtube-transcript'

If you have feedback or need assistance with the MCP directory API, please join our Discord server