Feat: Agregar MCP Server para agentes IA
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m10s

- Endpoint JSON-RPC 2.0 en /api/mcp
- 8 herramientas: list_instances, list_chats, get_chat, search_chats, send_message, get_messages, react_message, get_guide
- Soporte para todos los tipos de mensaje (text, image, video, audio, document, sticker, contact, poll, event)
- Guías de uso integradas con ejemplos JSON
- Autenticación via NUXT_MASTER_API_KEY
This commit is contained in:
2025-12-04 14:05:27 -06:00
parent 23e78fb0b2
commit 7abad2b6c3
3 changed files with 1323 additions and 0 deletions

59
README.md Normal file
View File

@@ -0,0 +1,59 @@
# WhatsApp Nucleo
Sistema de gestión centralizada de múltiples instancias de WhatsApp para Nucleo V3.
## MCP Server para Claude Code
Agregar el MCP a tu proyecto (usa tu NUXT_MASTER_API_KEY):
```bash
claude mcp add --transport http whatsapp https://whatsapp.nucleoriofrio.com/api/mcp --header "Authorization: Bearer <NUXT_MASTER_API_KEY>"
```
---
## Setup
```bash
npm install
```
## Development
```bash
npm run dev
```
## Production
```bash
npm run build
node .output/server/index.mjs
```
---
## API Endpoints
### Instancias
- `GET /api/instances` - Lista instancias
- `POST /api/instances` - Crear instancia
- `POST /api/instances/:id/connect` - Conectar instancia
- `POST /api/instances/:id/disconnect` - Desconectar
### Mensajes
- `POST /api/messages/:instanceId/:chatId/send` - Enviar mensaje
- `GET /api/messages/:instanceId/:chatId` - Obtener mensajes
- `POST /api/messages/:instanceId/react` - Reaccionar a mensaje
### MCP
- `POST /api/mcp` - Endpoint JSON-RPC para agentes IA
---
## Stack
- **Frontend:** Nuxt 3, Vue 3, Nuxt UI, TailwindCSS
- **Backend:** Nitro, PostgreSQL
- **WhatsApp:** Baileys v6.7.9
- **Auth:** Authentik + Traefik