social-video-mcp
An MCP server that enables AI agents to play and control YouTube and TikTok videos through a native mpv player window. It supports browsing subscriptions, searching content, managing playlists, and fetching video metadata using authenticated browser cookies.
README
social-video-mcp
MCP server that gives AI agents the ability to play videos from YouTube and TikTok, browse your accounts, and control playback — all through a lightweight mpv player window.
Built for Claude Code and any MCP-compatible client.
https://github.com/user-attachments/assets/08ddb1b3-ed0f-4de3-b465-c0b58ebfa894
Features
Playback — Play videos from YouTube or TikTok in a native mpv window with full remote control:
- Play, pause, stop, seek
- Playlist playback with next/prev navigation and shuffle
- Queue videos without interrupting current playback
- Audio-only mode for podcasts and music while you code
- Authenticated playback via browser cookies (age-restricted, private videos)
Smart Recommendations — Ask for similar content based on what's currently playing. Finds related videos and queues them automatically.
Infinite Playlists — TikTok and YouTube Shorts playlists auto-refill as you watch. Never runs out.
YouTube Account — Browse your YouTube account directly from your AI agent:
- Subscription feed, liked videos, watch later, history
- List subscribed channels
- Browse channel uploads and Shorts
- Search YouTube with personalized results
TikTok — Browse and play TikTok content:
- Fetch videos from any TikTok user profile
- Play a user's videos as a continuous playlist
Multi-Browser Support — Switch between Chrome, Firefox, Brave, Edge, Safari, Opera, Chromium, or Vivaldi for cookie-based authentication.
Video Info — Fetch metadata without playing: title, description, chapters, duration, tags, view/like counts.
Prerequisites
brew install mpv yt-dlp
- mpv — Lightweight video player
- yt-dlp — Video stream resolver and cookie extractor
- A supported browser — Logged into YouTube/TikTok (Chrome, Firefox, Brave, Edge, Safari, Opera, Chromium, Vivaldi)
- Node.js >= 18
Installation
git clone https://github.com/ronantakizawa/social-video-mcp.git
cd social-video-mcp
npm install
npm run build
Configuration
Add to your Claude Code config (~/.claude.json):
{
"mcpServers": {
"social-video": {
"type": "stdio",
"command": "node",
"args": ["/path/to/social-video-mcp/dist/index.js"]
}
}
}
Then restart Claude Code.
Tools
Playback
| Tool | Description |
|---|---|
play_video |
Play a YouTube or TikTok video. Optional timestamp and audio_only mode. |
play_audio |
Play audio only — no video window. Great for podcasts and music. |
play_playlist |
Play an entire YouTube playlist. Optional shuffle. |
queue_video |
Add a video to the queue without interrupting current playback. |
pause_video |
Toggle pause/resume. |
stop_video |
Stop playback and close the player window. |
seek_video |
Seek to an absolute position in seconds. |
next_video |
Skip to the next video in a playlist. |
prev_video |
Go back to the previous video in a playlist. |
get_status |
Get current playback state: title, position, duration, paused. |
Smart Features
| Tool | Description |
|---|---|
play_similar |
Find and play/queue videos similar to what's currently playing. |
YouTube Account
| Tool | Description |
|---|---|
get_youtube_feed |
Fetch your subscription feed, liked videos, watch later, or history. |
get_subscribed_channels |
List your subscribed YouTube channels. |
get_channel_videos |
List recent uploads from a specific channel. |
get_channel_shorts |
List recent Shorts from a specific channel. |
get_subscription_shorts |
Fetch recent Shorts from your subscribed channels. |
play_shorts |
Play Shorts as a continuous auto-advancing playlist. |
search_youtube |
Search YouTube with personalized results. |
TikTok
| Tool | Description |
|---|---|
get_tiktok_user_videos |
Fetch recent videos from a TikTok user profile. |
play_tiktok_user |
Play a TikTok user's videos as an infinite continuous playlist. |
Settings
| Tool | Description |
|---|---|
set_browser |
Switch browser for cookie auth (chrome, firefox, brave, edge, safari, opera, chromium, vivaldi). |
get_browser |
Check which browser is currently active. |
get_video_info |
Fetch full video metadata from YouTube or TikTok. |
How It Works
- Playback: Spawns
mpvwith--input-ipc-serverfor JSON IPC control over a Unix socket. All playback commands (pause, seek, next/prev) are sent through this socket. - Data Fetching: Calls
yt-dlpdirectly with-J --flat-playlist --cookies-from-browser <browser>to fetch structured JSON from video platforms. - Authentication: Reads cookies from your browser's local storage via yt-dlp's
--cookies-from-browserflag. No OAuth setup required — if you're logged into a platform in your browser, it just works. - Auto-Refill: A background monitor watches playlist position and fetches more content when running low, appending via mpv's
loadfile appendIPC command.
Platform Support
| Feature | YouTube | TikTok |
|---|---|---|
| Play single video | Yes | Yes |
| User profile feed | Yes | Yes |
| Account feeds | Yes (subs, liked, history) | No |
| Search | Yes | No |
| Shorts | Yes | N/A |
| Queue management | Yes | Yes |
| Audio-only | Yes | Yes |
| Smart recommendations | Yes | Yes |
Example Usage
> Play my subscription feed
> Search YouTube for "rust programming tutorials" and play the first result
> Show me the latest TikToks from @nba
> Play TikTok videos from @khaby.lame
> Queue this video without stopping what's playing: <url>
> Play similar videos to what's on now
> Just play the audio, I don't need video
> Switch to Firefox for cookies
> What chapters does this video have? Then skip to chapter 3
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。