youtube-rss-mcp-server
v1.0.2
Published
Model Context Protocol (MCP) server for generating YouTube RSS feed URLs from various YouTube URL formats
Downloads
2
Readme
YouTube RSS Feed Generator MCP Server
An MCP (Model Context Protocol) server that generates RSS feed URLs from various YouTube URL formats.
Quick Start
- Add to Claude Desktop config (
~/Library/Application Support/Claude/claude_desktop_config.jsonon macOS):
{
"mcpServers": {
"youtube-rss": {
"command": "npx",
"args": ["-y", "youtube-rss-generator"]
}
}
}Restart Claude Desktop
Use it! Ask Claude: "Generate RSS feed for https://www.youtube.com/channel/UCXuqSBlHAE6Xw-yeJA0Tunw"
Features
Comprehensive URL Support: Handles 20+ YouTube URL formats including:
- Channel IDs (
youtube.com/channel/[CHANNEL_ID]) ✅ - Handles (
youtube.com/@[HANDLE]) ✅ - Custom names (
youtube.com/c/[CUSTOM_NAME]) ✅ - Usernames (
youtube.com/user/[USERNAME]) ✅ - Playlists (
youtube.com/playlist?list=[PLAYLIST_ID]) ✅ - Videos (
youtube.com/watch?v=[VIDEO_ID]) ✅ - Extracts channel RSS - Shorts (
youtube.com/shorts/[VIDEO_ID]) ✅ - Extracts channel RSS - Live streams (
youtube.com/live/[VIDEO_ID]) ✅ - Extracts channel RSS - Mobile URLs (
m.youtube.com) - International TLDs (
youtube.co.uk,youtube.de, etc.) - Short URLs (
youtu.be)
- Channel IDs (
RSS Feed Validation: Automatically validates generated RSS feeds are accessible
Batch Processing: Process multiple URLs at once
Intelligent Caching: Cache validation results to improve performance
Error Handling: Comprehensive error messages with helpful guidance
Installation & Setup
Option 1: Install Locally (Development)
# Clone or navigate to the project directory
cd /path/to/youtube-rss-generator
# Install dependencies using bun (recommended)
bun install
# Or using npm
npm install
# Build the project
bun run build
# or
npm run buildOption 2: Use via npx (No Installation)
You can run the server directly without installation:
npx -y youtube-rss-generatorUsage
Integrating with Claude Desktop
To use this MCP server with Claude Desktop, you need to add it to your configuration file:
1. Locate your Claude Desktop configuration
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
2. Edit the configuration
Open the config file and add the youtube-rss server:
{
"mcpServers": {
"youtube-rss": {
"command": "npx",
"args": ["-y", "youtube-rss-generator"]
}
}
}If you have other MCP servers already configured, add it to the existing list:
{
"mcpServers": {
"existing-server": {
"command": "...",
"args": [...]
},
"youtube-rss": {
"command": "npx",
"args": ["-y", "youtube-rss-generator"]
}
}
}3. Restart Claude Desktop
After saving the configuration, restart Claude Desktop for the changes to take effect.
Using the MCP Server in Claude
Once configured, you can use the tools in Claude by asking:
- "Generate an RSS feed for this YouTube channel: https://www.youtube.com/channel/UCXuqSBlHAE6Xw-yeJA0Tunw"
- "Convert these YouTube URLs to RSS feeds: [list of URLs]"
- "Get the RSS feed for LinusTechTips YouTube channel"
The server will automatically be invoked when Claude detects you need to generate YouTube RSS feeds.
Running Standalone (for testing)
You can also run the server standalone for testing:
# Using npx
npx -y youtube-rss-generator
# Or if installed locally
node dist/index.jsThe server will start and wait for MCP protocol commands via stdio.
Example Usage Scenarios
Example 1: Get RSS feed for a YouTube Channel
Input:
"Generate RSS feed for https://www.youtube.com/channel/UCXuqSBlHAE6Xw-yeJA0Tunw"Output:
RSS Feed URL: https://www.youtube.com/feeds/videos.xml?channel_id=UCXuqSBlHAE6Xw-yeJA0Tunw
✅ Feed validated and accessibleExample 2: Convert a Playlist URL
Input:
"Get RSS for https://www.youtube.com/playlist?list=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf"Output:
RSS Feed URL: https://www.youtube.com/feeds/videos.xml?playlist_id=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf
✅ Feed validated and accessibleExample 3: Batch Process Multiple URLs
Input:
"Convert these to RSS feeds:
- youtube.com/user/LinusTechTips
- youtube.com/channel/UCXuqSBlHAE6Xw-yeJA0Tunw
- youtube.com/playlist?list=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf"Output:
Processed 3 URLs:
✅ https://www.youtube.com/feeds/videos.xml?user=LinusTechTips
✅ https://www.youtube.com/feeds/videos.xml?channel_id=UCXuqSBlHAE6Xw-yeJA0Tunw
✅ https://www.youtube.com/feeds/videos.xml?playlist_id=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf
Success: 3/3Example 4: Handling Unsupported URLs
Input:
"Get RSS for https://www.youtube.com/@mkbhd"Output:
⚠️ Cannot generate RSS feed for YouTube handles (@mkbhd)
Handles require channel ID resolution which needs API access.
Please find the channel ID or use the /user/ or /channel/ URL format.Available Tools
generate_rss_feed
Generate a RSS feed URL from a single YouTube URL.
Parameters:
url(string, required): YouTube URL in any supported formatvalidate(boolean, optional): Whether to validate the RSS feed is accessible (default: true)
Example Response:
{
"success": true,
"feedUrl": "https://www.youtube.com/feeds/videos.xml?channel_id=UCXuqSBlHAE6Xw-yeJA0Tunw",
"feedType": "channel",
"sourceType": "channel_id",
"extractedId": "UCXuqSBlHAE6Xw-yeJA0Tunw",
"validation": {
"performed": true,
"isValid": true,
"statusCode": 200,
"error": null
},
"metadata": {
"originalUrl": "youtube.com/channel/UCXuqSBlHAE6Xw-yeJA0Tunw",
"normalizedUrl": "https://www.youtube.com/channel/UCXuqSBlHAE6Xw-yeJA0Tunw"
}
}batch_generate_rss_feeds
Process multiple YouTube URLs at once.
Parameters:
urls(string[], required): Array of YouTube URLsvalidate(boolean, optional): Whether to validate each RSS feed (default: true)continueOnError(boolean, optional): Continue processing if a URL fails (default: true)
Example Response:
{
"results": [...],
"totalProcessed": 5,
"successCount": 4,
"failureCount": 1
}Supported URL Formats
Channels
youtube.com/channel/[CHANNEL_ID]→ ✅ Direct RSS generationyoutube.com/@[HANDLE]→ ✅ Automatically resolves to channel RSSyoutube.com/c/[CUSTOM_NAME]→ ✅ Automatically resolves to channel RSSyoutube.com/user/[USERNAME]→ ✅ Direct RSS generationyoutube.com/[CUSTOM_NAME]→ ✅ Automatically resolves to channel RSS
Playlists
youtube.com/playlist?list=[PLAYLIST_ID]→ ✅ Extracts channel RSS from playlist owneryoutube.com/watch?v=[VIDEO_ID]&list=[PLAYLIST_ID]→ ✅ Extracts channel RSS from playlist owner
Videos (Channel RSS extracted)
youtube.com/watch?v=[VIDEO_ID]→ ✅ Extracts channel RSS from videoyoutu.be/[VIDEO_ID]→ ✅ Extracts channel RSS from videoyoutube.com/shorts/[VIDEO_ID]→ ✅ Extracts channel RSS from shortyoutube.com/live/[VIDEO_ID]→ ✅ Extracts channel RSS from live stream
Output RSS Feed Formats
The server generates three types of RSS feed URLs:
- Channel Feed:
https://www.youtube.com/feeds/videos.xml?channel_id=[CHANNEL_ID] - User Feed:
https://www.youtube.com/feeds/videos.xml?user=[USERNAME] - Playlist Feed:
https://www.youtube.com/feeds/videos.xml?playlist_id=[PLAYLIST_ID]
Limitations
Network Dependency: The server now fetches YouTube pages to extract channel information from videos, playlists, handles, and custom names. This requires network access and may be affected by YouTube's rate limiting or changes to their page structure.
Rate Limiting: YouTube may rate limit both RSS feed access and page fetching. The server includes caching to minimize repeated requests.
Page Structure Changes: Channel extraction from videos and playlists depends on YouTube's HTML structure. If YouTube changes their page layout, extraction may fail until the patterns are updated.
Development
Running Tests
bun test
# or
npm testRunning in Development
bun run dev
# or
npm run devError Handling
The server provides detailed error messages for common issues:
- Invalid URL formats
- Unsupported content types (individual videos)
- Network errors during validation
- Rate limiting issues
License
MIT
