
tkhattar14/whatsapp-business-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
WhatsApp Business Cloud API 用の MCP サーバー。 メッセージング、テンプレート、メディア、分析、フロー、Webhooksの50以上のツール.
概要
公式のWhatsAppビジネスクラウドAPI用のセキュリティ強化モデルコンテキストプロトコル(MCP)サーバー。 Claude、Cursor、または任意のMCP互換クライアントなどのAIアシスタントをWhatsAppビジネスに接続します。 - 8つのモジュールを渡る—メッセージング、テンプレート、メディア、分析、フロー、webhooks、ビジネスプロファイル、アカウント管理 - — APIキーオース、レート制限、入力検証、Webhook署名検証、エラーサニタイズ、パストラバーサル保護 - - すべての呼び出しは、no unofficial/third-party API - - - - - - stdio(Claude DesktopのようなMCPクライアント用)とHTTP(REST APIアクセスのために) - 調整可能なセキュリティ設定 - CORS - - - - - - - - - - - - - - - - - - - - - - - - - - - - HTTP エンドポイント (X-API-Key ヘッダ) - (IP あたり 10 の req/sec、メモリトークン Bucket ) - (メタ APP SECRET による HMAC-SHA256) - - - 電話番号形式、メッセージの長さの制限 - — エラー応答から除去されたトークンと機密 URL - - - 許可されたディレクトリに制限されるメディアのアップロード - — X-Content-Type-Options、X-Frame-Options、...
概要(AI 翻訳)
公式のWhatsAppビジネスクラウドAPI用のセキュリティ強化モデルコンテキストプロトコル(MCP)サーバー。 Claude、Cursor、または任意のMCP互換クライアントなどのAIアシスタントをWhatsAppビジネスに接続します。
##特徴
-50以上のツール 8つのモジュール全体で、メッセージング、テンプレート、メディア、分析、フロー、Webhooks、ビジネスプロファイル、アカウント管理
-Security-first — APIキーのauth、レートの制限、入力検証、Webhookのシグネチャ検証、エラーのサニタイゼーション、パストラバース保護
-公式Meta APIのみ — すべての呼び出しは[graph.facebook.comに移動します。非公式/サードパーティAPIはありません。
- 2つのトランスポートモード — stdio(Claude DesktopのようなMCPクライアントの場合)とHTTP(REST APIアクセス用)
- Production-ready — CORS 制御、セキュリティ ヘッダー、環境変数によって構成可能
ツールの概要
| モジュール | ツール | 概要 | お問い合わせ |メッセージ | テキスト、メディア、インタラクティブ、場所、連絡先、反応、応答を送信する | すべてのWhatsAppメッセージタイプ | |** | テンプレートのライフサイクル管理 | 作成、リスト、送信、削除、ステータス取得 | 完全テンプレートのライフサイクル管理 | |メディア | アップロード、ダウンロード、削除、情報の取得 | 画像、動画、音声、ドキュメントの取り扱い |
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
WhatsApp Business MCP Server
A security-hardened Model Context Protocol (MCP) server for the official WhatsApp Business Cloud API. Connect AI assistants like Claude, Cursor, or any MCP-compatible client to WhatsApp Business.
Features
- 50+ tools across 8 modules — messaging, templates, media, analytics, flows, webhooks, business profile, account management
- Security-first — API key auth, rate limiting, input validation, webhook signature verification, error sanitization, path traversal protection
- Official Meta API only — all calls go to
graph.facebook.com, no unofficial/third-party APIs - Two transport modes — stdio (for MCP clients like Claude Desktop) and HTTP (for REST API access)
- Production-ready — CORS controls, security headers, configurable via environment variables
Tools Overview
| Module | Tools | Description |
|---|---|---|
| Messaging | Send text, media, interactive, location, contact, reaction, reply | All WhatsApp message types |
| Templates | Create, list, send, delete, get status | Full template lifecycle management |
| Media | Upload, download, delete, get info | Image, video, audio, document handling |
| Analytics | Conversation analytics, quality rating, messaging limits | Business insights |
| Flows | Create, list, send flow messages | WhatsApp interactive experiences |
| Webhooks | Subscribe, unsubscribe, manage webhook fields | Event management |
| Business Profile | Get/update profile, phone numbers | Business identity management |
| Business Account | WABA management, phone operations | Account administration |
Quick Start
1. Clone and install
git clone https://github.com/tkhattar14/whatsapp-business-mcp.git
cd whatsapp-business-mcp
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
2. Configure
cp .env.example .env
# Edit .env with your Meta WhatsApp Business API credentials
# Get them from: https://developers.facebook.com/
3. Run (stdio mode — for MCP clients)
source .env && python main.py
4. Run (HTTP mode — for REST API)
source .env && python main_http.py
MCP Client Configuration
Claude Desktop / Cursor
{
"mcpServers": {
"whatsapp": {
"command": "python",
"args": ["/path/to/whatsapp-business-mcp/main.py"],
"env": {
"META_ACCESS_TOKEN": "your_token",
"META_PHONE_NUMBER_ID": "your_phone_id"
}
}
}
}
mcporter (OpenClaw)
mcporter add whatsapp-business --stdio "python /path/to/main.py"
Environment Variables
| Variable | Required | Description |
|---|---|---|
META_ACCESS_TOKEN |
Yes | Meta API bearer token |
META_PHONE_NUMBER_ID |
Yes | WhatsApp sender phone number ID |
META_BUSINESS_ACCOUNT_ID |
Recommended | Business account ID |
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"whatsapp": {
"command": "python",
"args": ["/path/to/whatsapp-business-mcp/main.py"],
"env": {
"META_ACCESS_TOKEN": "your_token",
"META_PHONE_NUMBER_ID": "your_phone_id"
}
}
}
}