WhatsApp Messaging API

السجل الرسمي الذكاء الاصطناعي والوكلاء

Send WhatsApp messages from Claude. No Meta Business approval or WhatsApp Business account.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package whatsapp-messaging-api-mcp
Claude Code
claude mcp add whatsapp-messaging-api -e 'WHATSAPP_API_KEY=<your whatsapp_api_key>' -- npx -y whatsapp-messaging-api-mcp@1.0.3
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "whatsapp-messaging-api": {
            "command": "npx",
            "args": [
                "-y",
                "whatsapp-messaging-api-mcp@1.0.3"
            ],
            "env": {
                "WHATSAPP_API_KEY": "<your whatsapp_api_key>"
            }
        }
    }
}

متغيرات البيئة

  • WHATSAPP_API_KEY إلزامي سري RapidAPI key for the WhatsApp Messaging API. Free tier, no credit card.

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. WhatsApp Messaging API — MCP Server
  2. Quick start
  3. Tools
  4. Typical flow
  5. Configuration
  6. Local development
  7. Links
  8. License

WhatsApp Messaging API — MCP Server

Send WhatsApp messages from Claude, Cursor, or any MCP client. Create a session, scan a QR code, and send text, images and files — no Meta Business approval and no WhatsApp Business account required.

Wraps the WhatsApp Messaging API.

Quick start

  1. Get a free API key from RapidAPI — no credit card.
  2. Add this to your MCP client config (Claude Desktop: claude_desktop_config.json):
     {
       "mcpServers": {
         "whatsapp": {
           "command": "npx",
           "args": ["-y", "whatsapp-messaging-api-mcp"],
           "env": {
             "WHATSAPP_API_KEY": "your-rapidapi-key"
           }
         }
       }
     }
  3. Restart the client. Ask it to create a WhatsApp session and show you the QR code.

Nothing to install or build — npx fetches the package on first run.

Tools

ToolDescription
list_sessionsList all sessions on this API key
create_sessionCreate a new session
get_session_statusCheck a session's current status
get_qr_codeGet the QR code to authenticate a session
request_pairing_codeGet an 8-digit pairing code instead of a QR
check_contact_existsCheck if a phone number is on WhatsApp before sending
send_text_messageSend a text message
send_imageSend an image via URL
send_fileSend a file (PDF, document) via URL

Typical flow

  1. create_session → get_qr_code → scan with WhatsApp (Settings → Linked Devices)
  2. get_session_status until it reports WORKING
  3. check_contact_exists, then send_text_message / send_image / send_file

Sessions stay authenticated between runs, so steps 1-2 are one-time per number.

Configuration

VariableRequiredDescription
WHATSAPP_API_KEYyesYour RapidAPI key. The server exits on startup if it is missing.

The key is read from the environment and sent only to the API host. It is never logged.

Local development

git clone https://github.com/jevil25/whatsapp-messaging-api-mcp.git
cd whatsapp-messaging-api-mcp
npm install
npm run dev      # runs src/index.ts directly via tsx, no build step
npm run build    # compile to dist/
npm test         # boots the built server and drives a real MCP handshake

npm test needs no credentials — it passes a dummy key, which gets far enough to list tools because nothing in the handshake makes an API call.

To point an MCP client at your local build, use "command": "node" with "args": ["/absolute/path/to/dist/index.js"].

See DEVELOPING.md for the release process.

License

MIT

الأسئلة الشائعة

ما هو WhatsApp Messaging API؟

Send WhatsApp messages from Claude. No Meta Business approval or WhatsApp Business account.

كيف أثبّت WhatsApp Messaging API؟

يعمل على جهازك. في Claude Code: claude mcp add whatsapp-messaging-api -e 'WHATSAPP_API_KEY=<your whatsapp_api_key>' -- npx -y whatsapp-messaging-api-mcp@1.0.3. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج WhatsApp Messaging API إلى مفتاح API؟

نعم. يتطلب WHATSAPP_API_KEY، وتضبطها في إعداداته.

هل WhatsApp Messaging API مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون WhatsApp Messaging API؟

ينشره jevil25. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.