MCP server by cornmankl
🚀 NiagaBot - Smart WhatsApp Business Automation
NiagaBot adalah bot WhatsApp pintar untuk automasi perniagaan yang menggunakan AI Qwen3-Omni. Bot ini membantu anda mengautomasikan komunikasi perniagaan, broadcast, penjadualan mesej, auto-reply, dan banyak lagi!
Your Smart Business Automation Companion powered by Advanced AI
✨ Ciri-Ciri Utama
🤖 Automasi Pintar AI
- AI Multimodal: Proses teks, imej, audio, dan video dengan AI Qwen3-Omni
- Auto-Response Pintar: Balas mesej pelanggan secara automatik
- Chat Flow Builder: Bina conversation flow untuk customer service
📣 Broadcast & Marketing
- Mass Broadcast: Hantar mesej ke ramai pelanggan serentak
- Scheduled Messages: Jadualkan mesej untuk hantar kemudian
- Progress Tracking: Monitor status hantar real-time
👥 Group Management
- Welcome/Farewell Messages: Automatically greet new members
- Anti-Spam Protection: Keep your groups clean and safe
- Group Synchronization: Manage multiple groups easily
📊 Analytics & Reporting
- Dashboard Lengkap: Pantau semua aktiviti bot anda
- Statistics & Metrics: Analisis prestasi mesej dan broadcast
- Export Data: Export analytics ke CSV/JSON
🔐 Enterprise Features
- Multi-User Support: Team collaboration dengan role-based access
- REST API: Integrate dengan sistem lain
- Web Dashboard: Control panel yang cantik dan mudah
- Secure Authentication: JWT-based security
Architecture
WhatsApp Web (Browser Automation)
↓
WhatsApp Bot Core
↓
Qwen3-Omni Integration
↙ ↘
Local Model DashScope API
Prerequisites
- Node.js (v16 or higher)
- npm or yarn
- WhatsApp account for testing
- (Optional) DashScope API key for cloud-based Qwen3-Omni access
Installation
- Clone the repository:
git clone <repository-url>
cd whatsapp-bot-mcp
- Install dependencies:
npm install
Configuration
The bot can be configured in two ways:
Option 1: Local Model (Resource Intensive)
To run Qwen3-Omni locally, you'll need:
- High-end GPU (32GB+ VRAM recommended)
- Significant RAM (64GB+ recommended)
- Proper Python environment with required dependencies
This option requires installing additional dependencies that are not included in this package due to their size and complexity.
Option 2: Alibaba Cloud/DashScope API (Recommended for Most Users)
This is the easiest way to use Qwen3-Omni without the need for high-end hardware:
Option A: Melalui DashScope (Versi Mudah)
- Daftar akaun di DashScope
- Dapatkan kunci API anda dari dashboard:
- Lawati DashScope Console
- Navigasi ke bahagian "API Keys"
- Cipta kunci API baru atau gunakan yang sedia ada
- Kemas kini
config.json:
{
"dashscope": {
"enabled": true,
"apiKey": "kunci-api-anda-di-sini",
"model": "qwen3-omni"
}
}
Option B: Melalui Alibaba Cloud (Untuk Pengguna Enterprise)
- Daftar akaun di Alibaba Cloud
- Aktifkan perkhidmatan DashScope atau ModelStudio
- Dapatkan kunci akses melalui konsol Alibaba Cloud
- Gunakan endpoint API yang sesuai:
{
"dashscope": {
"enabled": true,
"apiKey": "kunci-akses-anda-di-sini",
"model": "qwen3-omni",
"apiEndpoint": "https://dashscope.aliyuncs.com/api/v1"
}
}
How to Get Your API Key:
-
Sign up for an account:
- For DashScope: dashscope.aliyuncs.com
- For Alibaba Cloud (global): Alibaba Cloud
-
Get your API key:
- Visit the DashScope Console
- Navigate to "API Keys" section
- Create a new API key or use an existing one
- Copy the API key for use in your configuration
-
Secure Storage of API Key (Recommended): Instead of hardcoding your API key in configuration files, use environment variables:
# Set environment variable (Linux/Mac) export DASHSCOPE_API_KEY="your-api-key-here" # Set environment variable (Windows) set DASHSCOPE_API_KEY="your-api-key-here" # Or create a .env file in your project directory echo "DASHSCOPE_API_KEY=your-api-key-here" > .envThen reference it in your
config.json:{ "dashscope": { "enabled": true, "apiKey": null, "model": "qwen3-omni" } }
Secara alternatif, anda boleh menyalin fail konfigurasi contoh dan mengemaskininya:
cp config.example.json config.json
# Kemudian edit config.json dengan kunci API anda
Free Tier & Pricing:
- DashScope menawarkan kuota percuma untuk permulaan
- Pengebilan bayar-mengikut-penggunaan untuk keperluan yang lebih tinggi
- Semak halaman harga DashScope untuk kadar semasa
Free Tier & Pricing:
- DashScope offers a free tier with limited usage for getting started
- Pay-as-you-go pricing for higher usage requirements
- Check the DashScope pricing page for current rates
Security Best Practices
When using DashScope API, follow these security best practices:
-
Never commit API keys to version control
- Add
.envandconfig.jsonto your.gitignorefile - Use environment variables instead of hardcoded keys
- Add
-
Use environment variables for API keys
# Create .env file echo "DASHSCOPE_API_KEY=your-api-key-here" > .env # Add to .gitignore echo ".env" >> .gitignore -
Limit API key permissions
- Create keys with minimal required permissions
- Use different keys for different environments (development, staging, production)
-
Monitor API usage
- Regularly check your usage in the DashScope console
- Set up alerts for unusual activity or usage spikes
-
Rotate keys regularly
- Change your API keys periodically
- Immediately rotate any compromised keys
Usage
- Start the bot:
npm start
-
Scan the QR code with your WhatsApp mobile app to log in
-
The bot will start monitoring for messages and responding using Qwen3-Omni
How It Works
- Message Monitoring: The bot continuously checks for new messages in WhatsApp Web
- Message Processing: Incoming messages (text or media) are processed by Qwen3-Omni
- Response Generation: Qwen3-Omni generates appropriate responses based on the input
- Response Sending: Responses are sent back through WhatsApp Web
Qwen3-Omni Capabilities
Qwen3-Omni provides advanced multimodal processing including:
- Text Understanding: Process and respond to text messages in multiple languages
- Image Analysis: Analyze images and respond to visual content
- Audio Processing: Transcribe and understand audio messages
- Video Understanding: Process video content with both visual and audio analysis
- Multimodal Reasoning: Combine information from multiple modalities for comprehensive understanding
- Real-time Interaction: Stream responses in both text and natural speech
- Multilingual Support: Supports 119 text languages, 19 speech input languages, and 10 speech output languages
Supported Modalities
- Text: Process natural language queries, conversations, and document analysis
- Images: Recognize objects, scenes, text (OCR), and visual elements
- Audio: Speech recognition, music analysis, sound classification, and audio captioning
- Video: Video description, scene analysis, and audio-visual understanding
Voice Options
When using audio generation capabilities, Qwen3-Omni supports multiple voice options:
- Ethan: A bright, upbeat male voice with infectious energy
- Chelsie: A honeyed, velvety female voice with gentle warmth
- Aiden: A warm, laid-back male voice with boyish charm
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Qwen3-Omni by Tongyi Lab
- DashScope API for cloud-based AI access
- Playwright/Puppeteer for browser automation
- Model Context Protocol for tool integration
Kelebihan Menggunakan Alibaba Cloud/DashScope
Lihat faedah terperinci menggunakan Alibaba Cloud atau DashScope untuk akses Qwen3-Omni.