← Back to directory
O

OpenWA

Community
Free, open-source WhatsApp API gateway that can serve as an MCP server for AI agents
GitHub source repository ↗
★ 13.2k Stars Category · Dev Tools Very popular Source revision 3b7fbe7ef067
47FMRS · D
Reliability
5/20
Security and permissions
10/20
Maintenance
6/20
Documentation
14/20
Setup experience
12/20

OpenWA offers a lightweight MCP server to safely expose WhatsApp automation capabilities to AI agents, but requires developers to have deployment and configuration experience and accept the risks of unofficial APIs.

Read the FMRS scoring method →

OpenWA is a free, open-source, self-hosted WhatsApp API gateway offering REST API, webhooks, multi-session management, and a web dashboard. It supports pluggable database, storage, and cache backends. When MCP_ENABLED=true is set, it mounts a stateless Streamable-HTTP transport at POST /mcp on the existing server, exposing 51 curated tools (sessions, messaging, contacts, basic group ops, webhook reads, labels, automation-rule reads) for AI agents like Claude and Cursor. The MCP server is off by default and additive, leaving all REST routes unchanged.

Tools

51 curated tools (sessions, messaging, contacts, basic group ops, webhook reads, labels, automation-rule reads)
Provides 51 curated tools for session management, sending/receiving messages, contact management, basic group operations, webhook reads, label management, and automation rule reads, callable by AI agents.

Setup

  1. Clone the repo: git clone https://github.com/rmyndharis/OpenWA.git && cd OpenWA\n2. Start Docker: docker compose -f docker-compose.dev.yml up -d (or use production deployment commands)\n3. Set MCP_ENABLED=true environment variable (in .env or docker-compose)\n4. Restart the service: npm run start:prod or restart the container\n5. Configure an MCP client (e.g., Claude Code's .mcp.json) with URL http://localhost:2785/mcp and include your API key in headers.
claude_desktop_config.json
{
  "mcpServers": {
    "openwa": {
      "type": "http",
      "url": "http://localhost:2785/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Fit and risk

Best for

  • Developers and hobbyists wanting a self-hosted WhatsApp API gateway
  • Scenarios requiring WhatsApp automation integrated into AI agents
  • Personal projects or internal tools needing low-cost messaging automation
  • Developers willing to accept unofficial API risks and account restrictions

Not for

  • Production environments requiring official WhatsApp Cloud API compliance (e.g., healthcare, finance, large-scale commercial messaging)
  • Users who cannot accept account ban risks
  • Users wanting zero-configuration setup (requires some deployment and configuration)
  • Scenarios needing full REST API coverage (MCP exposes only curated tools)

Required permissions

  • Requires API key authentication (role OPERATOR or lower, session-scoped)
  • May require access to the Docker socket (if using built-in orchestration, protected by docker-proxy)
  • MCP endpoint must be reachable from the client (e.g., localhost or LAN)
  • Recommended to use a dedicated WhatsApp number to avoid risks to primary numbers

Risks and side effects

  • Unofficial WhatsApp API, risk of account restriction or ban
  • Messages may be dropped by WhatsApp server-side (first message to new contacts)
  • Requires regular updates to dependencies to cope with WhatsApp protocol changes
  • If /mcp is exposed publicly without an auth proxy, it could be abused

Troubleshooting

  1. Check that MCP_ENABLED is set and the service has been restarted
  2. Verify the API key is valid with the correct role and session scope (no IP allow-list)
  3. Check network connectivity to ensure the client can reach the /mcp endpoint
  4. Inspect service logs to confirm MCP mounted successfully
  5. Validate that the Authorization or X-API-Key header is correct

Use cases

Let AI agents automatically reply to WhatsApp messages
Send scheduled messages or notifications via AI assistants
Automate customer support with AI agents handling common queries
Integrate chatbots into WhatsApp groups

Supported clients

Claude DesktopFull support
CursorFull support