DeepSRT MCP 服务器のロゴ

DeepSRT MCP 服务器

組織
DeepSRT

A Model Context Protocol (MCP) server that provides YouTube video summarization and transcript extraction functionality through integration with DeepSRT's API and direct YouTube caption access.

公開者DeepSRT
リポジトリdeepsrt-mcp
言語TypeScript
フォーク
5
スター
52
利用可能なツール
0
通信方式stdio
カテゴリ
リンク
  • ツールをAIワークフローに接続

    DeepSRT MCP 服务器は、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには52件のスターと5件のフォークがあります。

DeepSRT MCP Server

A Model Context Protocol (MCP) server that provides YouTube video summarization and transcript extraction functionality through integration with DeepSRT's API and direct YouTube caption access.

TL;DR

json
{
  "mcpServers": {
    "deepsrt": {
      "type": "stdio",
      "command": "bunx",
      "args": [
        "@deepsrt/deepsrt-mcp@latest",
        "--server"
      ]
    }
  }
}

Architecture

Sequence Flow

Technical Architecture

Core Components

1. MCP Server Layer

  • Runtime Support: Both Node.js and Bun execution
  • Protocol Handling: Model Context Protocol (MCP) request/response management
  • Tool Registration: get_summary and get_transcript tools
  • Error Handling: Comprehensive error management with user-friendly messages

2. Video Processing Pipeline

  • URL Parser: Supports multiple YouTube URL formats and direct video IDs
  • InnerTube Integration: Direct YouTube API access without API keys
  • Caption Discovery: Automatic detection of available caption tracks
  • Quality Selection: Prioritizes manual captions over auto-generated ones

3. Transcript Processing

  • XML Parser: Handles YouTube's <timedtext> format
  • Entity Decoder: Converts HTML entities to readable text
  • Timestamp Formatter: Converts milliseconds to [MM:SS] format
  • Content Filter: Removes music notation and empty segments

4. Summary Generation

  • DeepSRT Integration: Direct API calls to worker.deepsrt.com
  • Multi-language Support: Supports zh-tw, en, ja, and other languages
  • Mode Selection: Narrative and bullet-point summary formats
  • Title Translation: Automatic title translation to target language

Key Features

No Pre-caching Required

  • Works immediately for any YouTube video with captions
  • Real-time transcript extraction and processing
  • No dependency on external caching systems

Intelligent Caption Selection

  • Priority Order: Manual > Auto-generated > Any available
  • Language Preference: Respects user's preferred language
  • Fallback Strategy: Graceful degradation to available options

Robust Error Handling

  • Network timeout management (30-second timeout)
  • API error translation to user-friendly messages
  • Graceful handling of videos without captions
  • Comprehensive validation of input parameters

Multi-format Output

  • Markdown Formatting: Rich text with headers and metadata
  • Structured Data: Video information, duration, author details
  • Timestamped Transcripts: Precise timing information
  • Localized Summaries: Content in user's preferred language

Performance Characteristics

  • Fast Startup: < 1 second server initialization
  • Efficient Processing: Parallel API calls for summary + title translation
  • Memory Efficient: Streaming XML parsing, no large data buffering
  • Network Optimized: Single request per video for metadata + captions

Recent Updates

v0.1.9 (Latest)

  • ✅ Fixed critical test logic flaws: Tests now correctly validate API responses instead of checking non-existent success properties
  • ✅ Enhanced error handling: Improved graceful handling of YouTube API rate limiting (HTTP 429)
  • ✅ Robust test suite: All 56 tests now pass consistently with proper error resilience
  • ✅ Verified API integration: Confirmed both DeepSRT and YouTube APIs work correctly when not rate limited
  • ✅ Multi-language support: Validated zh-tw, en, ja summary generation
  • ✅ Production-ready: Test suite handles real-world API limitations professionally

v0.1.3

  • ✅ Fixed CLI argument parsing: Now supports both --key=value and --key value formats
  • ✅ Fixed bullet mode: --mode bullet now works correctly and generates bullet-point summaries
  • ✅ Improved bunx compatibility: Direct execution with bunx @deepsrt/deepsrt-mcp works without installation

v0.1.2

  • ✅ Fixed CLI execution: Made CLI the default binary for direct npx/bunx execution
  • ✅ Updated package configuration: Proper binary resolution for different execution methods

v0.1.1

  • ✅ Added comprehensive testing: Unit tests, integration tests, and end-to-end tests
  • ✅ Enhanced CLI tool: Full-featured command-line interface with help and examples
  • ✅ Direct transcript extraction: No pre-caching required, works with any YouTube video

