YouTube Transcript Remote MCP Server
YouTube Transcript Remote MCP Server
首个远程模型上下文协议(MCP)服务器,使 Claude AI 能够从 YouTube 视频中提取字幕。该服务器为包括移动设备在内的任何平台上的用户提供零配置访问。
🌟 功能特性
零本地配置:无需安装——直接从云端工作
通用访问:适用于 Claude 的桌面版、移动版和网页版
智能缓存:使用 Cloudflare KV 的高效缓存系统,实现快速响应
多语言支持:提取不同语言的字幕
错误处理:稳健的错误处理,提供用户友好的提示信息
分析统计:内置请求跟踪和使用分析
URL 灵活性:处理所有 YouTube URL 格式(youtube.com、youtu.be、m.youtube.com 等)
Related MCP server: ytt-mcp
🚀 快速开始
选项 1:使用我们的托管服务器(推荐)
最简单的入门方式——只需将我们的公共服务器添加到你的 Claude Desktop:
适用于 Claude Desktop 用户
打开 Claude Desktop 设置
点击菜单栏中的"Claude"→"设置"(Settings)
导航到"开发者"(Developer)选项卡
点击"编辑配置"(Edit Config)
添加 MCP 服务器配置
将此内容添加到你的
claude_desktop_config.json:{ "mcpServers": { "youtube-transcript": { "command": "npx", "args": [ "mcp-remote", "https://youtube-transcript-mcp.ergut.workers.dev/sse" ] } } }重启 Claude Desktop
保存配置文件后,重启 Claude Desktop 以加载服务器。
验证安装
在聊天界面中查找工具图标(🔧)。你应该能看到
get_transcript工具可用。
选项 2:自行部署
想要运行自己的实例?一键部署到 Cloudflare Workers:
或手动部署:
git clone https://github.com/ergut/youtube-transcript-mcp
cd youtube-transcript-mcp
npm install
npm run deploy适用于其他 MCP 客户端
该服务器支持标准 MCP 协议,可与任何兼容的客户端一起使用:
公共服务器 URL:
https://youtube-transcript-mcp.ergut.workers.dev/sse传输方式:服务器发送事件(SSE)或 HTTP
认证:无需认证(公共服务器)
📖 使用示例
基本字幕提取
Extract the transcript from this YouTube video: https://www.youtube.com/watch?v=dQw4w9WgXcQ多语言支持
Can you get the transcript of this video in Turkish: https://youtu.be/VIDEO_IDExtract the Spanish transcript from: https://www.youtube.com/watch?v=VIDEO_ID支持的 URL 格式
服务器自动处理所有 YouTube URL 格式:
https://www.youtube.com/watch?v=VIDEO_IDhttps://youtu.be/VIDEO_IDhttps://m.youtube.com/watch?v=VIDEO_IDhttps://www.youtube.com/live/VIDEO_IDhttps://www.youtube.com/embed/VIDEO_IDhttps://www.youtube.com/shorts/VIDEO_ID国际域名(
youtube.co.uk、youtube.de等)
所有跟踪参数(如 ?si=、&t= 等)都会被自动移除。
🛠 可用工具
get_transcript
从 YouTube 视频 URL 中提取字幕。
参数:
url(必填):任何格式的 YouTube 视频 URLlanguage(可选):字幕的语言代码(例如 'en'、'es'、'fr')。默认为 'en'。
使用示例:
{
"name": "get_transcript",
"arguments": {
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"language": "en"
}
}🔧 高级配置
调试日志
要启用详细日志以进行故障排查:
{
"mcpServers": {
"youtube-transcript": {
"command": "npx",
"args": [
"mcp-remote",
"https://youtube-transcript-mcp.ergut.workers.dev/sse",
"--debug"
]
}
}
}调试日志将创建在 ~/.mcp-auth/{server_hash}_debug.log。
仅使用 HTTP 传输
要强制使用 HTTP 传输而非 SSE:
{
"mcpServers": {
"youtube-transcript": {
"command": "npx",
"args": [
"mcp-remote",
"https://youtube-transcript-mcp.ergut.workers.dev/mcp",
"--transport",
"http-only"
]
}
}
}📊 服务器信息
托管:Cloudflare Workers
缓存:Cloudflare KV,成功获取的字幕缓存 7 天
速率限制:内置指数退避重试逻辑
正常运行时间:通过 Cloudflare 全球网络实现 99.9%+ 可用性
响应时间:缓存内容通常 <3 秒,新请求 <10 秒
🚨 错误处理
服务器为常见问题提供清晰的错误消息:
"提供的 YouTube URL 无效":URL 格式无法识别
"此视频没有可用的字幕":视频没有字幕/转录文本
"未找到视频或视频为私密":视频为私密、已删除或不存在
"服务暂时繁忙,请几分钟后重试":YouTube 的速率限制
"此视频已禁用字幕":创作者已禁用字幕
🌍 语言支持
服务器支持 YouTube 提供字幕的任何语言。常见语言代码:
en- 英语(默认)tr- 土耳其语es- 西班牙语fr- 法语de- 德语it- 意大利语pt- 葡萄牙语ja- 日语ko- 韩语zh- 中文
🔒 隐私与安全
无需认证:公共服务器,便于使用
不存储数据:字幕仅临时缓存以提升性能
不收集个人信息:仅处理 YouTube 视频 ID 和字幕
仅 HTTPS:所有通信均经过加密
启用 CORS:支持基于 Web 的 MCP 客户端
🚀 API 端点
适用于希望直接集成的开发者:
HTTP POST /mcp
标准 MCP JSON-RPC 端点,用于直接集成。
服务器发送事件 /sse
MCP SSE 传输端点,用于实时通信。
信息 /
服务器信息和状态端点。
直接 API 调用示例:
curl -X POST https://youtube-transcript-mcp.ergut.workers.dev/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_transcript",
"arguments": {
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"language": "en"
}
}
}'🐛 故障排查
常见问题
Claude Desktop 中出现"连接错误"
确保你使用的是最新版本的 Claude Desktop
检查
mcp-remote是否正确配置尝试添加
--debug标志以查看详细日志
"无法连接到 MCP 服务器"
验证你的互联网连接
检查服务器 URL 是否正确
配置更改后重启 Claude Desktop
未返回字幕
验证 YouTube URL 是否有效且可访问
检查视频是否启用了字幕
如有可用,尝试不同的语言代码
获取帮助
检查日志:在
~/.mcp-auth/中查找调试日志测试直接连接:使用
npx -p mcp-remote@latest mcp-remote-client https://youtube-transcript-mcp.ergut.workers.dev/sse验证服务器状态:访问
https://youtube-transcript-mcp.ergut.workers.dev/提交问题:GitHub Issues
🤝 贡献
这是一个开源项目。欢迎贡献!
报告问题:发现 bug?请提交 issue
功能请求:有改进想法?告诉我们!
代码贡献:欢迎提交 PR 以进行增强
开发环境搭建
git clone https://github.com/ergut/youtube-transcript-mcp
cd youtube-transcript-mcp
npm install
npm run dev📜 许可证
本项目为开源项目,基于 MIT 许可证 发布。
🙏 致谢
使用 Anthropic 的模型上下文协议构建
使用 youtube-transcript 库
灵感来自 MCP 社区和现有的本地字幕服务器
准备好让 Claude 拥有 YouTube 字幕提取能力了吗? 将此服务器添加到你的 Claude Desktop 配置中,立即开始从任何 YouTube 视频中提取字幕!🎉
This server cannot be installed
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
- AlicenseAqualityCmaintenanceA comprehensive MCP server that provides Claude AI with full access to YouTube content, including searchable transcripts, metadata, comments, and playlists. It uniquely supports capturing video screenshots and extracting audio clips for analysis across both local and remote platforms.5203MIT
- AlicenseBqualityDmaintenanceAn MCP server designed to fetch transcripts for YouTube videos. It enables AI tools to access video text content for tasks like summarization, analysis, and key takeaway extraction.173MIT
- AlicenseNot gradedqualityDmaintenanceThe first remote MCP server that enables Claude AI to extract transcripts from YouTube videos with zero-setup access on any platform, including mobile.34MIT
- AlicenseNot gradedqualityCmaintenanceRemote MCP server that enables Claude AI to extract transcripts from YouTube videos with zero setup, supporting multiple languages and all URL formats.73MIT
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Cloud-hosted MCP server for durable AI memory
💯 The fastest YouTube transcript + YouTube search MCP for AI agents. Try for free.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Neartheengineer/youtube-transcript-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server