- Home
- MCP servers
- YouTube
YouTube
- typescript
3
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"nattyraz-youtube-mcp": {
"command": "node",
"args": [
"path/to/youtube-mcp/build/index.js"
],
"env": {
"YOUTUBE_API_KEY": "your_api_key",
"YOUTUBE_CLIENT_ID": "your_client_id",
"YOUTUBE_CLIENT_SECRET": "your_client_secret",
"YOUTUBE_REFRESH_TOKEN": "your_refresh_token"
}
}
}
}You can run a YouTube MCP Server to extract video metadata, retrieve captions, and convert content to Markdown using flexible templates. This server supports multiple languages, authentication methods, and template options, making it easy to integrate YouTube data into your workflows.
How to use
You interact with the YouTube MCP Server through an MCP client to fetch video information, retrieve captions, and convert transcripts into Markdown using predefined templates. Start by obtaining a YouTube video URL, then decide which action you want: view metadata, pull captions in a chosen language, or generate a Markdown transcript with a selected template. You can also search within captions and customize the output with options like including chapters or a keyword search context.
How to install
Prerequisites: Node.js v16 or higher, and npm or yarn.
Step 1: Install dependencies and build the server.
# 1) Install dependencies
npm install
# 2) Build the project
npm run build
Configuration and running the server
Configure your YouTube credentials in a .env file at the project root with the following keys.
YOUTUBE_API_KEY=your_api_key
YOUTUBE_CLIENT_ID=your_client_id
YOUTUBE_CLIENT_SECRET=your_client_secret
YOUTUBE_REFRESH_TOKEN=your_refresh_token # Optional, for OAuth2
MCP configuration example
Add this server to your MCP settings to enable local execution with Node.js and the built build output.
{
"mcpServers": {
"youtube": {
"command": "node",
"args": ["path/to/youtube-mcp/build/index.js"],
"env": {
"YOUTUBE_API_KEY": "your_api_key",
"YOUTUBE_CLIENT_ID": "your_client_id",
"YOUTUBE_CLIENT_SECRET": "your_client_secret"
},
"disabled": false,
"alwaysAllow": []
}
}
}
Usage examples
Once the server is running, you can use the MCP client to perform actions such as getting video info, retrieving captions, or converting transcripts to Markdown with a chosen template.
Available tools
get_video_info
Fetches comprehensive metadata for a YouTube video given its URL.
get_captions
Extracts captions for a video in a specified language, supporting auto-generated and manual captions.
convert_to_markdown
Converts video metadata and captions into Markdown using a selected template (basic, detailed, or search).
list_templates
Lists available Markdown templates and their formats.