Features

  • Generate summaries for YouTube videos
  • Extract full transcripts with timestamps from YouTube videos
  • Support for both narrative and bullet-point summary modes
  • Multi-language support (default: zh-tw)
  • Direct YouTube caption access (no API key required)
  • Seamless integration with MCP-enabled environments

How it Works

Summary Generation

  1. Direct YouTube Integration

    • Extracts video information and captions directly from YouTube using the InnerTube API
    • Fetches transcript content from YouTube's caption system
    • Sends transcript data to DeepSRT API for summarization
  2. Real-time Processing

    • No pre-caching required - works immediately for any video with captions
    • Automatically selects the best available captions (manual preferred over auto-generated)
    • Supports multiple languages and summary modes

Transcript Extraction

  1. Direct YouTube Access

    • Transcripts are extracted directly from YouTube's caption system using the InnerTube API
    • No pre-caching required - works immediately for any video with captions
  2. Caption Selection

    • Automatically selects the best available captions (manual captions preferred over auto-generated)
    • Supports language preference selection
    • Falls back gracefully to available alternatives
  3. Timestamp Formatting

    • Provides clean, formatted transcripts with timestamps in [MM:SS] format
    • Handles both manual and auto-generated captions
    • Includes video metadata and caption information

CLI Usage

The DeepSRT MCP server provides a unified interface that handles both MCP server mode and CLI commands.

Unified Interface

bash
# MCP Server Mode (default - for Claude Desktop/Cline)
bunx @deepsrt/deepsrt-mcp                    # Starts MCP server on stdio
bunx @deepsrt/deepsrt-mcp --server           # Explicit server mode

# CLI Commands (direct usage)
bunx @deepsrt/deepsrt-mcp get-transcript <video-url> [options]
bunx @deepsrt/deepsrt-mcp get-summary <video-url> [options]

# Help
bunx @deepsrt/deepsrt-mcp --help

Direct CLI Commands (No Installation Required)

bash
# Extract transcript with timestamps
bunx @deepsrt/deepsrt-mcp get-transcript https://www.youtube.com/watch?v=dQw4w9WgXcQ
bunx @deepsrt/deepsrt-mcp get-transcript dQw4w9WgXcQ --lang=en

# Generate video summary
bunx @deepsrt/deepsrt-mcp get-summary dQw4w9WgXcQ --lang=zh-tw --mode=bullet
bunx @deepsrt/deepsrt-mcp get-summary https://youtu.be/dQw4w9WgXcQ --lang=ja

Global Installation

For easier access, install globally:

bash
# Install globally
npm install -g @deepsrt/deepsrt-mcp

# MCP Server Mode
deepsrt-mcp                                             # Starts MCP server
deepsrt-mcp --server                                    # Explicit server mode

# CLI Commands
deepsrt-mcp get-transcript https://youtu.be/dQw4w9WgXcQ --lang=en
deepsrt-mcp get-summary dQw4w9WgXcQ --lang=zh-tw --mode=narrative

CLI Options

get-transcript

bash
bunx @deepsrt/deepsrt-mcp get-transcript <video-url> [options]

Options:
  --lang=<language>    Preferred language code for captions (default: en)
  --lang <language>    Alternative format
                      Examples: en, zh-tw, ja, es, fr

Examples:
  bunx @deepsrt/deepsrt-mcp get-transcript https://www.youtube.com/watch?v=dQw4w9WgXcQ
  bunx @deepsrt/deepsrt-mcp get-transcript dQw4w9WgXcQ --lang=zh-tw
  bunx @deepsrt/deepsrt-mcp get-transcript https://youtu.be/dQw4w9WgXcQ --lang ja

get-summary

bash
bunx @deepsrt/deepsrt-mcp get-summary <video-url> [options]

Options:
  --lang=<language>    Target language for summary (default: zh-tw)
  --lang <language>    Alternative format
                      Examples: zh-tw, en, ja, es, fr
  --mode=<mode>        Summary format (default: narrative)
  --mode <mode>        Alternative format
                      Options: narrative, bullet

Examples:
  bunx @deepsrt/deepsrt-mcp get-summary https://www.youtube.com/watch?v=dQw4w9WgXcQ
  bunx @deepsrt/deepsrt-mcp get-summary dQw4w9WgXcQ --lang=en --mode=bullet
  bunx @deepsrt/deepsrt-mcp get-summary https://youtu.be/dQw4w9WgXcQ --lang ja --mode narrative

Supported URL Formats

The CLI accepts multiple YouTube URL formats:

bash
# Full YouTube URLs
https://www.youtube.com/watch?v=dQw4w9WgXcQ
https://www.youtube.com/watch?v=dQw4w9WgXcQ&t=30s

