WhatsApp MCP Server

by charlesagui

Not rated
GitHub

About

An MCP server for integrating WhatsApp with Claude Desktop, enabling interaction with your WhatsApp messages.

Details

Author
charlesagui
Categories
Communication, Other

Setup

Install WhatsApp MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/charlesagui/mcp-whats-app

Follow the installation instructions in the repository README, then restart your MCP client.

Servidor Model Context Protocol (MCP) optimizado para WhatsApp que permite integrar WhatsApp con Claude Desktop de forma eficiente.

- Características
-
Arquitectura
-
Requisitos
-
Instalación y Configuración
-
Guía de Uso
-
Herramientas Disponibles
-
Rendimiento y Optimizaciones
-
Almacenamiento de Datos
-
Seguridad
-
Solución de Problemas
-
Licencia

- Búsqueda y lectura de mensajespersonales de WhatsApp (imágenes, videos, documentos, audio)
- Búsqueda de contactosy envío de mensajes a individuos o grupos
- Envío de archivos multimedia(imágenes, videos, documentos, mensajes de audio)
- Conexión directaa tu cuenta personal de WhatsApp vía API web multidevice
- Almacenamiento localoptimizado en SQLite
- Carga lazy- no carga historial completo al iniciar
- Rendimiento optimizadopara consultas grandes
-

Go WhatsApp Bridge(whatsapp-bridge/):

- Conecta a API web de WhatsApp
- Maneja autenticación QR
- Almacena mensajes en SQLite
- API REST para comunicación

Python MCP Server(whatsapp-mcp-server/):

- Implementa protocolo MCP
- Herramientas optimizadas para Claude
- Consultas eficientes a la BD

- Go 1.24.1+
- Python 3.11+
- Claude Desktop app
- UV (gestor Python):curl -LsSf https://astral.sh/uv/install.sh | sh
- FFmpeg (opcional, para audio)
-

instalar-dependencias.bat(solo primera vez)

- Instala dependencias Go y Python
- Crea.envdesde.env.example
- Verifica configuración

- Inicia servidor Go
- Primera vez: escanea código QR
- MANTENER ABIERTOdurante uso

verificar-configuracion.bat(troubleshooting)

- Verifica que todo funcione
- Útil para diagnósticos

{ "mcpServers": { "whatsapp": { "command": "{{PATH_TO_UV}}", "args": [ "--directory", "{{PATH_TO_SRC}}/mi-whatsapp-mcp/whatsapp-mcp-server", "run", "main.py" ] } } }

- Windows:%APPDATA%\Claude\claude_desktop_config.json
- macOS:~/Library/Application Support/Claude/claude_desktop_config.json
- Linux:~/.config/Claude/claude_desktop_config.json

# 1. Clonar repositorio git clone https://github.com/tuusuario/mi-whatsapp-mcp.git cd mi-whatsapp-mcp # 2. Configurar entorno cp .env.example .env # 3. Instalar dependencias Go cd whatsapp-bridge go mod tidy # 4. Instalar dependencias Python cd ../whatsapp-mcp-server uv sync
cd whatsapp-bridge go env -w CGO_ENABLED=1 go run main.go

- ✅Ejecutar:instalar-dependencias.bat
- ✅Configurar: Claude Desktop config
- ✅Ejecutar:iniciar-whatsapp-bridge.bat
- ✅Escanear: Código QR con WhatsApp móvil
- ✅Reiniciar: Claude Desktop
- Ejecutar:iniciar-whatsapp-bridge.bat(mantener abierto)
- Abrir: Claude Desktop
- Usar: Herramientas WhatsApp en Claude

- No carga historial completoal iniciar
- Conexión DB solo cuando necesario
- Verificación de existenciade BD antes de conectar

# ❌ Antes: Podía cargar todo el historial list_messages() # ✅ Ahora: Requiere filtros específicos list_messages(chat_jid="123456@s.whatsapp.net", limit=20) list_messages(query="proyecto", after="2024-12-01") list_messages(force_load=True, limit=10) # Solo si necesitas forzar

- Mensajes: Máximo 50 por consulta
- Contactos: Máximo 25 resultados
- Contexto: Máximo 5 mensajes con contexto
- Búsqueda: Mínimo 2 caracteres

- Indexación optimizadaen SQLite
- Patrones de búsqueda inteligentes
- Ordenamiento por relevancia
- Filtros NULL eliminados

