PolarHub
  • Agents
  • MCP Servers
  • Skills
  • PolarBear
PolarHub © 2026
MCP Serversmultimedia-processingyoutube-subtitle-mcp
返回「multimedia-processing」

youtube-subtitle-mcp

modelscope·@guangxiangdebizi/youtube-subtitle-mcp

multimedia-processing0下载LocalModelScope

简介

暂无描述。

MCP Server 详情

来自 ModelScope 索引

YouTube Subtitle MCP Server

A Model Context Protocol (MCP) server for fetching YouTube video subtitles/transcripts with support for multiple output formats (SRT, VTT, TXT, JSON).

License TypeScript MCP

Features

  • Fetch subtitles from any public YouTube video
  • Multiple output formats: SRT, VTT, TXT, JSON
  • Multi-language subtitle support
  • Two deployment modes: stdio (local) and HTTP (server)
  • Zero-configuration setup with npx
  • Complete timestamp information
  • Production-ready with TypeScript
  • Built with youtubei.js for reliable and stable subtitle extraction

Quick Start

Method 1: stdio Mode (Recommended for Local Use)

Zero configuration required! Simply use npx:

npx -y youtube-subtitle-mcp

Or install globally:

npm install -g youtube-subtitle-mcp
youtube-subtitle-mcp

Method 2: HTTP Mode (For Server Deployment)

# Clone repository
git clone https://github.com/guangxiangdebizi/youtube-subtitle-mcp.git
cd youtube-subtitle-mcp

# Install dependencies
npm install

# Build
npm run build

# Start HTTP server
npm run start:http

Server will start at http://localhost:3000

Installation

For Development

# Clone repository
git clone https://github.com/guangxiangdebizi/youtube-subtitle-mcp.git
cd youtube-subtitle-mcp

# Install dependencies
npm install

# Build
npm run build

For Production

npm install -g youtube-subtitle-mcp

Configuration

stdio Mode Configuration (Recommended)

Add to your MCP client configuration file:

Claude Desktop / Cursor Configuration:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "youtube-subtitle": {
      "command": "npx",
      "args": ["-y", "youtube-subtitle-mcp"]
    }
  }
}

For local development:

{
  "mcpServers": {
    "youtube-subtitle": {
      "command": "node",
      "args": ["C:/path/to/youtube-subtitle-mcp/build/index.js"]
    }
  }
}

HTTP Mode Configuration

{
  "mcpServers": {
    "youtube-subtitle": {
      "type": "streamableHttp",
      "url": "http://localhost:3000/mcp",
      "timeout": 600
    }
  }
}

Tool: fetch_youtube_subtitles

Parameters

ParameterTypeRequiredDescriptionExample
urlstringYesYouTube video URL or video IDhttps://www.youtube.com/watch?v=dQw4w9WgXcQ
formatstringNoOutput format (default: JSON)SRT, VTT, TXT, JSON
langstringNoLanguage code (default: auto)zh-Hans, en, ja

Supported URL Formats

  • Standard: https://www.youtube.com/watch?v=VIDEO_ID
  • Short: https://youtu.be/VIDEO_ID
  • Embed: https://www.youtube.com/embed/VIDEO_ID
  • Direct ID: VIDEO_ID

Language Codes

  • zh-Hans - Simplified Chinese
  • zh-Hant - Traditional Chinese
  • en - English
  • ja - Japanese
  • ko - Korean
  • es - Spanish
  • fr - French
  • de - German

Usage Examples

Example 1: Fetch JSON Format Subtitles (Default)

Please fetch subtitles from this video:
https://www.youtube.com/watch?v=dQw4w9WgXcQ

Example 2: Fetch SRT Format Subtitles

Please fetch subtitles in SRT format from:
https://www.youtube.com/watch?v=dQw4w9WgXcQ

Example 3: Fetch Specific Language Subtitles

Please fetch Simplified Chinese subtitles in VTT format from:
https://www.youtube.com/watch?v=dQw4w9WgXcQ
Language code: zh-Hans

Example 4: Fetch Plain Text Content

Please fetch plain text subtitles from:
https://youtu.be/dQw4w9WgXcQ
Format: TXT

Output Format Examples

JSON Format

[
  {
    "text": "Hello world",
    "start": 0,
    "end": 2000,
    "duration": 2000
  },
  {
    "text": "Welcome to YouTube",
    "start": 2000,
    "end": 5000,
    "duration": 3000
  }
]

SRT Format

1
00:00:00,000 --> 00:00:02,000
Hello world

2
00:00:02,000 --> 00:00:05,000
Welcome to YouTube

VTT Format

WEBVTT

00:00:00.000 --> 00:00:02.000
Hello world

00:00:02.000 --> 00:00:05.000
Welcome to YouTube

TXT Format

Hello world
Welcome to YouTube
This is a subtitle example

Project Structure

youtube-subtitle-mcp/
 src/
    index.ts              # stdio mode entry (recommended for local use)
    httpServer.ts         # HTTP mode entry (for server deployment)
    tools/
        fetchYoutubeSubtitles.ts  # Main tool implementation
        formatters.ts     # Format converters (SRT/VTT/TXT/JSON)
        utils.ts          # Utility functions
 build/                    # Compiled JavaScript (generated)
 package.json
 tsconfig.json
 README.md

Development

Build

npm run build

Watch Mode

npm run watch

Start stdio Mode

npm run start:stdio

Start HTTP Mode

npm run start:http

Custom Port (HTTP Mode)

PORT=8080 npm run start:http

Docker Deployment

Using Docker

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "run", "start:http"]
# Build image
docker build -t youtube-subtitle-mcp .

# Run container
docker run -d -p 3000:3000 --name youtube-mcp youtube-subtitle-mcp

Using Docker Compose

version: '3.8'
services:
  youtube-subtitle-mcp:
    build: .
    ports:
      - "3000:3000"
    environment:
      - PORT=3000
    restart: unless-stopped
docker-compose …

相关 MCP Servers(来自「multimedia-processing」)

幻灯片编辑器(FastMCP)

一个由FastMCP驱动的服务器,用于通过编程方式创建、编辑和渲染PowerPoint(PPTX)演示文稿,具有幻灯片创建、内容插入和PNG渲染等功能。

@samos123/pptx-mcp

Ableton AI助手连接器

通过模型上下文协议(MCP)将 Ableton Live 与人工智能助手连接起来,实现对音乐制作任务的自然语言控制,例如轨道创建、MIDI 编辑、乐器加载和播放控制。

@itsuzef/ableton-mcp

capture-win-mcp

暂无描述。

@huegli/capture-win-mcp

getscreen_mcp

暂无描述。

@Kirchlive/getscreen_mcp

kodi-mcp-server

暂无描述。

@laHeud/kodi-mcp-server

lightfastai

暂无描述。

@lightfastai/lightfast-mcp

自动安装

点击按钮会唤起 PolarBear 客户端,并把当前 MCP Server 的 Markdown 详情文档地址传给客户端。

/api/mcps/guangxiangdebizi-youtube-subtitle-mcp/markdown
打开 PolarBear 安装查看 Markdown 文档

手动安装

在 PolarBear 或其他支持 MCP 的客户端中,新建 MCP Server,并参考下方来源或安装提示配置。

npx -y youtube-subtitle-mcp

基本信息

分类
multimedia-processing / entertainment-and-media / web-scraping
运行方式
No
许可证
Other
详情文件
guangxiangdebizi-youtube-subtitle-mcp.md