# Short URLs
https://youtu.be/dQw4w9WgXcQ

# Embed URLs
https://www.youtube.com/embed/dQw4w9WgXcQ

# Direct video IDs
dQw4w9WgXcQ

CLI Features

  • Direct execution: No installation required with bunx
  • Multiple URL formats: Full URLs, short URLs, or direct video IDs
  • Flexible argument formats: Both --key=value and --key value formats supported
  • Language support: Specify target language for summaries and transcript preferences
  • Summary modes: Choose between narrative or bullet-point formats
  • Rich output: Colored console output with progress indicators
  • Error handling: Clear error messages with suggestions

Example Output

Transcript Output

# Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)

**Author:** Rick Astley  
**Duration:** 3:33  
**Captions:** English (manual)

## Transcript

[00:18] ♪ We're no strangers to love ♪
[00:22] ♪ You know the rules and so do I ♪
[00:27] ♪ A full commitment's what I'm thinking of ♪
...

Summary Output (Narrative Mode)

# 瑞克·艾斯利 - 永遠不會放棄你

**Author:** Rick Astley  
**Duration:** 3:33  
**Language:** zh-tw  
**Mode:** narrative

## Summary

這是一首經典的流行歌曲,表達了對愛情的承諾和忠誠...

Summary Output (Bullet Mode)

# How Robots Are Helping Amazon Deliver on Prime Day

**Author:** Bloomberg Television  
**Duration:** 5:45  
**Language:** zh-tw  
**Mode:** bullet

## Summary

本影片主要探討亞馬遜如何運用機器人技術來提升倉儲效率...

# 機器人技術在亞馬遜倉儲的應用與效益

  - 亞馬遜已部署了第一百萬個機器人,並在Prime Day等高峰期用於滿足訂單需求 [00:00:00]
  - 機器人旨在為員工提供安全且高生產力的工作環境 [00:00:30]
  - 移動機器人可以搬運超過一千磅的貨物,並移動貨架以減少員工的行走距離 [00:00:54]
...

Installation

Option 1: Direct Usage with bunx (Recommended - No Installation Required)

Use the unified interface directly without any installation:

bash
# MCP Server Mode (for Claude Desktop/Cline)
bunx @deepsrt/deepsrt-mcp                    # Default: starts MCP server
bunx @deepsrt/deepsrt-mcp --server           # Explicit server mode

# CLI Commands (direct usage)
bunx @deepsrt/deepsrt-mcp get-transcript https://www.youtube.com/watch?v=dQw4w9WgXcQ
bunx @deepsrt/deepsrt-mcp get-summary dQw4w9WgXcQ --lang=zh-tw --mode=bullet

# Always uses latest version automatically
bunx @deepsrt/deepsrt-mcp@latest get-transcript dQw4w9WgXcQ --lang=en

Option 2: Global Installation (For Frequent Use)

bash
# Install globally for easier access
npm install -g @deepsrt/deepsrt-mcp

# Then use directly with shorter command
deepsrt-mcp get-transcript https://www.youtube.com/watch?v=dQw4w9WgXcQ
deepsrt-mcp get-summary dQw4w9WgXcQ --lang zh-tw --mode bullet

Option 3: Installing for Claude Desktop (Recommended)

Add this configuration to your Claude Desktop config file:

  • On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • On Windows: %APPDATA%/Claude/claude_desktop_config.json
json
{
  "mcpServers": {
    "deepsrt": {
      "type": "stdio",
      "command": "bunx",
      "args": [
        "@deepsrt/deepsrt-mcp@latest",
        "--server"
      ]
    }
  }
}

This approach:

  • ✅ No local installation required
  • ✅ Always uses latest version
  • ✅ Automatic updates when you restart Claude
  • ✅ Cross-platform compatibility
  • ✅ Simple and clean configuration

Option 4: Installing for Cline

Add this configuration to your cline_mcp_settings.json:

json
{
  "mcpServers": {
    "deepsrt": {
      "type": "stdio", 
      "command": "bunx",
      "args": [
        "@deepsrt/deepsrt-mcp@latest",
        "--server"
      ]
    }
  }
}

Or just ask Cline to install in the chat:

"Hey, install this MCP server for me from https://github.com/DeepSRT/deepsrt-mcp"

Option 5: Using bunx (Direct Execution)

You can run the server directly with bunx without installation:

bash
# Run from the project directory
bunx --bun src/index.ts

# Or use npm scripts
npm run start:bun  # Uses Bun
npm run start:node # Uses Node.js
npm run dev        # Development mode with Bun

