youtube-personal-feed
MCP server that connects to your personal YouTube account and exposes your subscription feed, letting you list subscribed channels, recent uploads, and get YouTube watch links for handoff to other MCPs.
README
youtube-personal-feed
An MCP server that connects to your personal YouTube account and exposes your subscription feed to AI assistants: list your subscribed channels, list the most recent uploads across your feed, and get https://www.youtube.com/watch?v= links that can be handed off to other MCPs (for example transcript-extraction tools).
Requirements
- Node.js 18+
- A Google account and a Google Cloud project with the YouTube Data API v3 enabled
- An MCP client (opencode, Claude Desktop, etc.)
Google Cloud Console setup (one-time)
-
Go to https://console.cloud.google.com and create a project (or reuse one).
-
Enable the API: APIs & Services -> Library -> search "YouTube Data API v3" -> Enable.
-
OAuth consent screen: APIs & Services -> OAuth consent screen.
- User type: External, then add your own Gmail address as a test user.
- Add the scope
https://www.googleapis.com/auth/youtube.readonly.
-
Create a Desktop client: APIs & Services -> Credentials -> Create credentials -> OAuth client ID -> Application type Desktop app.
- No redirect URI needs to be registered; loopback redirect is allowed for Desktop clients.
-
Copy the Client ID and Client secret into a
.envfile at the repo root:CLIENT_ID=xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com CLIENT_SECRET=GOCSPX-xxxxxxxxxxxxxxxxxxxxxxxx(
cp .env.example .envfirst.)
Install and authenticate
Global installation
Install the published package globally to run the CLI and MCP server from any directory:
npm install -g youtube-personal-feed
Create ~/.config/youtube-mcp/.env with your Google Desktop OAuth credentials:
mkdir -p ~/.config/youtube-mcp
cat > ~/.config/youtube-mcp/.env <<'EOF'
CLIENT_ID=xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
CLIENT_SECRET=GOCSPX-xxxxxxxxxxxxxxxxxxxxxxxx
EOF
chmod 600 ~/.config/youtube-mcp/.env
Authenticate once, then run either executable from any directory:
youtube-personal-feed-auth
youtube-personal-feed subscriptions --limit 20
youtube-personal-feed-mcp
The OAuth token is stored at ~/.config/youtube-mcp/token.json. You can instead provide CLIENT_ID and CLIENT_SECRET as environment variables.
Local development
npm install
npm run auth
npm run auth prints a URL, opens your browser, and asks you to consent. Tokens are stored in ~/.config/youtube-mcp/token.json (read-only to you) and are refreshed automatically at runtime.
Note: because this uses an unverified "Desktop app" client, Google shows a "Google hasn't verified this app" warning the first time. Click Advanced -> Go to <project> (unsafe) to proceed.
Register with an MCP client
-
opencode: a project-level
.mcp.jsonis included. It registers the server asyoutube-personal-feedwithnpx tsx src/index.ts. Reopen opencode in this directory to pick it up. -
Claude Desktop: add to
claude_desktop_config.json:{ "mcpServers": { "youtube-personal-feed": { "command": "youtube-personal-feed-mcp" } } } -
Local development: use
npx tsx src/index.tswithcwdset to the repository.
Tools
| Tool | Inputs | Output |
|---|---|---|
list_subscriptions |
query?, maxResults? (default 50) |
channelId, title, channelUrl, thumbnail, publishedAt |
list_feed |
limit? (default 20), sinceDays?, channelId? |
latest uploads across subscriptions: videoId, title, channelTitle, publishedAt, videoUrl |
list_channel_uploads |
channelId, maxResults? (default 15) |
uploads for any channel, same fields |
get_video |
videoId |
snippet/contentDetails/statistics + videoUrl + channelUrl |
Feed items always include videoUrl in the form https://www.youtube.com/watch?v=<id> — the format accepted by most transcript-extraction MCP servers.
list_feed vs. list_channel_uploads
| Use case | Tool | Behavior |
|---|---|---|
| See recent videos from all subscriptions | list_feed |
Fetches recent uploads across your subscriptions and sorts the combined results by publication date. |
| See recent videos from one subscription | list_feed with channelId |
Limits the subscription feed to that channel. |
| See recent videos from any known channel | list_channel_uploads |
Fetches that channel directly; it does not need to be one of your subscriptions. |
For example, first call list_subscriptions to obtain a subscribed channel's channelId, then pass it to list_feed:
{
"channelId": "UCJaGVXG4KgOUXUtcmAHAOdA",
"limit": 10
}
Use list_channel_uploads with that same ID if the channel is not in your subscriptions, or if you specifically want a direct per-channel lookup.
CLI
The CLI uses the same OAuth credentials and token as the MCP server. Run youtube-personal-feed after global installation, or use npm run cli -- while developing:
youtube-personal-feed subscriptions --query running --limit 20
youtube-personal-feed feed --limit 10 --since-days 7 # all subscriptions
youtube-personal-feed feed --channel-id UCJaGVXG4KgOUXUtcmAHAOdA # one subscription
youtube-personal-feed uploads UCJaGVXG4KgOUXUtcmAHAOdA --limit 15 # any channel
youtube-personal-feed video 64wtzsSQx84
For local development:
npm run cli -- subscriptions --query running --limit 20
npm run cli -- feed --limit 10 --since-days 7
npm run cli -- feed --channel-id UCJaGVXG4KgOUXUtcmAHAOdA --limit 10
npm run cli -- uploads UCJaGVXG4KgOUXUtcmAHAOdA --limit 15
npm run cli -- video 64wtzsSQx84
Each command writes JSON to standard output. Run youtube-personal-feed --help (or npm run cli -- --help) for the command reference.
Quota
The YouTube Data API default quota is 10,000 units/day. List calls cost ~1 unit each. This server caches subscriptions for 30 minutes and per-channel uploads for 10 minutes, so a full feed refresh over ~100 subscriptions costs about 100 units. If you hit the quota, the tools return a clear error; wait until the next day or request more quota.
Development
npm run typecheck # type-check
npm run lint # lint and check formatting
npm run format # apply source formatting
npm run build # compile to dist/
npm run smoke # sanity check auth + subscriptions (prints real data)
npm install installs a pre-commit hook. Commits run staged TypeScript files through Biome and then run npm run typecheck. Bypass this only when necessary with git commit --no-verify.
Project layout
src/config.ts # env loading, credential + token path helpers
src/auth.ts # one-time OAuth loopback flow (npm run auth)
src/youtube.ts # YouTube Data API v3 wrapper + caching
src/index.ts # MCP server (McpServer, stdio, 4 tools)
src/types.ts # shared types
scripts/smoke.ts
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。