WAHA MCP Server
# WAHA MCP Server
WhatsApp HTTP API (WAHA) için Model Context Protocol (MCP) server. Claude veya diğer MCP istemcilerini WAHA üzerinden WhatsApp'a bağlar.
## Gereksinimler
- Node.js 18+
- Çalışan bir [WAHA](https://waha.devlike.pro/) instance'ı
## Kurulum
```bash
npm install
npm run build
```
## Yapılandırma
Aşağıdaki ortam değişkenleri kullanılır:
| Değişken | Varsayılan | Açıklama |
| --------------- | ----------------------- | ----------------------------- |
| `WAHA_BASE_URL` | `http://localhost:3000` | WAHA API base URL |
| `WAHA_API_KEY` | _(boş)_ | API anahtarı (WAHA Plus için) |
| `WAHA_SESSION` | `default` | Kullanılacak oturum adı |
## Claude Desktop Entegrasyonu
`claude_desktop_config.json` dosyanıza ekleyin:
```json
{
"mcpServers": {
"waha": {
"command": "node",
"args": ["/tam/yol/waha-mcp/dist/index.js"],
"env": {
"WAHA_BASE_URL": "http://localhost:3000",
"WAHA_API_KEY": "your-api-key-if-any",
"WAHA_SESSION": "default"
}
}
}
}
```
## MCP Inspector ile Test
```bash
npx @modelcontextprotocol/inspector node dist/index.js
```
## Araçlar (Tools)
### Oturum Yönetimi
| Araç | Açıklama |
| -------------------- | ---------------------- |
| `waha_list_sessions` | Tüm oturumları listele |
### Mesajlaşma
| Araç | Açıklama |
| ----------------------- | ------------------------------- |
| `waha_send_text` | Metin mesajı gönder |
| `waha_send_image` | Görsel gönder (URL veya base64) |
| `waha_send_file` | Dosya/belge gönder |
| `waha_react_to_message` | Mesaja emoji ile tepki ver |
| `waha_delete_message` | Mesajı sil |
| `waha_star_message` | Mesajı yıldızla |
### Sohbetler & Mesajlar
| Araç | Açıklama |
| ------------------- | --------------------- |
| `waha_get_messages` | Sohbet mesajlarını al |
| `waha_get_chats` | Sohbet listesini al |
### Kişiler
| Araç | Açıklama |
| -------------------------- | -------------------------- |
| `waha_check_number_exists` | Numara WhatsApp'ta var mı? |
| `waha_get_contact` | Kişi bilgisi |
| `waha_get_contact_about` | Kişinin "hakkında" metni |
### Gruplar
| Araç | Açıklama |
| -------------------------------- | -------------------------- |
| `waha_get_groups` | Grupları listele |
| `waha_get_group` | Grup detayları |
| `waha_create_group` | Grup oluştur |
| `waha_leave_group` | Gruptan ayrıl |
| `waha_add_group_participants` | Üye ekle |
| `waha_remove_group_participants` | Üye çıkar |
| `waha_set_group_subject` | Grup adını değiştir |
| `waha_set_group_description` | Grup açıklamasını değiştir |
### Profil
| Araç | Açıklama |
| --------------------- | ------------------- |
| `waha_get_my_profile` | Kendi profilini gör |
## Chat ID Formatları
- **Kişisel sohbet:** `905551234567@c.us`
- **Grup:** `120363XXXXXXXX@g.us`
## Örnek Kullanım
```
Claude'a: "905551234567 numaralı kişiye 'Merhaba!' yaz"
Claude: waha_send_text(chatId: "905551234567@c.us", text: "Merhaba!")
Claude'a: "Tüm gruplarımı listele"
Claude: waha_get_groups()
Claude'a: "Pazarlama grubuna yeni bir üye ekle: 905559876543"
Claude: waha_add_group_participants(groupId: "120363...@g.us", participants: ["905559876543@c.us"])
```
TDQS
Scored across 21 tools
Each tool targets a distinct resource and action, with no overlapping purposes. Message, group, chat, contact, and session operations are clearly separated.
All tools follow the same waha_ verb_noun snake_case pattern, such as send_image, create_group, and get_contact_about. There are no stylistic deviations or mixed conventions.
At 21 tools, the set is slightly above the typical 3-15 range but each operation is distinct and earns its place in a full WhatsApp automation server. The count feels reasonable given the breadth of session, chat, message, contact, and group management.
The tool surface covers all major WhatsApp workflows: messaging, media sending, message reactions, group CRUD, participant management, contact lookup, and profile retrieval. Minor gaps exist (e.g., no mark-as-read, no session start/stop), but these are not critical dead ends for typical automation tasks.