这是一个提供 YouTube 视频摘要功能的 Model Context Protocol (MCP) 服务器,通过与 DeepSRT 的 API 集成实现。借助该服务器,用户能够轻松获取 YouTube 视频的摘要内容。
本服务器可提供 YouTube 视频摘要功能,使用前需了解其工作原理和安装方法,下面将为你详细介绍。
%%{init: {'theme': 'dark', 'themeVariables': { 'primaryColor': '#2496ED', 'secondaryColor': '#38B2AC', 'tertiaryColor': '#1F2937', 'mainBkg': '#111827', 'textColor': '#E5E7EB', 'lineColor': '#4B5563', 'noteTextColor': '#E5E7EB'}}}%%
sequenceDiagram
participant 用户
participant DeepSRT
participant Cache 作为 DeepSRT 缓存/CDN
participant MCP 作为 MCP 客户端
Note over 用户,MCP: 步骤 1:初始缓存
用户->>DeepSRT: 通过 DeepSRT 打开视频
DeepSRT->>Cache: 处理并缓存内容
Cache-->>DeepSRT: 确认缓存存储
DeepSRT-->>用户: 显示视频/内容
Note over 用户,MCP: 步骤 2:MCP 摘要检索
MCP->>Cache: 通过 MCP 请求摘要
Cache-->>MCP: 返回边缘位置缓存的摘要
Note over 用户,MCP: 替代方案:预缓存内容
rect rgba(31, 41, 55, 0.6)
MCP->>Cache: 请求预缓存视频的摘要
alt 内容存在于缓存中
Cache-->>MCP: 返回缓存摘要
else 内容未被缓存
Cache-->>MCP: 缓存未命中
end
end
npm install
npm run build
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"deepsrt-mcp": {
"command": "node",
"args": [
"/path/to/deepsrt-mcp/build/index.js"
]
}
}
}
直接在聊天中让 Cline 安装:
curl -s https://worker.deepsrt.com/install.sh | bash
Q: 我遇到了 404
错误,为什么?
A: 这是因为视频摘要尚未缓存到 CDN 边缘位置,你需要使用 DeepSRT 浏览器扩展打开该视频以使其在 CDN 网络中被缓存后才能通过 MCP 获取摘要。
你可以通过以下命令验证缓存状态:
curl -s 'https://worker.deepsrt.com/transcript' \
-i --data '{"arg":"v=VafNvIcOs5w","action":"summarize","lang":"zh-tw","mode":"narrative"}' | grep -i "^cache-status"
如果你看到 cache-status: HIT
,表示内容在 CDN 边缘位置已缓存,你的 MCP 服务器不应该返回 404
。