About π Chatterbox MCP Server
Chatterbox MCP Server provides WhatsApp functionality through MCP tools for personal use. It separates the MCP server from a REST API service that handles WhatsApp Web integration.
Key features
- 01WhatsApp MCP tools
- 02MCP resources
- 03Separate WhatsApp REST API service
- 04File-based secret storage
- 05Docker builds for each service
Use cases
- 01Use WhatsApp functions from an MCP client
- 02Authenticate WhatsApp with a QR code
- 03Develop or deploy the two services separately
MCP support
The MCP server exposes WhatsApp operation tools and resources to MCP clients, and calls the WhatsApp service through an HTTP API.
Configuration
Local server config is the same for every client. Copy it into your clientβs MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEπ Chatterbox MCP Server (indexed and certified by MCPHub)
This repository contains two main components:
π€ MCP Server (mcp_server/)
The Model Context Protocol server that provides WhatsApp functionality through MCP tools.
Key files:
mcp_server/src/server.ts- Main MCP servermcp_server/src/model/tools.ts- MCP tools for WhatsApp operationsmcp_server/src/model/resources.ts- MCP resources
Usage:
cd mcp_server
npm install
npm run dev
π± WhatsApp Server (whatsappServer/)
The REST API server that handles actual WhatsApp Web integration.
Key files:
whatsappServer/src/server.ts- Main Express serverwhatsappServer/src/services/whatsappService.ts- WhatsApp Web.js integrationwhatsappServer/src/controllers/whatsappController.ts- API endpoints
Usage:
cd whatsappServer
npm install
npm run dev
π§ Architecture
βββββββββββββββββββ HTTP API βββββββββββββββββββ
β β Calls β β
β MCP Server β ββββββββββββββΊ β WhatsApp Server β
β β β β
βββββββββββββββββββ βββββββββββββββββββ
β β
β β
βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ
β MCP Client β β WhatsApp Web β
β (Claude, etc) β β β
βββββββββββββββββββ βββββββββββββββββββ
π Project Structure
chatterbox_mcp_server/
βββ mcp_server/
β βββ src/
β βββ secrets/ # Secret files for MCP server
β β βββ CHATTERBOX_SECRET
β β βββ WHATSAPP_SERVER_URL
β βββ package.json
βββ whatsappServer/
β βββ src/
β βββ secrets/ # Secret files for WhatsApp server
β β βββ CHATTERBOX_SECRET
β β βββ PORT
β β βββ HEADLESS
β βββ package.json
βββ package.json
π Quick Start
-
Set up secrets:
# MCP Server secrets (in mcp_server/secrets/) echo "your_secret_here" > mcp_server/secrets/CHATTERBOX_SECRET echo "http://localhost:3004" > mcp_server/secrets/WHATSAPP_SERVER_URL # WhatsApp Server secrets (in whatsappServer/secrets/) echo "your_secret_here" > whatsappServer/secrets/CHATTERBOX_SECRET echo "3004" > whatsappServer/secrets/PORT echo "true" > whatsappServer/secrets/HEADLESS -
Install dependencies:
npm run install:all -
Start WhatsApp Server:
npm run dev:whatsapp -
Start MCP Server:
npm run dev:mcp -
Authenticate WhatsApp:
- Visit
http://localhost:3004/qrto get QR code - Scan with WhatsApp mobile app
- Visit
π οΈ Development
Each component can be developed independently:
- MCP Server focuses on MCP protocol implementation
- WhatsApp Server handles WhatsApp Web integration and API endpoints
π Required Secrets
Both servers use file-based secrets instead of environment variables for better security. Each secret is stored in a separate file within the secrets/ folder.
MCP Server (mcp_server/secrets/)
CHATTERBOX_SECRET- Authentication secret for API calls to WhatsApp serverWHATSAPP_SERVER_URL- URL of the WhatsApp server (e.g.,http://localhost)SERVER_PORT- Port on which the server is listening on (e.g.,3004)
WhatsApp Server (whatsappServer/secrets/)
CHATTERBOX_SECRET- Authentication secret (must match MCP server secret)PORT- Server port number (e.g.,3004)HEADLESS- Run WhatsApp in headless mode (trueorfalse)
Note: The CHATTERBOX_SECRET must be the same in both servers for authentication to work.
π³ Docker
Each component has its own Dockerfile for containerization:
# WhatsApp Server
cd whatsappServer
docker build -t whatsapp-server .
# MCP Server
cd mcp_server
docker build -t mcp-server .
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.