whatsapp-bridge/store/ ├── messages.db # Mensajes y chats └── whatsapp.db # Sesión WhatsApp

- chats: Información de chats (JID, nombre, último mensaje)
- messages: Mensajes completos con multimedia
- Índices optimizadospara búsquedas rápidas

- Almacenamiento local(no cloud)
- SQLite con WAL modepara concurrencia
- Claves foráneaspara integridad
- Limpieza automáticade datos antiguos

# API Configuration WHATSAPP_API_HOST=localhost WHATSAPP_API_PORT=8080 WHATSAPP_API_BASE_URL=http://localhost:8080/api # Database Configuration MESSAGES_DB_NAME=messages.db WHATSAPP_DB_NAME=whatsapp.db # Server Configuration REST_SERVER_PORT=8080 DEBUG=false LOG_LEVEL=INFO

Variables de entornopara configuraciones sensibles
Archivo .env protegidoen .gitignore
Rutas relativasen lugar de hardcodeadas
Configuración por defectosegura
Separación de secretosdel código
Validación de entradaen todas las funciones
Manejo seguro de rutasde archivos

- .env- Variables de entorno reales
- whatsapp-bridge/store/- Datos y mensajes
- .db- Bases de datos
-
.key,*.pem- Claves y certificados

❌ Commitear archivos.envreales
❌ Hardcodear passwords o tokens
❌ Usar puertos por defecto en producción
❌ Exponer API sin autenticación
❌ Commitear bases de datos con datos

# Reiniciar bridge iniciar-whatsapp-bridge.bat # Verificar terminal soporta QR
# En Claude, usar filtros específicos: # ❌ list_messages() # ✅ list_messages(chat_jid="contact@s.whatsapp.net") # ✅ list_messages(query="palabra", limit=10)

- Usar filtros específicos en consultas
- Evitarinclude_context=Truesin filtros
- Limitar resultados conlimitymax_results

- Bridge se reconecta automáticamente
- No necesita nuevo QR si sesión activa

- WhatsApp limita dispositivos vinculados
- Eliminar dispositivo desde WhatsApp móvil
- Ejecutarverificar-configuracion.bat
- Verificar que bridge esté ejecutándose
- Reiniciar Claude Desktop
- Verificar config en%APPDATA%\Claude\claude_desktop_config.json

# Verificar configuración verificar-configuracion.bat # Verificar procesos netstat -an | findstr :8080 # Verificar logs cd whatsapp-bridge go run main.go # Verificar base de datos cd whatsapp-bridge/store sqlite3 messages.db ".tables"
# Activar modo debug en .env DEBUG=true LOG_LEVEL=DEBUG # Ver logs en tiempo real tail -f whatsapp-bridge/logs/app.log

- Inicio MCP server: < 5 segundos
- Búsqueda contactos: < 1 segundo
- Lista mensajes (filtrados): < 2 segundos
- Envío mensaje: < 3 segundos

- MCP Server: ~50MB RAM
- WhatsApp Bridge: ~100MB RAM
- Base de datos: Variable según historial

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Manage your WhatsApp, SMS and Phone Calls using a single MCP connector

Send SMS, WhatsApp, and RCS messages programmatically with DLT compliance. Manage contacts, schedule campaigns, and track delivery reports.

Remote MCP server for managing WhatsApp and Telegram AI assistants: projects, prompts, conversations, leads and analytics, with no destructive tools by design.

143 local tools for Claude, Cursor & ChatGPT — Mail, iMessage, Teams, Slack, WhatsApp & files. 100% local, no API keys.

An MCP server for Claude that integrates with the Evolution API for WhatsApp automation.

Create AI-generated memes and convert them into stickers for Telegram and WhatsApp.

Local MCP server for a personal WhatsApp account. Single Go binary wrapping whatsmeow. Adds LID resolution, sent-message storage, disappearing-message timers, targeted history sync. Personal-use; Meta ToS applies.

An MCP server integrating WhatsApp messaging and ElevenLabs AI voice capabilities into VS Code.

WhatsApp automation platform with 120+ MCP tools for AI chatbots, broadcasts, campaigns, contact management, knowledge bases, and newsletters

Salesforce MCP Server - Enhanced Edition

A Salesforce MCP server with automatic integrations for services such as WhatsApp, Slack, email, and custom webhooks.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.