Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"youtube-organic": {
"env": {
"YOUTUBE_CLIENT_ID": "your_client_id.apps.googleusercontent.com",
"YOUTUBE_CLIENT_SECRET": "your_client_secret",
"YOUTUBE_REFRESH_TOKEN": "1//your_refresh_token"
},
"args": [
"/path/to/youtube-organic-mcp/dist/index.js"
],
"command": "node"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
MCP server for YouTube organic analytics — channel stats, video performance, watch time, and audience engagement via the YouTube Data API v3 and YouTube Analytics API v2.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
uvx 'google-auth-oauthlib' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked google-auth-oauthlib against OSV.dev.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in analytics / marketing
⚡ A Simple / Speedy / Secure Link Shortener with Analytics, 100% run on Cloudflare.
MCP Server for GCP environment for interacting with various Observability APIs.
DataForSEO API modelcontextprotocol server
MCP server that enables AI agents to perform comprehensive web audits using Google Lighthouse with 13+ tools for performance, accessibility, SEO, and security analysis.
MCP Security Weekly
Get CVE alerts and security updates for io.github.lanternrow/youtube-organic-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
MCP server for YouTube organic analytics — channel stats, video performance, watch time, and audience engagement via the YouTube Data API v3 and YouTube Analytics API v2.
Built for Claude Code and any MCP-compatible AI tool. Gives your AI assistant direct, read-only access to your own channel's organic data — subscribers, views, watch time, per-video engagement, and day-by-day trends.
Part of The SEO Engine toolkit by Rex Jones — AI-powered SEO and social media tooling for agencies and businesses.
| Tool | Description |
|---|---|
list_accounts | List configured channels and the default |
get_channel_info | Channel profile + lifetime stats (subscribers, total views, video count, uploads playlist) |
get_videos | Paginated uploads with per-video views, likes, comments, duration |
get_video_details | Details for specific video IDs (batch up to 50) |
get_channel_analytics | Channel analytics over a date range: views, watch time, avg view duration/%, subs gained/lost, likes, comments, shares — optionally by day |
get_video_analytics | The same metrics for a single video over a date range |
All tools accept an optional account parameter for multi-account setups.
In Google Cloud Console (any project — you can reuse an existing one), enable YouTube Data API v3 and YouTube Analytics API.
Create an OAuth client of type Desktop app and download its client_secret JSON. Then run the helper (needs pip install google-auth-oauthlib):
python3 scripts/get_youtube_token.py /path/to/client_secret.json my-channel
Authorize with the Google account that owns the channel (pick the Brand Account if prompted). It prints the three YOUTUBE_* values to drop into your config and writes them to .youtube_account.json (gitignored).
Add to your Claude Code MCP settings:
{
"mcpServers": {
"youtube-organic": {
"command": "node",
"args": ["/path/to/youtube-organic-mcp/dist/index.js"],
"env": {
"YOUTUBE_CLIENT_ID": "your_client_id.apps.googleusercontent.com",
"YOUTUBE_CLIENT_SECRET": "your_client_secret",
"YOUTUBE_REFRESH_TOKEN": "1//your_refresh_token"
}
}
}
}
Or set YOUTUBE_ACCOUNTS to a JSON array for multiple channels (see .env.example).
src/
index.ts # MCP server entry point, tool registration
accounts.ts # Multi-account resolution (client_id/secret/refresh_token)
client.ts # OAuth token minting + Data/Analytics API HTTP client
types.ts # TypeScript interfaces for API responses
tools/
channel.ts # get_channel_info + uploads-playlist resolver
videos.ts # get_videos, get_video_details
analytics.ts # get_channel_analytics, get_video_analytics
fetch (Node 18+)MIT