messaging-mcp
Provides tools for reading and replying to Instagram direct conversations via the official Send API, with reply-window and tag rules checked before sending.
Provides tools for reading and replying to Messenger conversations via the official Send API, with reply-window and channel limit checks.
Integrates with Meta's Graph APIs and signed webhooks to receive and send messages across WhatsApp, Messenger, and Instagram.
Provides tools for reading and replying to Telegram bot conversations via the Bot API, using long polling or a webhook.
Provides tools for reading and replying to WhatsApp conversations via the Cloud API, including 24-hour window checks and approved template sending/listing.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
messaging-mcp

Let your AI assistant read and answer your customers' WhatsApp, Instagram, Messenger and Telegram conversations through the official APIs, with a self-hosted MCP server that stops a reply the platform would reject before it is sent.
Why
The most popular WhatsApp MCP server on GitHub drives the unofficial WhatsApp Web protocol: your number can be banned, and the project has not been maintained since mid 2025. Business messaging has official APIs, and they come with rules the assistant has to respect:
Official APIs only. WhatsApp Cloud API, the Messenger and Instagram Send APIs, and the Telegram Bot API. No scraping, no session hijacking, no ban risk from protocol abuse.
Four channels in one server. One conversation list, one search, one set of tools.
Rule aware. WhatsApp, Messenger and Instagram only let you reply freely inside a 24 hour window.
send_messagechecks the window (using messaging-rules) and the channel limits first. If the reply would be rejected, nothing is sent and the assistant gets the reason, when the window closed and what is allowed instead (on WhatsApp: an approved template).Tested and offline-testable. The test suite runs without network access and without keys, and
--demolets you try everything with sample data.
Related MCP server: mcp-whatsapp
Try it in 60 seconds (no keys)
Add this to your MCP client configuration (Claude Desktop: claude_desktop_config.json, Cursor: .cursor/mcp.json):
{
"mcpServers": {
"messaging": {
"command": "npx",
"args": ["-y", "messaging-mcp", "--demo"]
}
}
}Claude Code: claude mcp add messaging -- npx -y messaging-mcp --demo
Restart the client and ask: "Which customers are waiting for an answer?" then "Reply to the German customer on WhatsApp." The demo has nine conversations on all four channels in several languages. One WhatsApp window is closed on purpose, so you see the refusal and the template suggestion. Sends in demo mode are marked demo and never leave your machine.
You can also try it without a client: npx -y messaging-mcp --demo starts the server on stdio, and npm run smoke (from a checkout) connects a client and calls a few tools.
Requires Node.js 22.13 or newer (it uses the built-in node:sqlite; on older versions the server falls back to a JSON file).
Connect your channels
A channel turns on when its variables are set. Channels you do not configure stay off, silently.
Channel | Variables | Guide |
| ||
Messenger |
| |
| ||
Telegram |
| |
Meta webhooks |
| the guides above |
Storage |
|
Example (Claude Desktop):
{
"mcpServers": {
"messaging": {
"command": "npx",
"args": ["-y", "messaging-mcp"],
"env": {
"TELEGRAM_BOT_TOKEN": "123456:replace-me",
"WHATSAPP_ACCESS_TOKEN": "replace-me",
"WHATSAPP_PHONE_NUMBER_ID": "replace-me"
}
}
}
}More examples are in examples/.
How messages get in
The platforms push (Meta) or hold (Telegram) incoming messages; this server stores them locally so the assistant can read them.
Telegram: long polling with
getUpdates, on by default. No public URL needed. Use--telegram-webhook https://your.hostif you prefer a webhook (needs--webhook-port).WhatsApp, Instagram, Messenger: Meta calls a webhook. Start with
--webhook-port 8787and exposePOST/GET /webhooks/metathrough a tunnel or reverse proxy. Every POST must carry a validX-Hub-Signature-256signature (META_APP_SECRET), otherwise it is rejected with 401. The receiver listens on127.0.0.1unless you pass--webhook-host.Messages are captured only while a process is running. An MCP client starts the server when you open it, so for continuous capture run one always-on process with
--no-stdio --webhook-port 8787and point your MCP clients at the same database with--no-ingest(SQLite handles the sharing).
Tools
Tool | What it does |
| Which channels are on, the account behind each, demo and read-only state. |
| Conversations across channels, newest first. Filter by channel, unread, search; each row says whether you can reply now. |
| Messages of one conversation plus the "can I message now" summary: window state, end time, alternatives. |
| Case-insensitive search over stored messages. |
| The rules check on its own, without sending. |
| Text reply. Checks length limits and the reply window first; refuses with the reason and alternatives when the platform would reject it. |
| Send an approved template (works outside the 24 hour window). |
| Approved templates of the WhatsApp Business Account, with parameter counts. |
| Clear the unread counter and, where supported, send a read receipt. |
| Source-cited channel rules: windows, tags, limits, rate limits. |
Conversation = (channel, other party id): phone number on WhatsApp, PSID on Messenger, IGSID on Instagram, chat id on Telegram. All tools take plain JSON and validate it with a schema; platform errors come back as readable errors with a code, a hint and retryAfterSec where the platform gave one.
Safety
Read-only mode:
--read-onlydoes not registersend_messageorsend_whatsapp_templateat all, andmark_readthen only clears the local counter.Secrets stay in the environment. Tokens are read from environment variables only, sent as
Authorizationheaders, and scrubbed from error messages. Nothing is written to the database or the logs. (Telegram's API puts the bot token in the request path; it is redacted from every error.)Data stays on your machine. Messages are stored in a local SQLite file. The only network traffic is to the platform APIs you configured. There is no telemetry.
No automatic retries on sends. A failed or rate limited send is reported, not repeated, so a customer never gets a duplicate. (Telegram's explicit
retry_afteron a 429 is honored once.)Webhook requests without a valid signature (Meta) or secret (Telegram) are rejected before any parsing.
An assistant can message real customers. Review what it wants to send, use --read-only while you evaluate, and follow the platforms' policies (opt-in for marketing templates, no spam).
Limits
Honest list of what v0.1 does not do or has not verified:
X (Twitter) is not supported. Its messaging API is paid; out of scope for v0.1.
Text only. Incoming media is stored as attachment metadata (type, id, mime); there is no media download and no sending of images, documents, buttons or lists yet.
WhatsApp templates: body text parameters only. Templates with header or button parameters, and named parameters, are not supported. Free-form replies work inside the 24 hour window.
Only conversations this server has seen. There is no history import. If a customer wrote before the server was running, the server does not know that, and its window check errs on the side of refusing.
Telegram: a bot can only write to people who started it. Updates are kept by Telegram for about 24 hours, so a short downtime is recovered when polling resumes. Edited messages are not tracked.
Instagram: the send request follows the Instagram API with Instagram Login (
graph.instagram.com). Whethermessaging_typeandtagare accepted on that host for the human agent tag could not be confirmed on the public documentation page we could read; that case is best-effort. Using Facebook Login tokens instead is possible withINSTAGRAM_API_HOST=https://graph.facebook.combut untested here.Platform error mapping (window closed, rate limited, permission, template) covers the common codes; anything else is passed through verbatim.
Platform rules change. Windows, tags and limits come from messaging-rules, which cites the official page for each value. Run
get_rulesto see the verification date. Meta retired several message tags in 2026; the rules data reflects that.Graph API version is pinned in one constant (
v27.0, the version shown in Meta's documentation when this was written).Meta features that need review (App Review, business verification, display name approval, messaging limits for outbound templates) are your responsibility; the setup guides list what to expect.
The 24 hour rule is only one of the policies. WhatsApp quality ratings, opt-in requirements and template categories are not checked by this server.
If you do not want to host this yourself, Pinlyx is the hosted version of the same idea.
Related packages
unified-message: normalizes Telegram, WhatsApp, Instagram, Messenger and X webhook bodies and verifies their signatures. This server uses it for everything incoming.
messaging-rules: source-cited messaging windows, tags and limits as data, a library and a small MCP server. This server uses it before every send.
Development
npm install
npm run build
npm test # offline, uses recorded webhook fixtures and a mocked fetch
npm run smoke # starts the built server in --demo mode and calls a few toolsSee CONTRIBUTING.md. Changes are listed in CHANGELOG.md.
License
MIT, see LICENSE.
Built and maintained by Pinlyx, the omnichannel inbox and AI agent for Telegram, WhatsApp, Instagram, Messenger, X, email and live chat.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for AI agents: WhatsApp, Instagram, TikTok, Facebook and Google Business Profile.
- messagingDeprecatedcom.sendseven
Unified messaging MCP server: WhatsApp, Instagram, Telegram, SMS, Messenger & email support inbox
Unified messaging MCP server: WhatsApp, Instagram, Telegram, SMS, Messenger & email support inbox
Free WhatsApp MCP server for ChatGPT and Claude: read and search chats, every send you approve.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceA self-hosted MCP server that connects AI clients to WhatsApp via the WAHA HTTP API. It enables users to manage sessions, search contacts, and send or receive messages and media directly through natural language interfaces.8 npm-
- AlicenseNot gradedqualityDmaintenanceMCP server that connects AI agents to WhatsApp using the multi-device API, enabling messaging, group management, and more as a regular user.1MIT
- AlicenseAqualityDmaintenanceMCP server that wraps Meta's Messenger Platform, Instagram Messaging, and comment moderation APIs as semantic tools for LLM agents to read inbox, reply, and moderate comments.16MIT
- AlicenseNot gradedqualityDmaintenanceA secure, zero-setup WhatsApp MCP server that lets AI assistants read, search, summarize, and (with user confirmation) act on personal WhatsApp chats via a safety-focused toolset, built as a maintained successor to the abandoned whatsapp-mcp.5MIT