DeepSRT MCP 服务器是一个与 DeepSRT API 集成的模型上下文协议(MCP)服务器,主要用于生成 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 as 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
{
"mcpServers": {
"deepsrt-mcp": {
"command": "node",
"args": [
"/path/to/deepsrt-mcp/build/index.js"
]
}
}
}
curl -X POST http://localhost:3000 \
-H "Content-Type: application/json" \
-d '{"video_id":"VafNvIcOs5w", "lang":"zh-tw", "mode":"narrative"}'
Q:我遇到了 404
错误,为什么?
A:这是因为视频摘要尚未在 CDN 边缘位置缓存。你需要先通过 DeepSRT 浏览器扩展打开该视频,以便其被缓存到 CDN 网络中,之后才能使用 MCP 获取摘要。
你可以通过以下 cURL 命令验证缓存状态:
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
错误。