Usage

MCP Integration

The server provides the following tools for MCP clients:

get_summary

Gets a summary for a YouTube video.

Parameters:

  • videoId (required): YouTube video ID
  • lang (optional): Language code (e.g., zh-tw) - defaults to zh-tw
  • mode (optional): Summary mode ("narrative" or "bullet") - defaults to narrative

get_transcript

Gets a transcript for a YouTube video with timestamps.

Parameters:

  • videoId (required): YouTube video ID or full YouTube URL
  • lang (optional): Preferred language code for captions (e.g., en, zh-tw) - defaults to en

Example Usage

Using Claude Desktop:

typescript
// Get video summary
const summaryResult = await mcp.use_tool("deepsrt", "get_summary", {
  videoId: "dQw4w9WgXcQ",
  lang: "zh-tw",
  mode: "narrative"
});

// Get video transcript
const transcriptResult = await mcp.use_tool("deepsrt", "get_transcript", {
  videoId: "dQw4w9WgXcQ",
  lang: "en"
});

Using Cline:

typescript
// Get video summary
const summaryResult = await mcp.use_tool("deepsrt", "get_summary", {
  videoId: "dQw4w9WgXcQ",
  lang: "zh-tw",
  mode: "bullet"
});

// Get video transcript
const transcriptResult = await mcp.use_tool("deepsrt", "get_transcript", {
  videoId: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  lang: "en"
});

Development

Install dependencies:

bash
npm install

Running Tests

bash
# Run unit tests (fast, no network calls)
npm test

# Run unit tests only
npm run test:unit

# Run network tests (requires internet, may be slower)
npm run test:network

# Run all tests including network tests
npm run test:all

# Run tests in watch mode
npm run test:watch

# Run tests with CI reporter (for CI/CD)
npm run test:ci

Test Types:

  • Unit Tests (src/index.test.ts, src/integration.test.ts) - Fast tests with mocked data
  • Network Tests (src/transcript.test.ts, src/e2e.test.ts) - Real YouTube API integration tests

Examples

See the examples/ directory for reference implementations:

  • examples/standalone-summarizer.ts - Standalone script showing direct API usage patterns

Running the Server

With Bun (Recommended for development - faster startup):

bash
# Development mode (runs TypeScript directly)
npm run dev
# or
bun src/index.ts

# Using npm script
npm run start:bun

With Node.js (Production):

bash
# Build first
npm run build

# Then run
npm run start:node
# or
node build/index.js

Testing the Server

You can test the server using the MCP inspector:

bash
npm run inspector

Or test manually with JSON-RPC:

bash
# List available tools
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | bun src/index.ts

# Test get_transcript
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get_transcript", "arguments": {"videoId": "dQw4w9WgXcQ", "lang": "en"}}}' | bun src/index.ts

Build for Production

Build for production:

bash
npm run build

Watch mode for development:

bash
npm run watch

Demo

FAQ

Q: I am getting 404 error, why?

A: This is because the video summary is not cached in the CDN edge location, you need to open this video using DeepSRT chrome extension to have it cached in the CDN network before you can get that summary using MCP.

You can verify the cache status using cURL like this

sh
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

If you see cache-status: HIT the content is cached in the CDN edge location and your MCP server shoud not get 404.

インストール

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "deepsrt-deepsrt-mcp": {
      "command": "",
      "args": []
    }
  }
}

DeepSRT MCP 服务器のMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度DeepSRT MCP 服务器に接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

DeepSRT MCP 服务器をサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. DeepSRT MCP 服务器のMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "deepsrt-deepsrt-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@deepsrt/deepsrt-mcp"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてDeepSRT MCP 服务器のMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. DeepSRT MCP 服务器のMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
DeepSRT MCP 服务器を使ってこのタスクを手伝ってもらえますか?
DeepSRT MCP 服务器
はい、読みました。
DeepSRT MCP 服务器で調べた結果をお伝えします。

よくある質問

DeepSRT MCP 服务器 MCPサーバーは何に使いますか?

DeepSRT MCP 服务器は、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでDeepSRT MCP 服务器 MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでDeepSRT MCP 服务器を利用できます。

TypingMindでDeepSRT MCP 服务器 MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。DeepSRT MCP 服务器を接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

DeepSRT MCP 服务器 MCPをTypingMindに接続するにはどうすればよいですか?

DeepSRT MCP 服务器はTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでDeepSRT MCP 服务器 MCPのどのようなツールを利用できますか?

DeepSRT MCP 服务器はMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

DeepSRT MCP 服务器 MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。DeepSRT MCP 服务器で認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