-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.env
More file actions
113 lines (91 loc) · 3.28 KB
/
.env
File metadata and controls
113 lines (91 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# 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=api-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
# }
# }'