neonize-whatsapp-gateway
Provides tools for sending and receiving WhatsApp messages, managing contacts, and transcribing voice notes.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@neonize-whatsapp-gatewayread my last 5 WhatsApp messages"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
neonize-whatsapp-gateway
A small, reusable WhatsApp capture + messaging layer built on top of
neonize (Python wrapper around
whatsmeow).
Out of the box, neonize/whatsmeow does not give you an inbox: it
delivers messages using @lid (Linked-Device) JIDs and does not populate a
contacts table. This project fixes that with a thin capture + SQLite layer
and a set of MCP-compatible tools, so an LLM agent (Hermes, Claude, etc.)
can read your messages, list chats, manage contacts, and reply.
Features
π₯ Inbox capture β every incoming/outgoing message is stored in a local SQLite DB (
inbox.db), withfrom_me,media_type,pushname, timestamp.βοΈ Readable contacts β LID JIDs are auto-resolved to real phone numbers via
get_pn_from_lid, so your contact book is human-readable.π¬ MCP-compatible stdio server (
neonize_gateway.py) exposing tools:whatsapp_send,whatsapp_send_image,whatsapp_send_file,whatsapp_get_messages,whatsapp_list_chats,whatsapp_get_contacts,whatsapp_add_contact,whatsapp_reply.ποΈ Voice notes transcription β
voice_handler.pydownloads incoming voice messages, decodes OGG/Opus β WAV with ffmpeg, and transcribes them with faster-whisper. The transcript is stored in the inbox (and optionally auto-replied as text).π§ Fully configurable via environment variables β no hardcoded paths.
Related MCP server: WA MCP
Why this exists
"Can you read my WhatsApp inbox? Why don't I have access to my contacts? Can you make the system read messages and reply to conversations?"
The stock library answers "no" to all three. This repo turns that into "yes".
Install
pip install neonize # ships prebuilt wheels with the Go backend
# or from this repo:
pip install -r requirements.txtPlatform note: the Go backend needs glibc. On Android/Termux run everything inside
proot-distro login ubuntu.
Pair your account (first time only)
python pairing.pyIt prints an 8-character code. In WhatsApp go to Linked Devices β Link a device β Link with phone number and enter it. The session is saved in the DB and you never pair again.
Run
Capture only:
python capture_daemon.pyAs an MCP server (stdio) β e.g. plug it into an LLM gateway:
python neonize_gateway.pyEnvironment variables
Variable | Default | Meaning |
|
| whatsmeow session DB |
| (alias) | same as |
|
| capture SQLite DB |
Example:
NEONIZE_DB=/secure/bot.db INBOX_DB=/secure/inbox.db python capture_daemon.pyMCP tools
Tool | Description |
| Send a text message (phone or JID) |
| Send an image (local path or URL) |
| Send a document (local path or URL) |
| Read last N captured messages (filter by chat/direction) |
| List unique conversations |
| Read the contact book (local carnet + whatsmeow fallback) |
| Manually register a contact (name β JID) |
| Send a message into an existing conversation |
The MCP server speaks JSON-RPC 2.0 over stdio, so any MCP-compatible client can call these tools directly.
Reading the inbox directly (no MCP needed)
import sqlite3
c = sqlite3.connect("inbox.db")
for r in c.execute(
"SELECT chat, from_me, text, media_type, timestamp "
"FROM messages ORDER BY id DESC LIMIT 10"
):
print(r)Voice notes (transcription)
voice_handler.py turns incoming WhatsApp voice messages into text:
# dependencies (mobile/CPU-friendly β no torch/CUDA)
pip install faster-whisper
# ffmpeg must be on PATH (or set FFMPEG_BIN to its absolute path)
apt-get install ffmpeg # Debian/Ubuntu
# on Termux/Android ffmpeg lives at /data/data/com.termux/files/usr/bin/ffmpeg
python voice_handler.py # capture + log transcripts
AUTO_REPLY=1 python voice_handler.py # also send the transcript back as a text replyHow it works: on a MessageEv with audioMessage, it calls
download_media_with_path, decodes the OGG/Opus blob to 16 kHz mono WAV with
ffmpeg, then runs faster_whisper.WhisperModel("base","cpu") and stores the
transcript in the inbox (media_type = "voice", text = "[voice] <transcript>").
The first run downloads the whisper model from HuggingFace (~140 MB for base).
Performance note: use
faster-whisper(CTranslate2, int8) rather thanopenai-whisperon phones β it avoids the ~800 MB torch/CUDA pull and is 5β10Γ faster on ARM CPUs.
Important caveats
One client per DB. Only ONE neonize client may connect to the session DB at a time. Do not run
capture_daemon.pyandneonize_gateway.pyagainst the sameNEONIZE_DBsimultaneously β the session will thrash.whatsmeow_contactsis empty by default. neonize does not force the WhatsApp contact app-state sync. This project builds its own contact book from captured messages + LIDβPN resolution.MessageEvonly fires for received messages. Sending viasend_messagedoes not echo an event to the same client. To verify capture, message yourself or have a contact reply.ToS. Automating WhatsApp may violate WhatsApp/Meta Terms of Service. Use for personal/experimental purposes at your own risk.
License
MIT β use freely, but respect WhatsApp's terms.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceEnables AI agents to interact with WhatsApp through a Model Context Protocol server, supporting sending text messages, contacts, links, and locations via standardized tools.Last updated6MIT
- Flicense-qualityDmaintenanceWhatsApp MCP server that exposes messaging, groups, contacts, and profile management as tools and resources for AI agents, supporting Baileys and Meta Cloud API.Last updated19
- Alicense-qualityAmaintenanceA self-hosted WhatsApp bridge that exposes a stdio MCP server with ~20 tools for reading conversations, sending messages, managing groups, contacts, and aliases, enabling AI agents to operate WhatsApp directly.Last updated2MIT
- AlicenseBqualityBmaintenanceEnables sending messages, images, documents and more on WhatsApp directly from any MCP-compatible AI, with tools for chat management, groups, and webhooks.Last updated371MIT
Related MCP Connectors
Phone, SMS & email for AI agents β one remote MCP endpoint, OAuth login, zero install.
Give AI agents real phone numbers, messages, and voice calls via MCP.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/seasayDev/neonize-whatsapp-gateway'
If you have feedback or need assistance with the MCP directory API, please join our Discord server