whatsapp-mcp-plus
whatsapp-mcp-plus
一个安全、零配置的 WhatsApp MCP 服务器。默认只读、默认安全。
它将你的个人 WhatsApp 连接到 MCP 客户端(Claude Desktop、Cursor、Claude Code),让你的 AI 能够搜索、读取、总结,并在你允许的情况下操作你的 WhatsApp,同时带有保护你账户安全的护栏。
这是(现已停止维护的)lharries/whatsapp-mcp 的持续维护、单二进制继任者,基于 Baileys 用 TypeScript 重建,并加入了它从未有过的安全层。
⚠️ 使用前请阅读账户安全与服务条款声明。 这使用了非官方的 WhatsApp 客户端。使用不当可能导致你的号码被封禁。本工具旨在将这种风险降到最低,但无法完全消除。
来自你自己聊天的 WhatsApp Rewind
让 AI 执行 whatsapp_rewind,即可从你的聊天历史中生成一套Spotify-Wrapped 风格的故事卡片(1080×1920 SVG),包含封面、重要联系人、你的日常节奏、热门表情符号、回复速度排行榜和数据一览:
更喜欢单张卡片?wrapped_card 生成一张可分享的 SVG;whatsapp_wrapped 在终端打印卡片。还有:response_leaderboard(你回复谁最快 / 把谁晾在已读里最久)、chat_stats(按聊天统计,含回复时间)、top_words 和 export_chat。
Related MCP server: WA MCP
为什么选这个而不是原版
原版(已停止维护) | whatsapp-mcp-plus | |
安装 | Go 桥接 + Python 服务器,手动编辑配置,Windows 上需要 CGO | 单个 Node 进程,一条命令 |
安全性 | 无(README 甚至警告过这个漏洞) | 默认只读、白名单、速率限制、发送前确认、注入防护 |
工具 | 12 个(读取 + 基础发送) | 51 个(回应、回复、编辑、删除、群组、在线状态、投票、转写、分析、聊天管理) |
原生依赖 |
| 无 —— 使用 Node 内置的 |
维护状态 | 最后提交于 2025 年 7 月 | 持续维护 |
快速开始
npx whatsapp-mcp-plus首次运行会在终端打印一个二维码。打开手机上的 WhatsApp → 设置 → 已链接设备 → 链接设备 并扫描。你的近期聊天记录会同步到本地 SQLite 数据库。除了 AI 通过工具调用显式读取的内容外,没有任何数据离开你的机器。
或者使用 Docker(连接和服务器都在一个容器中):
docker build -t whatsapp-mcp-plus .
docker run -it -v wamcp-data:/app/data -v wamcp-auth:/app/auth_info whatsapp-mcp-plus无需配对即可查看分析结果
想看看 whatsapp_wrapped 和 response_leaderboard 会生成什么?运行演示,它会填充一个示例数据库并打印真实的工具输出:
npm run demo接入你的 MCP 客户端
{
"mcpServers": {
"whatsapp": {
"command": "npx",
"args": ["-y", "whatsapp-mcp-plus"],
"env": { "WAMCP_MODE": "read-only" }
}
}
}Claude Desktop:
claude_desktop_config.jsonCursor:
~/.cursor/mcp.json
安全模型(默认安全)
WhatsApp 封号大多是行为性的。读取风险低;冷启动或批量发送风险高。默认设置经过调优,让你保持在安全区域内。
模式(WAMCP_MODE):
read-only(默认) — 所有写入工具都被阻止。仅限搜索/读取/分析。assisted— 允许发送,但受白名单 + 速率限制 + 确认机制约束。unrestricted— 解除所有限制(需主动选择,不推荐)。
护栏(在 unrestricted 之外默认开启):
白名单 — 你只能给现有联系人或先给你发过消息的人发消息(给陌生人发消息是封号的第一大诱因)。可通过
allowlist_add工具按联系人覆盖。速率限制 — 每分钟 + 每天的上限,以及发送之间拟人化的间隔 + 抖动。
发送前确认 — 发送操作返回一个令牌并等待;在你调用
confirm_action之前不会真正发出任何消息。这可以阻止提示注入的消息被发出。注入防护 — 看起来像是针对 AI 的指令的传入消息会被标记,让模型将其视为数据而非命令。
每个旋钮都是环境变量:WAMCP_ALLOWLIST_ONLY、WAMCP_REQUIRE_CONFIRM、WAMCP_RATE_PER_MINUTE、WAMCP_RATE_PER_DAY、WAMCP_MIN_GAP_MS、WAMCP_JITTER_MS。
工具
51 个工具(已停止维护的原版只有 12 个):
读取: search_contacts、list_chats、list_groups、get_chat、list_messages(支持日期范围)、get_last_interaction、contact_info、get_message_context、search_messages
发送: send_message(支持回复)、send_file、send_voice_note、send_location、send_poll、send_contact
消息操作: react_to_message、edit_message、delete_message、mark_read、forward_message、star_message
群组: group_info、create_group、group_update_participants、group_set_subject、group_set_description、group_invite_link、group_leave
聊天管理: pin_chat、mute_chat、block_contact、check_number_on_whatsapp、get_profile_picture
在线状态 / 个人资料: send_presence、set_profile_status、set_profile_name
媒体 / 智能: download_media、transcribe_voice_message
分析: whatsapp_rewind(6 张故事卡片套装)、wrapped_card(单张可分享 SVG)、whatsapp_wrapped(终端卡片)、response_leaderboard(你回复谁最快 / 把谁晾在已读里最久)、top_words、chat_stats(按聊天统计,含回复时间)、export_chat(markdown/文本转录)
控制: get_status、get_me、set_mode、confirm_action、allowlist_add/remove/list
语音转写
transcribe_voice_message 会下载一条语音消息,如果你设置了 WAMCP_TRANSCRIPTION_CMD(一个包含 {input} 的命令,用于输出转录文本),它会通过你选择的 STT 工具(例如 whisper)进行处理。如果没有设置,音频仍会被下载并返回其路径。
配置参考
环境变量 | 默认值 | 含义 |
|
|
|
|
| SQLite 数据库 + 日志 + 下载的媒体 |
|
| WhatsApp 配对凭据 |
| 开启(安全模式) | 限制只能发送给已知收件人 |
| 开启(安全模式) | 发送前两步确认 |
|
| 每分钟最大发送数 / 分钟 |
|
| 每天最大发送数 / 天 |
| (无) | 包含 |
| (无) | 限制文件可以从哪些目录发送(防数据外泄) |
账户安全与服务条款
本项目使用 Baileys,一个非官方的 WhatsApp Web 客户端。自动化个人 WhatsApp 账户违反 WhatsApp 的服务条款,可能导致你的号码被暂时或永久封禁。 为降低这种风险:
除非确实需要发送,否则保持默认的 read-only 模式。
切勿用于冷启动推广、群发或相同/垃圾消息。
优先使用长期活跃的号码,而不是新 SIM 卡;避免使用 VOIP 号码。
将其视为个人助手,而非营销工具。
使用本工具即表示你接受此风险。它按现状提供,仅供个人和教育用途,不提供任何担保。与 WhatsApp 或 Meta 无关联。
致谢
衍生自 whatsapp-mcp-ts(ISC 许可)和 whatsapp-mcp(MIT 许可)。参见 NOTICE。MIT 许可。
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
- FlicenseNot gradedqualityCmaintenanceWhatsApp MCP server that exposes messaging, groups, contacts, and profile management as tools and resources for AI agents, supporting Baileys and Meta Cloud API.19
- AlicenseNot gradedqualityAmaintenanceA 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.2MIT
- AlicenseNot gradedqualityCmaintenanceSelf-hosted WhatsApp management over Model Context Protocol, exposing a streamable HTTP MCP endpoint with 30 tools for session/QR pairing, messaging, media storage, and optional on-CPU voice note transcription via whisper.cpp.MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.
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/eeshsaxena/whatsapp-mcp-plus'
If you have feedback or need assistance with the MCP directory API, please join our Discord server