YouTube Comments MCP Server
Automates reading and replying to YouTube comments using the YouTube Data API v3. It handles moderation and auto-reply for simple comments while drafting responses for questions.
README
YouTube Yorum Cevaplama — Cowork için MCP Sunucusu
Kanalına gelen yorumları her sabah tarayıp cevap yazmayı sağlayan bir MCP sunucusu. Tarayıcı otomasyonu yok — doğrudan YouTube Data API v3 kullanır, bu yüzden hızlı ve kararlıdır.
Politika (zamanlanmış görevde uygulanır):
- Moderasyon: İncelemeye alınmış (held/olası spam) yorumlardan zararsız olanlar → otomatik onaylanır. Olumsuz, gerçek spam veya siyasi/imalı olanlar → held bırakılır, elle karar verirsin.
- Cevap: Soru içermeyen basit yorumlar (teşekkür, "elinize sağlık" vb.) → otomatik cevap. Soru içeren yorumlar → taslak hazırlanır, sen onaylayınca gönderilir.
Dosyalar
| Dosya | Ne işe yarar |
|---|---|
youtube_comments_mcp.py |
MCP sunucusu (5 araç: kanal bilgisi, yorum getir, cevap yaz, held yorumları getir, moderasyon durumu değiştir) |
auth_setup.py |
Tek seferlik OAuth yetkilendirme scripti (token.json üretir) |
requirements.txt |
Python bağımlılıkları |
client_secret.json |
(sen ekleyeceksin) Google Cloud OAuth istemci dosyası |
token.json |
(otomatik oluşur) Yetki token'ı |
Hepsini tek bir klasöre koy, örn: C:\youtube-mcp\
Adım 1 — Google Cloud kurulumu (tek seferlik)
- Google Cloud Console'a git, yeni bir proje oluştur.
- APIs & Services > Library → YouTube Data API v3'ü etkinleştir.
- APIs & Services > OAuth consent screen:
- User Type: External
- Uygulama adını gir, zorunlu alanları doldur.
- Test users kısmına kanalının sahibi olan Google hesabını ekle.
- Scope olarak
.../auth/youtube.force-sslyeterli.
- APIs & Services > Credentials → Create Credentials > OAuth client ID:
- Application type: Desktop app
- JSON'u indir, adını
client_secret.jsonyapıp klasöre koy.
Not: Uygulama "Testing" modundayken token 7 günde bir yenilenmesi gerekebilir. Sürekli çalışması için OAuth consent screen'i Publish (yayınla) edersen bu sınır kalkar.
Adım 2 — Python bağımlılıkları
Klasörde bir terminal aç:
pip install -r requirements.txt
Adım 3 — Yetkilendirme (tek seferlik)
python auth_setup.py
Tarayıcı açılır → kanalının sahibi olan hesapla giriş yap → izin ver.
Bittiğinde klasörde token.json oluşur. Bir daha tarayıcı gerekmez (token otomatik yenilenir).
Adım 4 — Claude Desktop'a MCP olarak ekle
Claude Desktop ayar dosyasını aç:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
mcpServers altına şunu ekle (yolları kendi klasörüne göre düzelt):
{
"mcpServers": {
"youtube-comments": {
"command": "python",
"args": ["C:\\youtube-mcp\\youtube_comments_mcp.py"],
"env": {
"YOUTUBE_MCP_DIR": "C:\\youtube-mcp"
}
}
}
}
pythonkomutu PATH'te değilse tam yol ver (örn.C:\\Python312\\python.exe). macOS'ta ters bölü yerine normal yol:"/Users/kmk/youtube-mcp/youtube_comments_mcp.py".
Claude Desktop'ı tamamen kapatıp yeniden aç. Artık Claude'da şu araçlar görünür:
get_channel_info, list_recent_comments, reply_to_comment,
list_held_comments, set_moderation_status.
Adım 5 — Test et
Cowork/Claude'a şunu yaz:
Kanalıma bağlı mı kontrol et (get_channel_info) ve son 5 cevaplanmamış yorumu getir.
Kanal adın ve yorumlar gelirse kurulum tamam.
Adım 6 — Her sabah otomatik çalıştır
gunluk_gorev_promptu.md dosyasındaki promptu kullanarak Cowork'te zamanlanmış
bir görev oluştur (ben bunu senin için kurabilirim). Görev her sabah:
- Held (incelemede bekleyen) yorumları çeker, zararsız olanları otomatik onaylar, şüphelileri held bırakır,
- Cevaplanmamış yayındaki yorumları çeker,
- Soru içermeyenlere otomatik cevap yazar, soru içerenlere taslak hazırlayıp sana onaya sunar,
- Hepsini tek bir yapısal raporda özetler.
Kota ve maliyet
YouTube Data API günlük ücretsiz kota: 10.000 birim. Yorum okuma ~1, cevap yazma ~50 birim. Günde onlarca cevap yazsan bile kota bitmez.
Güvenlik
Bu sunucu video yükleme/silme gibi yetkiler içermez, ama şunları yapabilir:
yorum okuma, yorumlara cevap yazma, ve yorum moderasyonu
(set_moderation_status ile bir yorumu yayınlama/reddetme, ban_author=true
ile yorum sahibini kanaldan engelleme). Bu son ikisi kanalına yazma/yönetim
erişimi gerektirir; client_secret.json ve token.json dosyalarını kimseyle
paylaşma.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.