# WSAPI MCP Server [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/wsapi-chat/wsapi-mcp  
**GitHub Stars:** 4  
**npm Downloads (last month):** 269  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/wsapi-chat-wsapi-mcp

## Description
WhatsApp through the WSAPI REST API: send messages and media, and manage chats, groups, communities and contacts on a connected number. Open source, self-hosted or managed.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "wsapi-mcp-server": {
    "command": "npx",
    "args": ["@wsapichat/mcp-server"],
    "env": {
      "WSAPI_API_KEY": "",
      "WSAPI_INSTANCE_ID": ""
    }
  }
}
```

**Requires environment variables:** `WSAPI_API_KEY`, `WSAPI_INSTANCE_ID` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What WSAPI MCP Server does

WSAPI MCP Server gives MCP-compatible AI clients access to WhatsApp operations through the WSAPI API Gateway. It can send messages and media, retrieve and manage contacts and chats, work with groups and communities, handle newsletters, publish status updates, and perform other operations on a connected WhatsApp number.

The integration covers 105 WhatsApp operations. Its scope is focused on WhatsApp functionality exposed through WSAPI; WSAPI cloud account and subscription features, along with OSS administration APIs, are outside the integration.

## How it works

The server runs as a Node.js package and communicates with WSAPI using an API key and instance ID. A client starts it with `npx @wsapichat/mcp-server`, then makes the exposed operations available to an AI agent through MCP. WSAPI uses the configured base URL, which defaults to `https://wsapi.chat`.

Tool loading can be narrowed in two ways. `WSAPI_ENABLED_CATEGORIES` selects groups such as messaging, contacts, groups, chats, session, users, communities, newsletters, status, calls, and media. `WSAPI_ENABLED_TOOLS` selects named operations such as `whatsapp_send_text`, `whatsapp_send_image`, and `whatsapp_get_contacts`. Either setting can be used alone, or categories can provide a base set while individual tools add operations from elsewhere. Without filtering, the server loads all available tools.

Accounts that require passkey verification need an additional browser-based step before a device can link. The agent can obtain or request a WebAuthn challenge, but the account owner must sign it in a browser on `https://web.whatsapp.com`. The resulting credential is submitted to WSAPI; if confirmation is required, the owner approves the displayed code on their phone.

## Setup and configuration

Node.js 20.19.0 or newer and a WSAPI account with API credentials are required. Configure the server with these required environment variables:

- `WSAPI_API_KEY`: WSAPI API key.
- `WSAPI_INSTANCE_ID`: WSAPI instance ID.

Optional settings include `WSAPI_BASE_URL` for a different WSAPI endpoint, `WSAPI_ENABLED_CATEGORIES` and `WSAPI_ENABLED_TOOLS` for tool filtering, and `LOG_LEVEL` for `error`, `warn`, `info`, or `debug` logging.

Claude Desktop can launch the package through its MCP configuration file. Claude Code can add the same command with `claude mcp add`, passing the credentials and filtering variables as environment settings. For local development, clone the repository, install dependencies with npm, create a `.env` file from `.env.example`, build, and start the package.

## Tools and capabilities

Available operations cover:

- Sending text, images, and other media through WhatsApp.
- Reading and managing contacts and chats.
- Managing groups, communities, and newsletters.
- Handling session and device-linking flows.
- Working with users, status updates, calls, and media.
- Selecting tools by category or exact tool name.

The project is licensed under MIT. It is not affiliated with, associated with, or endorsed by WhatsApp or Meta.

_Full upstream README: https://allmcps.com/mcp/wsapi-chat-wsapi-mcp/readme_

