250+ Commands · Multi-Platform · Multi-Database · Plugin Architecture
📦 Installation · 🔐 Session Setup · ⚙️ Configuration · 🚀 Deployment · 🔌 Plugins
| Feature | Description | |
|---|---|---|
| 🔌 | Auto-loading Plugins | Drop a .ts file in plugins/ — it loads automatically, zero registration |
| 💬 | 250+ Commands | Group management, privacy, moderation, fun, AI, media, utilities |
| 🗄️ | 5 Storage Backends | MongoDB, PostgreSQL, MySQL, SQLite, or JSON files |
| 🛡️ | Group Protection | Anti-spam, bad word filter, link detection, anti-tag abuse |
| 👑 | Role System | Owner, Sudo, Admin, and User permission levels |
| ⏰ | Scheduled Messages | Schedule messages with natural time input |
| 🤖 | AI Chatbot | Per-chat AI conversation mode |
| 🔒 | Privacy Controls | Full WhatsApp privacy management via commands |
| 📊 | Polls & Voting | Create polls with live vote tracking in groups |
| 📡 | Broadcast | Bulk message all groups or all DM contacts at once |
| 🔁 | Auto-Reply | Configurable trigger-based auto responses with {name} support |
| 🎮 | Games | TicTacToe and more built in |
| ⏳ | Disappearing Messages | Set per-chat or default timers via commands |
| 📱 | Multi-Platform | Runs on Termux, VPS, Railway, Render, Heroku, Koyeb, Fly.io, Replit |
| Requirement | Version | Notes |
|---|---|---|
| 20.x or higher | Required | |
| 8.x or higher | Included with Node.js | |
| Any recent | For cloning | |
| Latest | Media processing | |
| Latest | Sharp image processing | |
| Latest | Sticker creation |
[!WARNING] Never use your personal WhatsApp number for the bot. Always use a dedicated number.
git clone https://github.com/GlobalTechInfo/MEGA-MDX.git
cd MEGA-MDX
npm install
cp sample.env .env
# Edit .env → add SESSION_ID and OWNER_NUMBER
npm run build
npm start
[!IMPORTANT] The bot uses a Session ID to connect to WhatsApp without scanning QR every time. Generate it once and paste it in
.env.
🌐 https://mega-pairing.onrender.com
Option A — Pair Code (Recommended)
923001234567)J38K-4PNS)Option B — QR Code
.envSESSION_ID=GlobalTechInfo/MEGA-MD_xxxxxxxxxxxxxxxxxxxxxxxx
Leave SESSION_ID empty and set:
PAIRING_NUMBER=923001234567
[!NOTE] The bot will print an 8-character pairing code in the terminal on startup. Link it via WhatsApp → Linked Devices → Link with phone number within 60 seconds.
Copy sample.env to .env:
cp sample.env .env
# ── REQUIRED (choose one) ────────────────────────────────────
SESSION_ID=GlobalTechInfo/MEGA-MD_your_gist_id_here
# OR
PAIRING_NUMBER=923001234567
# ── REQUIRED ─────────────────────────────────────────────────
OWNER_NUMBER=923000000000 # No + sign
# ── BOT IDENTITY ─────────────────────────────────────────────
BOT_NAME=MEGA-MD-PRO
BOT_OWNER=GlobalTechInfo
PACKNAME=MEGA-MD
# ── BEHAVIOUR ────────────────────────────────────────────────
PREFIXES=.,!,/ # Comma-separated
COMMAND_MODE=public # public or private
TIMEZONE=Asia/Karachi
# ── OPTIONAL API KEYS ────────────────────────────────────────
REMOVEBG_KEY= # https://remove.bg/api
GIPHY_API_KEY= # https://developers.giphy.com
# ── PERFORMANCE ──────────────────────────────────────────────
PORT=5000
MAX_STORE_MESSAGES=50
# ── DATABASE (all empty = JSON files) ────────────────────────
MONGO_URL=
POSTGRES_URL=
MYSQL_URL=
DB_URL= # SQLite: ./data/baileys.db
# 1. Clone
git clone https://github.com/GlobalTechInfo/MEGA-MDX.git
cd MEGA-MDX
# 2. Install dependencies
npm install
# 3. Configure
cp sample.env .env
nano .env
# 4. Build TypeScript
npm run build
# 5. Start
npm start
sudo bash <(curl -fsSL https://raw.githubusercontent.com/GlobalTechInfo/MEGA-MDX/main/lib/install.sh)
[!IMPORTANT] This automatically installs Node.js 20, ffmpeg, libvips, libwebp, PM2, clones the repo, builds it, and sets up data files.
# After install:
nano /root/MEGA-MDX/.env
cd /root/MEGA-MDX && pm2 start dist/index.js --name mega-mdx
pm2 save && pm2 startup
# Update packages
pkg update && pkg upgrade -y
# Install proot-distro (recommended for full Linux environment)
pkg install proot-distro -y
proot-distro install ubuntu
proot-distro login ubuntu
# Inside Ubuntu — install dependencies
apt update && apt upgrade -y
apt install -y git ffmpeg build-essential libvips-dev webp nodejs npm curl
# Clone and setup
git clone https://github.com/GlobalTechInfo/MEGA-MDX.git
cd MEGA-MDX
npm install
cp sample.env .env && nano .env
npm run build && npm start
Keep running after closing Termux:
apt install tmux -y
tmux new -s mega-mdx # Start new session
npm start
# Detach: Ctrl+B → D
# Re-attach: tmux attach -t mega-mdx
# List: tmux ls
# Kill: tmux kill-session -t mega-mdx
One-line install (recommended):
sudo bash <(curl -fsSL https://raw.githubusercontent.com/GlobalTechInfo/MEGA-MDX/main/lib/install.sh)
Manual:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs git ffmpeg libvips-dev libwebp-dev build-essential
git clone https://github.com/GlobalTechInfo/MEGA-MDX.git
cd MEGA-MDX
npm install
cp sample.env .env && nano .env
npm run build
# Keep alive with PM2
npm install -g pm2
pm2 start dist/index.js --name mega-mdx
pm2 save && pm2 startup
PM2 commands:
| Command | Description |
|---|---|
pm2 logs mega-mdx |
Live logs |
pm2 restart mega-mdx |
Restart |
pm2 stop mega-mdx |
Stop |
pm2 status |
Status overview |
# In WSL Ubuntu terminal
sudo apt update
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs git ffmpeg libvips-dev libwebp-dev build-essential
git clone https://github.com/GlobalTechInfo/MEGA-MDX.git
cd MEGA-MDX
npm install
cp sample.env .env && nano .env
npm run build && npm start
[!NOTE] The repo includes pre-configured
.replitandreplit.nix.
https://github.com/GlobalTechInfo/MEGA-MDX| Key | Value |
|---|---|
SESSION_ID |
GlobalTechInfo/MEGA-MD_your_gist_id |
OWNER_NUMBER |
923001234567 |
replit.nix automatically installs: Node.js 20, ffmpeg, imagemagick, libwebp, SQLite, pm2 etc.
[!TIP] Free Replit instances sleep after inactivity. Use UptimeRobot to ping your Replit URL every 5 minutes to keep it alive. [!NOTE] Production deployment uses
npm run start:optimized(512MB memory limit) — configured in.replit's[deployment]section.
[!NOTE] The repo includes
heroku.ymlandapp.jsonfor Docker-based deployment.Either you can deploy via dashboard or using heroku cli
One-line Deployer:
bash <(curl -s https://raw.githubusercontent.com/GlobalTechInfo/MEGA-MDX/main/lib/heroku.sh)
Manual:
heroku login
heroku create your-bot-name
heroku stack:set container
heroku config:set SESSION_ID=GlobalTechInfo/MEGA-MD_your_gist_id
heroku config:set OWNER_NUMBER=923001234567
heroku config:set MONGO_URL=your_mongodb_url # Recommended
git push heroku main
heroku ps:scale web=1
heroku logs --tail
[!IMPORTANT] Heroku's filesystem is ephemeral — data is lost on restart. Use MongoDB or PostgreSQL for persistent storage. [!NOTE] Heroku uses
heroku.yml→ Docker build → runsnpm run start:optimized.
[!NOTE] The repo includes
render.yamlfor one-click Blueprint deployment.
$ claude mcp add MEGA-MDX \
-- python -m otcore.mcp_server <graph>