
youtube transcript server
一个用于从YouTube视频中提取和格式化字幕的MCP服务器。
Repository Info
About This Server
一个用于从YouTube视频中提取和格式化字幕的MCP服务器。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
YouTube Transcript MCP Server
This MCP server provides a tool to fetch and format transcripts from YouTube videos.
Features
- Fetch transcripts from YouTube videos using the video URL
- Support for language selection (optional)
- Formatted output with timestamps
- Error handling for invalid URLs or unavailable transcripts
Installation
- Make sure you have Node.js installed
- Install dependencies:
npm install - Make the script executable:
chmod +x index.mjs
Adding to MCP Settings
To add this server to your MCP settings, add the following configuration to your MCP settings file:
For Claude Desktop App (macOS)
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"youtube-transcript": {
"command": "node",
"args": ["/path/to/youtube-transcript-server/index.mjs"],
"disabled": false,
"autoApprove": []
}
}
}
For Claude VSCode Extension
Edit ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json:
{
"mcpServers": {
"youtube-transcript": {
"command": "node",
"args": ["/absolute/path/to/youtube-transcript-server/index.mjs"],
"disabled": false,
"autoApprove": []
}
}
}
Replace /path/to/youtube-transcript-server with the actual path to where you've saved this project.
Usage
Once the server is added to your MCP settings, you can use it in Claude with the following tool:
get_transcript
Fetches the transcript of a YouTube video.
Parameters:
url(required): The YouTube video URL (e.g., https://www.youtube.com/watch?v=VIDEO_ID)language(optional): Language code for the transcript (e.g., "en" for English, "zh" for Chinese)
Example:
<use_mcp_tool>
<server_name>youtube-transcript</server_name>
<tool_name>get_transcript</tool_name>
<arguments>
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
</arguments>
</use_mcp_tool>
To specify a language:
<use_mcp_tool>
<server_name>youtube-transcript</server_name>
<tool_name>get_transcript</tool_name>
<arguments>
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"language": "en"
}
</arguments>
</use_mcp_tool>
Language Support
The YouTube Transcript API supports various languages for transcripts. The availability of languages depends on the specific video and what captions are available for it.
Supported Language Codes
en- Englishzh- Chinese (Simplified/Mandarin)es- Spanishar- Arabicru- Russianko- Korean- And many more...
For Chinese language support, use the language code zh. Other variants like zh-CN, zh-TW, or zh-HK may not be supported for all videos.
Troubleshooting
If you encounter issues:
- Make sure the YouTube video has captions available
- Check that the URL is correctly formatted
- Verify that the MCP server is properly configured in your settings
- Check the console output for any error messages
- If a specific language isn't working, try using the base language code (e.g., use
zhinstead ofzh-CN)
Quick Start
Clone the repository
git clone https://github.com/deencat/youtube-transcript-serverInstall dependencies
cd youtube-transcript-server
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.