twitter-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@twitter-mcptweet 'Hello from MCP!'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🐦 twitter-mcp
Playwright ile geliştirilmiş X (Twitter) tarayıcı otomasyon aracı. Birden fazla hesapla tweet atma, beğenme, retweet, yanıtlama ve daha fazlasını otomatikleştirin.
✨ Özellikler
🔐 Kalıcı oturumlarla çoklu hesap yönetimi
📝 Metin ve görsel ile tweet atma
❤️ Tweet beğenme
🔄 Retweet yapma
💬 Tweet'lere yanıt verme
🎯 Alıntı tweet atma
🚀 Otomasyon için REST API
🔔 Webhook bildirimleri
🌐 Tarayıcı tabanlı otomasyon (API anahtarı gerektirmez)
Related MCP server: TwitterAPI MCP Server
📋 Gereksinimler
Node.js >= 20
npm veya yarn
🚀 Hızlı Başlangıç
Kurulum
npm installKurulum
İlk profilinizi yapılandırmak için kurulum scriptini çalıştırın:
npm run setupBu komut, profil oluşturma ve X'e giriş yapma sürecinde size rehberlik edecektir.
API Sunucusunu Başlatma
npm run serverSunucu http://localhost:4000 adresinde başlayacaktır.
🔧 API Endpoint'leri
POST /api/login
Yeni profil oluştur ve giriş yap
{
"username": "kullanici_adiniz",
"password": "sifreniz"
}GET /api/profiles
Tüm kimlik doğrulaması yapılmış profilleri listele
POST /api/retweet
Birden fazla hesaptan retweet yap
{
"tweetUrl": "https://x.com/user/status/123456",
"profiles": ["profil1", "profil2"]
}POST /api/like
Birden fazla hesaptan tweet beğen
{
"tweetUrl": "https://x.com/user/status/123456",
"profiles": ["profil1", "profil2"]
}POST /api/reply
Birden fazla hesaptan tweet'e yanıt ver
{
"tweetUrl": "https://x.com/user/status/123456",
"content": "Harika tweet!",
"profiles": ["profil1", "profil2"],
"imagePaths": ["resim/yolu/image.jpg"]
}DELETE /api/profile/:name
Profil sil
📜 Script'ler
Script'leri doğrudan da kullanabilirsiniz:
# Tweet at
echo '{"content":"Merhaba Dünya!","profile":"profilim"}' | npx tsx scripts/post.ts
# Tweet beğen
echo '{"tweetUrl":"https://x.com/user/status/123","profile":"profilim"}' | npx tsx scripts/like.ts
# Retweet yap
echo '{"tweetUrl":"https://x.com/user/status/123","profile":"profilim"}' | npx tsx scripts/retweet.ts
# Tweet'e yanıt ver
echo '{"tweetUrl":"https://x.com/user/status/123","content":"Güzel!","profile":"profilim"}' | npx tsx scripts/reply.ts
# Alıntı tweet at
echo '{"tweetUrl":"https://x.com/user/status/123","content":"Buna bakın","profile":"profilim"}' | npx tsx scripts/quote.ts
# Profilleri listele
npx tsx scripts/list-profiles.ts🔔 Webhook Bildirimleri
Bildirim almak için WEBHOOK_URL ortam değişkenini ayarlayın:
export WEBHOOK_URL=https://webhook-url-iniz.com/endpoint
npm run serverGönderilen olaylar:
login_success/login_failedretweet_completedlike_completedreply_completedprofile_deleted
🗂️ Proje Yapısı
twitter-mcp/
├── api-server.ts # REST API sunucusu
├── scripts/
│ ├── setup.ts # İlk kurulum sihirbazı
│ ├── auto-login.ts # Otomatik giriş
│ ├── post.ts # Tweet atma
│ ├── like.ts # Tweet beğenme
│ ├── retweet.ts # Retweet yapma
│ ├── reply.ts # Tweet'e yanıt verme
│ ├── quote.ts # Alıntı tweet atma
│ └── list-profiles.ts # Tüm profilleri listele
├── lib/ # Paylaşılan yardımcı araçlar
└── data/
└── profiles/ # Kullanıcı profilleri (gitignore'da)🔒 Güvenlik
Tüm profil verileri yerel olarak
data/profiles/dizininde saklanırKimlik bilgileri ve çerezler asla git'e commit edilmez
Hassas yapılandırma için ortam değişkenlerini kullanın
Her profil izole tarayıcı oturumlarına sahiptir
⚙️ Ortam Değişkenleri
PORT=4000 # API sunucu portu
WEBHOOK_URL=https://webhook-url-iniz.com # Webhook endpoint'i🛠️ Geliştirme
# Tip kontrolü
npm run typecheck
# İzleme modu (değişikliklerde otomatik yeniden başlatma)
npm run dev📝 Lisans
MIT
🤖 MCP Server Kullanımı
Bu proje aynı zamanda bir MCP (Model Context Protocol) server olarak da çalışır. AI asistanları (Kiro, Claude Desktop, vb.) doğrudan Twitter işlemlerini yapabilir.
MCP Server Kurulumu
Gerekli paketi yükle:
npm installMCP config dosyasını düzenle (
.kiro/settings/mcp.jsonveya~/.kiro/settings/mcp.json):
{
"mcpServers": {
"twitter-automation": {
"command": "npx",
"args": ["tsx", "/tam/yol/twitter-mcp/mcp-server.ts"],
"env": {
"API_BASE_URL": "https://your-ngrok-url.ngrok-free.dev"
},
"disabled": false,
"autoApprove": []
}
}
}Kiro'yu yeniden başlat veya MCP Server view'dan reconnect yap
Kullanılabilir MCP Tool'ları
twitter_health_check- API sunucu durumunu kontrol ettwitter_list_profiles- Kayıtlı hesapları listeletwitter_add_account- Yeni hesap ekletwitter_retweet- Retweet attwitter_like- Tweet beğentwitter_reply- Tweet'e yanıt vertwitter_delete_profile- Hesap sil
Örnek Kullanım (AI ile)
Sen: "Twitter hesaplarımı listele"
AI: twitter_list_profiles tool'unu kullanır
Sen: "Bu tweet'i tüm hesaplarımdan retweet et: https://x.com/user/status/123"
AI: twitter_retweet tool'unu kullanır
Sen: "hesap1 ve hesap2 ile bu tweet'e 'Harika!' diye yanıt ver"
AI: twitter_reply tool'unu kullanır⚠️ Sorumluluk Reddi
Bu araç eğitim amaçlıdır. Sorumlu bir şekilde ve X'in Hizmet Şartları'na uygun olarak kullanın. Otomatik işlemler platform politikalarını ihlal edebilir.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/onurerdog4n/twitter-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server