WhatsApp MCP
📱 WhatsApp MCP — リモートHTTP/SSEサーバー
WhatsApp用Model Context Protocol (MCP) サーバー。
whatsapp-web.jsとTypeScriptで構築されています。 ローカルstdio (Claude Desktop) と リモートHTTP/SSE (Claude.ai Remote MCP) の両方のモードをサポートしています。
⚠️ WhatsApp利用規約 — 重要
このプロジェクトを使用する前に必ずお読みください。
WhatsAppの利用規約および利用規定では、個人アカウントやビジネスアカウントでの非公式な自動化ツールの使用を禁止しています。
🚫 アカウントが停止(BAN)される可能性のある行為:
違反行為 | リスクレベル |
大量送信/スパムメッセージ | 🔴 即時BAN |
未知の番号へのメッセージ自動化 | 🔴 即時BAN |
非公式WhatsAppクライアント( | 🟠 高リスク |
大規模な連絡先やグループデータのスクレイピング | 🟠 高リスク |
ユーザーの同意なしにメッセージを送信する | 🔴 即時BAN |
個人番号で24時間365日ボットを稼働させる | 🟡 中リスク |
メディア/ファイルを大量に送信する | 🟠 高リスク |
✅ より安全な運用方法:
個人番号ではなく、専用のテスト用電話番号を使用してください
同意を得た連絡先にのみメッセージを送信してください
メッセージの頻度を低く抑え、人間らしい動作を心がけてください
API_KEYによる保護なしに/sseやRESTエンドポイントを公開しないでくださいマーケティング、セールスの一斉送信、または大規模な商用メッセージングには使用しないでください
本番環境や商用利用にはWhatsApp Business API (公式)を使用してください
🔒 本プロジェクトは、個人の自動化および開発・テストのみを目的としています。 誤用によって生じたアカウント停止や法的責任について、著者は一切の責任を負いません。
Related MCP server: WhatsApp MCP Server
🗂️ プロジェクト構成
whatsapp-mcp/
├── src/
│ ├── index.ts # stdio MCP server (Claude Desktop)
│ ├── remote.ts # HTTP/SSE MCP server (Remote MCP + REST API)
│ └── send_message.ts # CLI script to send a single message
├── dist/ # Compiled JavaScript (auto-generated, do not edit)
├── .wwebjs_auth/ # WhatsApp session data (⚠️ keep this gitignored!)
├── .wwebjs_cache/ # Puppeteer browser cache (gitignored)
├── package.json
├── tsconfig.json
├── render.yaml # Render.com deployment config
├── start-remote.bat # Windows quick-start script
└── README.md🚀 クイックスタート
前提条件
Node.js v18以上 および npm
WhatsAppアカウント(テスト用番号を使用してください!)
Google Chrome または Chromium(Puppeteerが内部で使用します)
1. 依存関係のインストール
npm install2. TypeScriptのビルド
npm run build3. サーバーの起動
リモートHTTP/SSEモード (Claude.ai Remote MCP):
npm run start:remote開発モード (ビルド不要、ts-nodeを使用):
npm run dev:remotestdioモード (Claude Desktop):
npm start4. QRコードのスキャン
ブラウザを開き、以下にアクセスしてください:
http://localhost:3000/qrWhatsAppでQRコードをスキャンします → リンクされたデバイス → デバイスをリンク。
🔌 APIエンドポイント
メソッド | パス | 説明 |
|
| ヘルスチェック + WhatsAppステータス |
|
| QRコードHTMLページ(スキャンして認証) |
|
| JSON形式の生QRデータ |
|
| 利用可能な全MCPツールの一覧 |
|
| WhatsApp接続ステータス |
|
| WhatsAppメッセージの送信 |
|
| 最近のチャット一覧 |
|
| 連絡先一覧 |
|
| チャットのメッセージを取得 |
|
| 汎用MCPツール呼び出し |
|
| MCP SSEエンドポイント (Claude Remote MCP) |
|
| MCP POSTエンドポイント ( |
🛠️ 利用可能なMCPツール
ツール | 説明 |
| 接続ステータスの確認 |
| テキストメッセージの送信 |
| 画像/動画/ドキュメントの送信 |
| 全連絡先のリスト取得 |
| 全グループのリスト取得 |
| グループ詳細とメンバーの取得 |
| 新規グループの作成 |
| 最近のチャット取得 |
| 特定チャットのメッセージ取得 |
🔐 オプション:Bearerトークン認証
API_KEY環境変数を設定してRESTエンドポイントを保護します:
API_KEY=mysecretkey npm run start:remoteすべてのリクエストにトークンを含めてください:
curl -H "Authorization: Bearer mysecretkey" http://localhost:3000/tools/status🌐 ngrokを使用したテスト (パブリックHTTPS)
サーバーを起動:
npm run start:remote新しいターミナルで:
ngrok http 3000生成されたURLをコピー (例:
https://xxxx.ngrok-free.app)
Claude.ai → 設定 → 統合 → Remote MCP に以下を貼り付けます:
https://xxxx.ngrok-free.app/sse☁️ Renderへのデプロイ
このリポジトリをGitHubにプッシュ (以下のGit手順を参照)
render.com にアクセス → New → Web Service
GitHubリポジトリを接続
設定:
Build Command:
npm install && npm run buildStart Command:
npm run start:remoteEnvironment:
NODE_ENV=productionOptional:
API_KEY=yoursecretkey
デプロイし、
https://your-app.onrender.comURLをコピー
Claude Remote MCPに貼り付けます:
https://your-app.onrender.com/sse⚠️ 注意: WhatsAppのセッションデータ (
.wwebjs_auth) はRenderのデプロイ間で保持されません。Render Diskを使用するか、デプロイのたびにQRコードを再スキャンしてください。
📦 npmスクリプト
コマンド | 説明 |
| TypeScriptを |
| stdio MCPサーバーの起動 |
| HTTP/SSEリモートサーバーの起動 |
| 開発用stdioサーバー (ts-node、ビルド不要) |
| 開発用リモートサーバー (ts-node、ビルド不要) |
| CLI: メッセージを1件送信 |
| ターミナルにQRコードを表示 |
📄 .gitignoreの推奨設定
.gitignore に以下が含まれていることを確認してください:
node_modules/
dist/
.wwebjs_auth/
.wwebjs_cache/
.env
*.bat🔒
.wwebjs_auth/は絶対にコミットしないでください — WhatsAppのセッション認証情報が含まれています。
🔧 環境変数
変数 | デフォルト | 説明 |
|
| HTTPサーバーポート |
|
| サーバーバインドアドレス |
| (空) | REST認証用のオプションのBearerトークン |
|
| Render上では |
🤝 コントリビューション
プルリクエストを歓迎します!大きな変更を行う場合は、まずIssueを開いてください。
📜 ライセンス
MIT — 責任を持って、WhatsAppの利用規約に従って使用してください。
💡 ヒント: VS Codeに GitLens拡張機能 をインストールすると、コミット履歴、Blame、比較など、より充実したGit体験が得られます。
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 Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Drive WhatsApp from any MCP client: pair devices, send text and media, manage contacts and groups.
A Model Context Protocol server for Wix AI tools
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Node.js application that connects WhatsApp Web with AI models through the Model Context Protocol, enabling automated messaging, contact management, and group chat functionality through AI-driven workflows.4244MIT
- AlicenseCqualityFmaintenanceA Model Context Protocol server that connects your personal WhatsApp account to AI agents like Claude, enabling them to search messages, view contacts, retrieve chat history, and send messages via WhatsApp.71372ISC
- AlicenseNot gradedqualityNot gradedmaintenanceA Model Context Protocol server that integrates with WaPulse WhatsApp Web API, enabling users to send messages, manage groups, handle files, and perform various WhatsApp operations programmatically.31
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to interact with WhatsApp through a Model Context Protocol server, supporting sending text messages, contacts, links, and locations via standardized tools.6MIT
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/PONMANIAN-SA/whatsapp_MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server