Native WhatsApp Model Context Protocol (MCP) Server, Background Scheduler Sidecar & Multi-Account Engine
Wasche is a native Rust-powered Model Context Protocol (MCP) server and persistent background scheduler sidecar for WhatsApp. It enables AI agents (Claude, Cursor, Codex, Gemini, etc.) to safely orchestrate multiple WhatsApp phone numbers, query contacts, dispatch interactive media, and execute high-durability broadcast campaigns protected by human behavioral emulation heuristics.
- 48 Native MCP Tools Across 8 Domains: Full programmatic control over multi-account lifecycles, 1:1 direct messaging, uncompressed document/media attachments, address book contact sync, contact groups and CSV/Excel import, anti-ban campaign automation, recipient queue manipulation, multi-sender account pooling, and historical run auditing. See the MCP Tools Reference.
- Contact Groups & Spreadsheet Import: Segment contacts into named groups (
"VIP Clients","October Leads"), queue a whole group into a campaign in one call, and import.csv/.xlsx/.xlsfiles with international phone normalization (+1to+999, optional default country code for local0…numbers). Extra spreadsheet columns become per-recipient template variables ({invoice_no}), and imported campaign recipients are saved to the contacts archive. - One Shared Daemon for Every Agent: A background daemon owns the WhatsApp connections, scheduler and dashboard. Each MCP client process is a thin bridge to it, started and stopped by its client without affecting the daemon, so every agent and session on the machine talks to the same WhatsApp process.
- Multi-Sender Account Pooling & Load Balancing: Pool multiple WhatsApp numbers into a single campaign (
account_id: "Grlossy, sales"or"all") with parallel workers and strict per-account typing mutual exclusion. - Anti-Ban Heuristics: Proportional typing presence (
Chatstate::Composing), configurable randomized inter-recipient jitter (e.g. 5–15s or 20–45s), single-flight transaction locks, pre-persisted idempotency stanza IDs, and 3-strike circuit breakers with operator-action auto-quarantine reset. - Embedded Web Dashboard (SPA): Modern client-side SPA (SolidJS v2 + Vite 8) embedded directly into the binary via
rust-embed(http://127.0.0.1:3030), featuring live delivery log streams, automatic run focus on re-run, instant campaign search, inline jitter editor, and multi-account selection popover. - SQLite Durability: Complete local storage for Noise E2EE session keys, campaign queues, contacts, and delivery audit logs with automatic WAL checkpointing.
Run it with npx:
npx @akin01/wascheOr add it to your MCP client (claude_desktop_config.json, Cursor, or .mcp.json):
{
"mcpServers": {
"wasche": {
"command": "npx",
"args": ["-y", "@akin01/wasche"],
"env": {
"RUST_LOG": "info"
}
}
}
}Requirements: Rust 1.88+ (2024 edition), Node.js 20+, and pnpm 9+.
# 1. Clone repository
git clone https://github.com/Akin01/wasche.git
cd wasche
# 2. Build web dashboard frontend
cd dashboard
pnpm install
pnpm build
cd ..
# 3. Compile release binary
cargo build --release
# 4. Run the Wasche daemon
./target/release/wasche daemonThe web dashboard will be available at http://127.0.0.1:3030. To try it with a dummy dataset, see Development.
| Command | What it does |
|---|---|
wasche |
MCP server over stdio. It forwards every tool call to the daemon on WASCHE_WEB_PORT (default 3030), and starts the daemon in the background when none answers. |
wasche daemon |
Runs the WhatsApp connections, campaign scheduler and dashboard until stopped. Only one daemon runs per port; a second one exits. |
wasche stop |
Asks the daemon to shut down cleanly. |
The daemon keeps running after the MCP client that started it exits, so the dashboard and scheduled campaigns keep working between agent sessions. A daemon started by an MCP client appends its log to wasche.log in the data directory (moved to wasche.log.1 once it passes 10 MB). Give every MCP client the same binary, WASCHE_DATA_DIR and WASCHE_WEB_PORT: the first one to start the daemon decides where it keeps its data. See Daemon & MCP Clients for start-up, mixing binaries and versions, upgrading and troubleshooting.
Data lives in the platform's app data directory (%APPDATA%\wasche\wasche\data on Windows, ~/.local/share/wasche on Linux, ~/Library/Application Support/com.wasche.wasche on macOS). Set WASCHE_DATA_DIR to use another path.
- MCP Tools Reference: every tool and its parameters
- Daemon & MCP Clients: process model, sharing one daemon across agents, mixed versions, upgrades and troubleshooting
- Architecture Specification: system diagram, multi-account model, pacing and scheduler internals
- Development: demo data fixtures
- Broadcast Durability & Anti-Abuse Realities
- WhatsApp Media & Multi-Attachment Protocol Realities
Licensed under the Apache License, Version 2.0. See LICENSE for details.
