Skip to main content
Glama
hasanoz07
by hasanoz07

📧 Gmail MCP Summarizer

Model Context Protocol (MCP) kullanarak Gmail ile etkileşime geçen akıllı mail asistanı.

🌟 Özellikler

  • Mail Okuma: Belirli gönderenden gelen mailleri otomatik çekme

  • Mail Gönderme: Ek dosyalı mail gönderme

  • PDF Oluşturma: Metin içeriğini PDF'e dönüştürme (Türkçe karakter desteği)

  • Akıllı Özet: Claude AI ile mail özetleme

  • Otomatik Yanıt: PDF ile otomatik ödev/rapor gönderme

🎯 Kullanım Senaryosu

  1. Hocadan gelen ödev maillerini otomatik oku

  2. Claude ile ödev gereksinimlerini özetle

  3. Ödev hazırlandıktan sonra PDF'e çevir

  4. Otomatik olarak hocaya geri gönder

🛠️ Kurulum

Gereksinimler

  • Python 3.8+

  • Gmail hesabı

  • Claude Desktop uygulaması

  • Google Cloud Console erişimi

1. Repoyu Klonla

git clone https://github.com/hasanoz07/mcp-gmail-summarizer.git
cd mcp-gmail-summarizer

2. Virtual Environment Oluştur

python3 -m venv venv
source venv/bin/activate  # Mac/Linux
# veya
venv\Scripts\activate  # Windows

3. Paketleri Yükle

pip install -r requirements.txt

4. Google Cloud Console Ayarları

  1. Google Cloud Console git

  2. Yeni proje oluştur

  3. Gmail API'yi etkinleştir

  4. OAuth 2.0 Credentials oluştur (Desktop App)

  5. credentials.json dosyasını indir ve proje klasörüne koy

5. İlk Kimlik Doğrulama

python test_gmail.py

Tarayıcı açılacak, Gmail hesabına izin ver.

6. Claude Desktop Konfigürasyonu

Mac:

nano ~/Library/Application\ Support/Claude/claude_desktop_config.json

Windows:

%APPDATA%\Claude\claude_desktop_config.json

Şunu ekle (yolları kendinize göre düzenleyin):

{
  "mcpServers": {
    "gmail-summarizer": {
      "command": "/PATH/mcp-gmail-summarizer/venv/bin/python3",
      "args": [
        "/PATH/mcp-gmail-summarizer/gmail_mcp_server.py"
      ]
    }
  }
}

7. Claude Desktop'ı Başlat

  1. Claude Desktop'ı aç

  2. Sol altta 🔨 simgesine tıkla

  3. gmail-summarizer aktif olmalı

📖 Kullanım

Mail Okuma

makale@example.com adresinden son 5 maili getir ve özetle

PDF Oluştur ve Gönder

Şu metni PDF'e çevir ve hoca@example.com adresine gönder:

Ödev 1 - Python Temelleri

Bu ödevde Python'un temel konuları işlenmiştir.

Email konusu: "Ödev 1 Tamamlandı"

Ek Dosyalı Mail Gönder

hoca@example.com adresine /path/to/file.pdf dosyasını gönder
Konu: "Proje Raporu"
İçerik: "Raporumu ekte bulabilirsiniz."

🏗️ Proje Yapısı

mcp-gmail-summarizer/
├── gmail_mcp_server.py      # MCP sunucu
├── gmail_fetcher.py          # Gmail API işlemleri
├── pdf_generator.py          # PDF oluşturucu
├── test_gmail.py             # Gmail bağlantı testi
├── requirements.txt          # Python bağımlılıkları
├── credentials.json          # Google OAuth (gitignore'da)
├── token.pickle              # Kimlik token (gitignore'da)
├── generated_pdfs/           # Oluşturulan PDF'ler
└── README.md                 # Bu dosya

🔧 MCP Araçları

1. get_emails_from_sender

Belirli bir gönderenden mailleri çeker.

Parametreler:

  • sender_email: Gönderen mail adresi

  • max_results: Maksimum mail sayısı (varsayılan: 10)

2. send_email_with_attachment

Mail gönderir (opsiyonel ek ile).

Parametreler:

  • to_email: Alıcı adresi

  • subject: Mail konusu

  • body: Mail içeriği

  • attachment_path: Ek dosya yolu (opsiyonel)

3. create_and_send_pdf

Metin → PDF → Mail gönder.

Parametreler:

  • content: PDF içeriği

  • to_email: Alıcı adresi

  • subject: Mail konusu

  • pdf_title: PDF başlığı

  • email_body: Mail içeriği

🔐 Güvenlik

  • credentials.json ve token.pickle dosyaları asla Git'e eklenmez

  • OAuth2 kullanarak güvenli kimlik doğrulama

  • Sadece gerekli izinler istenir (gmail.readonly + gmail.send)

🐛 Sorun Giderme

"No module named 'reportlab'" hatası

pip install reportlab markdown2 Pillow

"Server disconnected" hatası

  1. Claude Desktop loglarını kontrol et:

   tail -f ~/Library/Logs/Claude/mcp-server-gmail-summarizer.log
  1. MCP sunucusunu manuel test et:

   python3 gmail_mcp_server.py

Türkçe karakterler görünmüyor

pdf_generator.py doğru font kullanıyor mu kontrol et.

📝 Lisans

MIT License

👤 Yazar

Hasan Öz

  • GitHub: [@hasanoz07]

  • Email: hasanoz2002@gmail.com

🙏 Katkıda Bulunma

Pull request'ler memnuniyetle karşılanır!

  1. Fork'la

  2. Feature branch oluştur (git checkout -b feature/amazing-feature)

  3. Commit'le (git commit -m 'Add amazing feature')

  4. Push'la (git push origin feature/amazing-feature)

  5. Pull Request aç

📚 Referanslar

-
security - not tested
F
license - not found
-
quality - not tested

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

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/hasanoz07/mcp-gmail-summarizer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server