config.example.env•3.37 kB
# Configuración MCP Asistente Telefónico Conversacional
# ==============================================
# CONFIGURACIÓN ASISTENTE TELEFÓNICO
# ==============================================
# URL del asistente telefónico (según tu ejemplo)
PHONE_API_URL=http://192.168.4.44:8000
# API Key para autenticar con el asistente telefónico
PHONE_API_KEY=phone-secret-key
# Timeout por defecto para llamadas (en milisegundos)
PHONE_TIMEOUT=30000
# Número de reintentos automáticos
PHONE_RETRIES=3
# URL del MCP para callbacks (donde el asistente enviará respuestas)
MCP_CALLBACK_URL=http://localhost:3000
# ==============================================
# CONFIGURACIÓN SEGURIDAD MCP
# ==============================================
# API Key para proteger endpoints del MCP
MCP_CALLBACK_API_KEY=mcp-secret-key
# IPs permitidas para acceder a endpoints protegidos (separadas por comas)
# Dejar vacío para permitir todas las IPs
MCP_ALLOWED_IPS=192.168.4.44,127.0.0.1
# ==============================================
# CONFIGURACIÓN DESARROLLO
# ==============================================
# Entorno de ejecución
NODE_ENV=development
# ==============================================
# INSTRUCCIONES DE USO
# ==============================================
# 1. Copia este archivo como .env en la raíz del proyecto
# 2. Ajusta las URLs y API keys según tu entorno
# 3. Compila el proyecto: npm run build
# 4. Ejecuta el MCP: npm run start-node
# 5. Configura en Cursor usando mcp.json
# ==============================================
# EJEMPLOS DE USO DESDE CURSOR/CLAUDE
# ==============================================
# Realizar llamada telefónica:
# await phone_make_call({
# usuario: "Goyo",
# telefono: "100",
# proposito: "Confirmar cita médica de mañana",
# contexto: "El usuario tiene una cita médica programada para mañana a las 10:00"
# });
# Obtener estado de una llamada:
# await phone_get_status({
# callId: "call_123"
# });
# Ver historial de conversaciones:
# await phone_get_conversation_history({
# limit: 10
# });
# Health check del sistema:
# await phone_health_check();
# ==============================================
# CONFIGURACIÓN EN CURSOR (mcp.json)
# ==============================================
# {
# "mcpServers": {
# "phone-assistant": {
# "command": "node",
# "args": ["C:/workspaces/work_grec0ai/handout-mcp/dist/index.js"],
# "env": {
# "PHONE_API_URL": "http://192.168.4.44:8000",
# "PHONE_API_KEY": "phone-secret-key",
# "MCP_CALLBACK_URL": "http://localhost:3000"
# }
# }
# }
# }
# ==============================================
# CALLBACK DE PRUEBA DESDE ASISTENTE TELEFÓNICO
# ==============================================
# curl -X POST http://localhost:3000/api/phone/conversation-result \
# -H "Content-Type: application/json" \
# -H "X-MCP-API-Key: mcp-secret-key" \
# -d '{
# "callId": "test_123",
# "usuario": "Goyo",
# "telefono": "100",
# "status": "completed",
# "duration": 120,
# "resumen_conversacion": "El usuario confirmó que la cita del martes está bien",
# "resultado_accion": "Cita confirmada para el martes a las 10:00",
# "informacion_obtenida": {
# "fecha_cita": "2024-01-09",
# "hora_cita": "10:00",
# "confirmado": true
# }
# }'