Skip to main content
Glama
ag2-mcp-servers

WhatsApp Business API MCP Server

MCP-Server

Dieses Projekt ist ein MCP-Server (Multi-Agent Conversation Protocol) für die angegebene OpenAPI-URL – https://api.apis.guru/v2/specs/whatsapp.local/1.0/openapi.json , automatisch generiert mit dem MCP-Builder von AG2.

Voraussetzungen

  • Python 3.9+

  • Pip und UV

Related MCP server: wati-mcp-server

Installation

  1. Klonen Sie das Repository:

    git clone <repository-url>
    cd mcp-server
  2. Abhängigkeiten installieren: Das Skript .devcontainer/setup.sh übernimmt die Installation von Abhängigkeiten mit pip install -e ".[dev]" . Wenn Sie den Dev-Container nicht verwenden, können Sie diesen Befehl manuell ausführen.

    pip install -e ".[dev]"

    Alternativ können Sie uv verwenden:

    uv pip install --editable ".[dev]"

Entwicklung

Dieses Projekt verwendet ruff zum Lint-Test und Formatieren, mypy zur statischen Typprüfung und pytest zum Testen.

Lintierung und Formatierung

So prüfen Sie, ob Probleme mit der Flusenbildung vorliegen:

ruff check

So formatieren Sie den Code:

ruff format

Diese Befehle sind auch über das Skript scripts/lint.sh verfügbar.

Statische Analyse

So führen Sie eine statische Analyse aus (mypy, bandit, semgrep):

./scripts/static-analysis.sh

Dieses Skript ist auch als Pre-Commit-Hook in .pre-commit-config.yaml konfiguriert.

Ausführen von Tests

So führen Sie Tests mit Abdeckung durch:

./scripts/test.sh

Dadurch wird pytest ausgeführt und ein Abdeckungsbericht generiert. Für einen kombinierten Bericht und eine Bereinigung können Sie Folgendes verwenden:

./scripts/test-cov.sh

Pre-Commit-Hooks

Dieses Projekt verwendet Pre-Commit-Hooks, die in .pre-commit-config.yaml definiert sind. So installieren Sie die Hooks:

pre-commit install

Die Hooks werden vor jedem Commit automatisch ausgeführt.

Ausführen des Servers

Der MCP-Server kann mit dem Skript mcp_server/main.py gestartet werden. Er unterstützt verschiedene Transportmodi (z. B. stdio , sse ).

So starten Sie den Server (z. B. im Standardmodus):

python mcp_server/main.py stdio

Der Server kann mithilfe von Umgebungsvariablen konfiguriert werden:

  • CONFIG_PATH : Pfad zu einer JSON-Konfigurationsdatei (z. B. mcp_server/mcp_config.json ).

  • CONFIG : Eine JSON-Zeichenfolge, die die Konfiguration enthält.

  • SECURITY : Umgebungsvariablen für Sicherheitsparameter (z. B. API-Schlüssel).

Weitere Informationen zum Laden finden Sie im Block if __name__ == "__main__": in mcp_server/main.py .

Die Datei tests/test_mcp_server.py zeigt, wie Sie den Server zum Testen programmgesteuert starten und mit ihm interagieren.

Erstellen und Veröffentlichen

Dieses Projekt verwendet Hatch zum Erstellen und Veröffentlichen. So erstellen Sie das Projekt:

hatch build

So veröffentlichen Sie das Projekt:

hatch publish

Diese Befehle sind auch über das Skript scripts/publish.sh verfügbar.

Related MCP Connectors

  • WhatsMCP connects Claude and other MCP-compatible AI agents directly to WhatsApp. Send and receive text, images, documents, and voice notes; manage groups (create, add/remove members, promote admins); look up contacts and profiles; follow channels; and read call and message history — all through a standard MCP interface. For voice use cases, WhatsMCP offers SIP-based calling plans (inbound-only, or full inbound/outbound) so AI voice agents can answer and place WhatsApp calls, plus low-latency WebSocket integrations with voice agent providers like ElevenLabs. Multiple WhatsApp accounts can be paired and managed per workspace, with webhook support for real-time inbound message delivery to your own infrastructure.

  • Unified messaging MCP server: WhatsApp, Instagram, Telegram, SMS, Messenger & email support inbox

  • WhatsApp (Web + Business API), SMS, contacts, and call records via 2Chat's MCP server.

  • Atendio is a WhatsApp AI assistant for businesses in Latin America, on the official WhatsApp Business Platform. This MCP server lets Claude (or any MCP client) list and read WhatsApp conversations, view analytics and assistant settings, and create, edit or delete the rules your AI assistant follows. Remote, OAuth 2.1; the business always reviews and publishes rule changes.

Related MCP Servers

  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    A 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.
    6 npm
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server that connects AI agents to WhatsApp using the multi-device API, enabling messaging, group management, and more as a regular user.
    6 npm
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    MCP server for the WhatsApp Business API that enables managing business accounts, phone numbers, message templates, sending template messages, and tracking message status via the Meta Graph API.
    8
    9 npm
    MIT