mcp-server-whatsapp
WhatsApp MCP
Documentation
mcp-server-whatsapp
MCP server for CodeChap WhatsApp via the official Meta Cloud API.
This is the CodeChap business line (Poster 4 / `+27 65 762 2206`). Holiday Stays has its own Meta app and number — do not point Poster 4 at HS.
Features
- `send_message` — Free-form text (only inside an active 24-hour customer service window)
- `send_document` — PDF/file inside the 24h window
- `send_quote` / `send_invoice` — PDF via `quote` / `invoice` templates (outside 24h once approved)
- `send_email_settings` — mailbox IMAP/SMTP PDF via `email_guide` (password sent separately)
- `send_template` / `upload_media` / `list_templates`
- `list_inbox` / `get_message` / `mark_read` — inbound messages from the cloud inbox
Inbound messages are stored in the cloud and emailed to `ai@codechap.com`.
Configuration (MCP / workstation)
`~/.config/mcp-server-whatsapp/config.toml`:
access_token = "EAAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
phone_number_id = "123456789012345"
waba_id = "1622097682865634"
inbox_url = "https://codechap.com"
inbox_token = "inbox-api-bearer-token"
# Optional
# api_version = "v21.0"Cloud inbox
Meta delivers webhooks to `https://codechap.com/webhook/whatsapp`.
| Host | CodeChap projects server (`141.147.65.65`) |
|---|---|
| Binary | `/home/codechap/wa-inbox/wa-inbox` |
| Config | `/home/codechap/.config/mcp-server-whatsapp/inbox.toml` (mode 600) — see `inbox.example.toml` |
| Unit | `codechap-wa-inbox.service` |
| SQLite | `/home/codechap/wa-inbox/inbox.db` |
| Nginx | `location /webhook/whatsapp` in `codechap.com` vhost (must sit above `location /`) |
CloudPanel can regenerate that vhost. If inbound dies after a panel edit, re-insert the snippet from `deploy/nginx-whatsapp.conf` and `nginx -t && systemctl reload nginx`.
Rebuild/deploy the inbox binary (server is aarch64):
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
cargo build --release --target aarch64-unknown-linux-gnu --bin wa-inbox
scp target/aarch64-unknown-linux-gnu/release/wa-inbox codechap@141.147.65.65:~/wa-inbox/wa-inbox
ssh ubuntu@141.147.65.65 'sudo systemctl restart codechap-wa-inbox'Usage (MCP)
send_message
{ "to": "+27821234567", "body": "Hello from CodeChap!" }send_template
{
"to": "+27821234567",
"template_name": "order_confirmation",
"language_code": "en_US",
"components": "[{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"John\"},{\"type\":\"text\",\"text\":\"tomorrow\"}]}]"
}send_quote
{
"to": "+27821234567",
"pdf_path": "/path/to/quote.pdf",
"customer_name": "Derrick",
"quote_ref": "Q-1001"
}Uses template `quote` (en, UTILITY) with a document header. Meta must have approved it (`list_templates`). Inside the 24h window you can also `send_document`.
list_inbox
{ "from": "+27821234567", "limit": 20 }`from` and `limit` are optional.
Future work
- Media upload tool (`upload_media`) for quote PDFs / template headers
- Download inbound media to the cloud inbox
Development
cargo test
cargo build --releaseBinaries: `mcp-server-whatsapp` (stdio MCP) and `wa-inbox` (cloud webhook).
License
MIT (or whatever you prefer)
Frequently asked questions
What is mcp-server-whatsapp?
mcp-server-whatsapp is WhatsApp MCP
How do I install mcp-server-whatsapp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-server-whatsapp open source?
Yes — it is hosted on GitHub at https://github.com/codeChap/mcp-server-whatsapp.
Related MCP tools
an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Search infrastructure for AI
YC (S26) | Open Computer History | Record your screen continuously locally and provide context to your agents (Claude, Codex, Openclaw, Hermes, Runner...)
The fastest and the most accurate file search SDK for AI agents, Neovim, Rust, C, Python, Bun and NodeJS
Semantic version control => entity-level diffs, blame, and impact analysis on top of git. 28 languages via tree-sitter. Built for coding agents.
Fast, local-first web content extraction for LLMs. Scrape, crawl, extract structured data — all from Rust. CLI, REST API, and MCP server.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP