@smsmasivos/mcp-server 0.2.3 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +67 -4
  2. package/dist/api-client.d.ts +2 -0
  3. package/dist/api-client.js +14 -9
  4. package/dist/api-client.js.map +1 -1
  5. package/dist/metrics.d.ts +22 -0
  6. package/dist/metrics.js +55 -0
  7. package/dist/metrics.js.map +1 -0
  8. package/dist/prompts/index.d.ts +2 -0
  9. package/dist/prompts/index.js +59 -0
  10. package/dist/prompts/index.js.map +1 -0
  11. package/dist/resources/faq.d.ts +2 -0
  12. package/dist/resources/faq.js +173 -0
  13. package/dist/resources/faq.js.map +1 -0
  14. package/dist/resources/index.d.ts +2 -0
  15. package/dist/resources/index.js +5 -0
  16. package/dist/resources/index.js.map +1 -0
  17. package/dist/schemas.d.ts +99 -0
  18. package/dist/schemas.js +41 -0
  19. package/dist/schemas.js.map +1 -1
  20. package/dist/stdio.js +11 -2
  21. package/dist/stdio.js.map +1 -1
  22. package/dist/tools/add-loyalty-contact.d.ts +3 -0
  23. package/dist/tools/add-loyalty-contact.js +22 -0
  24. package/dist/tools/add-loyalty-contact.js.map +1 -0
  25. package/dist/tools/add-wallet-contact.d.ts +3 -0
  26. package/dist/tools/add-wallet-contact.js +22 -0
  27. package/dist/tools/add-wallet-contact.js.map +1 -0
  28. package/dist/tools/delete-contact.d.ts +3 -0
  29. package/dist/tools/delete-contact.js +17 -0
  30. package/dist/tools/delete-contact.js.map +1 -0
  31. package/dist/tools/get-loyalty-contact.d.ts +3 -0
  32. package/dist/tools/get-loyalty-contact.js +23 -0
  33. package/dist/tools/get-loyalty-contact.js.map +1 -0
  34. package/dist/tools/get-metrics.d.ts +2 -0
  35. package/dist/tools/get-metrics.js +25 -0
  36. package/dist/tools/get-metrics.js.map +1 -0
  37. package/dist/tools/get-wallet-contact.d.ts +3 -0
  38. package/dist/tools/get-wallet-contact.js +23 -0
  39. package/dist/tools/get-wallet-contact.js.map +1 -0
  40. package/dist/tools/index.js +52 -9
  41. package/dist/tools/index.js.map +1 -1
  42. package/dist/tools/list-loyalty-cards.d.ts +3 -0
  43. package/dist/tools/list-loyalty-cards.js +23 -0
  44. package/dist/tools/list-loyalty-cards.js.map +1 -0
  45. package/dist/tools/list-wallets.d.ts +3 -0
  46. package/dist/tools/list-wallets.js +23 -0
  47. package/dist/tools/list-wallets.js.map +1 -0
  48. package/dist/tools/register-loyalty-sale.d.ts +3 -0
  49. package/dist/tools/register-loyalty-sale.js +22 -0
  50. package/dist/tools/register-loyalty-sale.js.map +1 -0
  51. package/dist/tools/update-wallet-balance.d.ts +3 -0
  52. package/dist/tools/update-wallet-balance.js +23 -0
  53. package/dist/tools/update-wallet-balance.js.map +1 -0
  54. package/package.json +1 -1
package/README.md CHANGED
@@ -9,10 +9,10 @@ Conecta tu asistente de IA con SMS Masivos para enviar mensajes, gestionar conta
9
9
 
10
10
  ## Features
11
11
 
12
- - **Envio de SMS** — individuales o masivos, hasta 500 numeros por llamada
13
- - **Campanas** — lista tus campanas y consulta estadisticas de entrega
14
- - **Agendas y contactos** — gestiona listas de contactos
15
- - **Verificacion OTP** — envia y valida codigos por SMS, voz o WhatsApp
12
+ - **19 tools** — SMS, campanas, contactos, verificacion OTP, lealtad, monederos y metricas
13
+ - **FAQ integrado** — 5 recursos de ayuda accesibles desde tu asistente
14
+ - **Prompts guiados** — 4 flujos paso a paso para tareas comunes
15
+ - **Telemetria** — metricas de uso por sesion (latencia, errores, sandbox vs produccion)
16
16
  - **Sandbox** — prueba sin enviar mensajes reales ni gastar creditos
17
17
  - **Compatible** — funciona con Claude, Cursor, Windsurf y cualquier cliente MCP
18
18
 
@@ -102,18 +102,78 @@ Si tienes [Bun](https://bun.sh) instalado, reemplaza `npx` por `bunx` en cualqui
102
102
 
103
103
  ## Tools disponibles
104
104
 
105
+ ### SMS y campanas
106
+
105
107
  | Tool | Descripcion |
106
108
  |------|-------------|
107
109
  | `check_balance` | Consulta creditos SMS disponibles |
108
110
  | `send_sms` | Envia SMS a uno o varios numeros (max 500) |
109
111
  | `list_campaigns` | Lista campanas con filtros por fecha |
110
112
  | `get_campaign_stats` | Estadisticas de entrega de una campana |
113
+
114
+ ### Contactos y agendas
115
+
116
+ | Tool | Descripcion |
117
+ |------|-------------|
111
118
  | `list_agendas` | Lista agendas de contactos |
112
119
  | `get_contacts` | Obtiene contactos de una agenda |
113
120
  | `add_contact` | Agrega contacto a una agenda |
121
+ | `delete_contact` | Elimina un contacto de una agenda |
122
+
123
+ ### Verificacion OTP
124
+
125
+ | Tool | Descripcion |
126
+ |------|-------------|
114
127
  | `verify_phone` | Inicia verificacion OTP (SMS, voz o WhatsApp) |
115
128
  | `check_verification` | Verifica codigo OTP |
116
129
 
130
+ ### Programa de lealtad
131
+
132
+ | Tool | Descripcion |
133
+ |------|-------------|
134
+ | `list_loyalty_cards` | Lista tarjetas de lealtad de tu cuenta |
135
+ | `add_loyalty_contact` | Agrega contacto a una tarjeta de lealtad |
136
+ | `get_loyalty_contact` | Consulta sellos y canjes de un contacto |
137
+ | `register_loyalty_sale` | Registra venta y agrega sellos |
138
+
139
+ ### Monedero electronico
140
+
141
+ | Tool | Descripcion |
142
+ |------|-------------|
143
+ | `list_wallets` | Lista monederos de tu cuenta |
144
+ | `add_wallet_contact` | Agrega contacto a un monedero |
145
+ | `get_wallet_contact` | Consulta saldo de un contacto |
146
+ | `update_wallet_balance` | Agrega o resta saldo a un contacto |
147
+
148
+ ### Utilidades
149
+
150
+ | Tool | Descripcion |
151
+ |------|-------------|
152
+ | `get_metrics` | Metricas de uso de la sesion (latencia, errores, sandbox vs prod) |
153
+
154
+ ## FAQ Resources
155
+
156
+ El servidor incluye 5 recursos de ayuda accesibles via MCP resources:
157
+
158
+ | Resource | Descripcion |
159
+ |----------|-------------|
160
+ | `getting-started` | Como obtener tu API key y configurar el server |
161
+ | `common-errors` | Errores frecuentes y como solucionarlos |
162
+ | `limits-and-pricing` | Limites de la API y precios |
163
+ | `sandbox-mode` | Como usar el modo sandbox para pruebas |
164
+ | `tool-examples` | Ejemplos de uso de cada tool |
165
+
166
+ ## Prompts guiados
167
+
168
+ Flujos paso a paso que tu asistente puede ejecutar:
169
+
170
+ | Prompt | Descripcion |
171
+ |--------|-------------|
172
+ | `enviar-campana` | Verificar saldo, enviar SMS y consultar estadisticas |
173
+ | `consultar-lealtad` | Listar tarjetas y consultar sellos de clientes |
174
+ | `gestionar-contactos` | Ver agendas, contactos y agregar nuevos |
175
+ | `verificar-numero` | Enviar codigo OTP y validarlo |
176
+
117
177
  ## Ejemplos
118
178
 
119
179
  Una vez configurado, puedes pedirle a tu asistente:
@@ -124,6 +184,9 @@ Una vez configurado, puedes pedirle a tu asistente:
124
184
  - "Como fue la entrega de la campana 12345?"
125
185
  - "Verifica el numero 5598765432 por WhatsApp"
126
186
  - "Agrega a Juan (5512345678) a mi agenda de recordatorios"
187
+ - "Muestrame mis tarjetas de lealtad"
188
+ - "Cuantos sellos tiene el cliente 5512345678?"
189
+ - "Agrega $50 al monedero del cliente 5598765432"
127
190
 
128
191
  ## Desarrollo
129
192
 
@@ -1,6 +1,8 @@
1
1
  export interface ApiClientConfig {
2
2
  apiKey: string;
3
3
  baseUrl?: string;
4
+ cfAccessClientId?: string;
5
+ cfAccessClientSecret?: string;
4
6
  timeout?: number;
5
7
  }
6
8
  export type ApiCall = <T>(endpoint: string, params?: Record<string, unknown>) => Promise<T>;
@@ -5,21 +5,26 @@ export function createApiClient(config) {
5
5
  const baseUrl = config.baseUrl ?? DEFAULT_BASE_URL;
6
6
  const timeout = config.timeout ?? DEFAULT_TIMEOUT;
7
7
  async function apiCall(endpoint, params) {
8
- return executeWithRetry(baseUrl, endpoint, config.apiKey, timeout, params);
8
+ return executeWithRetry(baseUrl, endpoint, config.apiKey, timeout, params, config.cfAccessClientId, config.cfAccessClientSecret);
9
9
  }
10
10
  return apiCall;
11
11
  }
12
- async function executeWithRetry(baseUrl, endpoint, apiKey, timeout, params, attempt = 1) {
12
+ async function executeWithRetry(baseUrl, endpoint, apiKey, timeout, params, cfAccessClientId, cfAccessClientSecret, attempt = 1) {
13
13
  const controller = new AbortController();
14
14
  const timer = setTimeout(() => controller.abort(), timeout);
15
15
  try {
16
+ const headers = {
17
+ "Content-Type": "application/json",
18
+ apikey: apiKey,
19
+ };
20
+ if (cfAccessClientId && cfAccessClientSecret) {
21
+ headers["CF-Access-Client-Id"] = cfAccessClientId;
22
+ headers["CF-Access-Client-Secret"] = cfAccessClientSecret;
23
+ }
16
24
  const response = await fetch(`${baseUrl}${endpoint}`, {
17
25
  method: "POST",
18
- headers: {
19
- "Content-Type": "application/json",
20
- apikey: apiKey,
21
- },
22
- body: JSON.stringify(params ?? {}),
26
+ headers,
27
+ body: JSON.stringify({ source: "mcp", ...params }),
23
28
  signal: controller.signal,
24
29
  });
25
30
  clearTimeout(timer);
@@ -30,7 +35,7 @@ async function executeWithRetry(baseUrl, endpoint, apiKey, timeout, params, atte
30
35
  if (attempt < 2) {
31
36
  const retryAfter = parseInt(response.headers.get("Retry-After") ?? "2", 10);
32
37
  await sleep(retryAfter * 1000);
33
- return executeWithRetry(baseUrl, endpoint, apiKey, timeout, params, attempt + 1);
38
+ return executeWithRetry(baseUrl, endpoint, apiKey, timeout, params, cfAccessClientId, cfAccessClientSecret, attempt + 1);
34
39
  }
35
40
  throw new RateLimitError();
36
41
  }
@@ -53,7 +58,7 @@ async function executeWithRetry(baseUrl, endpoint, apiKey, timeout, params, atte
53
58
  }
54
59
  if (error instanceof DOMException && error.name === "AbortError") {
55
60
  if (attempt < 2) {
56
- return executeWithRetry(baseUrl, endpoint, apiKey, timeout, params, attempt + 1);
61
+ return executeWithRetry(baseUrl, endpoint, apiKey, timeout, params, cfAccessClientId, cfAccessClientSecret, attempt + 1);
57
62
  }
58
63
  throw new TimeoutError();
59
64
  }
@@ -1 +1 @@
1
- {"version":3,"file":"api-client.js","sourceRoot":"","sources":["../src/api-client.ts"],"names":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C"}
@@ -0,0 +1,22 @@
1
+ export interface MetricsSnapshot {
2
+ toolCalls: Record<string, number>;
3
+ errorCounts: Record<string, number>;
4
+ avgLatency: Record<string, number>;
5
+ p95Latency: Record<string, number>;
6
+ sandboxCalls: number;
7
+ productionCalls: number;
8
+ uptimeSeconds: number;
9
+ }
10
+ export declare class MetricsCollector {
11
+ private toolCalls;
12
+ private errorCounts;
13
+ private latencies;
14
+ private sandboxCalls;
15
+ private productionCalls;
16
+ private startTime;
17
+ recordCall(toolName: string, latencyMs: number, isSandbox: boolean): void;
18
+ recordError(toolName: string, errorType: string): void;
19
+ getSnapshot(): MetricsSnapshot;
20
+ reset(): void;
21
+ }
22
+ export declare const metrics: MetricsCollector;
@@ -0,0 +1,55 @@
1
+ const MAX_LATENCIES = 1000;
2
+ export class MetricsCollector {
3
+ toolCalls = new Map();
4
+ errorCounts = new Map();
5
+ latencies = new Map();
6
+ sandboxCalls = 0;
7
+ productionCalls = 0;
8
+ startTime = Date.now();
9
+ recordCall(toolName, latencyMs, isSandbox) {
10
+ this.toolCalls.set(toolName, (this.toolCalls.get(toolName) ?? 0) + 1);
11
+ const arr = this.latencies.get(toolName) ?? [];
12
+ arr.push(latencyMs);
13
+ if (arr.length > MAX_LATENCIES)
14
+ arr.shift();
15
+ this.latencies.set(toolName, arr);
16
+ if (isSandbox)
17
+ this.sandboxCalls++;
18
+ else
19
+ this.productionCalls++;
20
+ }
21
+ recordError(toolName, errorType) {
22
+ const key = `${toolName}:${errorType}`;
23
+ this.errorCounts.set(key, (this.errorCounts.get(key) ?? 0) + 1);
24
+ }
25
+ getSnapshot() {
26
+ const avgLatency = {};
27
+ const p95Latency = {};
28
+ for (const [tool, arr] of this.latencies) {
29
+ if (arr.length === 0)
30
+ continue;
31
+ avgLatency[tool] = Math.round(arr.reduce((a, b) => a + b, 0) / arr.length);
32
+ const sorted = [...arr].sort((a, b) => a - b);
33
+ p95Latency[tool] = sorted[Math.floor(sorted.length * 0.95)] ?? sorted[sorted.length - 1];
34
+ }
35
+ return {
36
+ toolCalls: Object.fromEntries(this.toolCalls),
37
+ errorCounts: Object.fromEntries(this.errorCounts),
38
+ avgLatency,
39
+ p95Latency,
40
+ sandboxCalls: this.sandboxCalls,
41
+ productionCalls: this.productionCalls,
42
+ uptimeSeconds: Math.round((Date.now() - this.startTime) / 1000),
43
+ };
44
+ }
45
+ reset() {
46
+ this.toolCalls.clear();
47
+ this.errorCounts.clear();
48
+ this.latencies.clear();
49
+ this.sandboxCalls = 0;
50
+ this.productionCalls = 0;
51
+ this.startTime = Date.now();
52
+ }
53
+ }
54
+ export const metrics = new MetricsCollector();
55
+ //# sourceMappingURL=metrics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.js","sourceRoot":"","sources":["../src/metrics.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GAAG,IAAI,CAAC;AAY3B,MAAM,OAAO,gBAAgB;IACnB,SAAS,GAAG,IAAI,GAAG,EAAkB,CAAC;IACtC,WAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;IACxC,SAAS,GAAG,IAAI,GAAG,EAAoB,CAAC;IACxC,YAAY,GAAG,CAAC,CAAC;IACjB,eAAe,GAAG,CAAC,CAAC;IACpB,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE/B,UAAU,CAAC,QAAgB,EAAE,SAAiB,EAAE,SAAkB;QAChE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAEtE,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC/C,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACpB,IAAI,GAAG,CAAC,MAAM,GAAG,aAAa;YAAE,GAAG,CAAC,KAAK,EAAE,CAAC;QAC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,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC;YAC7C,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;YACjD,UAAU;YACV,UAAU;YACV,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;SAChE,CAAC;IACJ,CAAC;IAED,KAAK;QACH,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QACvB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QACvB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC9B,CAAC;CACF;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerAllPrompts(server: McpServer): void;
@@ -0,0 +1,59 @@
1
+ export function registerAllPrompts(server) {
2
+ server.registerPrompt("enviar-campana", {
3
+ title: "Enviar campaña SMS",
4
+ description: "Flujo guiado para enviar una campaña SMS: verificar saldo, enviar mensaje, consultar estadísticas.",
5
+ }, async () => ({
6
+ messages: [
7
+ {
8
+ role: "user",
9
+ content: {
10
+ type: "text",
11
+ text: "Quiero enviar una campaña SMS. Guíame paso a paso: primero verifica mi saldo con check_balance, luego ayúdame a redactar y enviar el mensaje con send_sms, y después consulta las estadísticas con get_campaign_stats.",
12
+ },
13
+ },
14
+ ],
15
+ }));
16
+ server.registerPrompt("consultar-lealtad", {
17
+ title: "Consultar programa de lealtad",
18
+ description: "Flujo guiado para consultar tarjetas de lealtad y datos de contactos.",
19
+ }, async () => ({
20
+ messages: [
21
+ {
22
+ role: "user",
23
+ content: {
24
+ type: "text",
25
+ text: "Quiero revisar mi programa de lealtad. Primero lista mis tarjetas con list_loyalty_cards, luego ayúdame a consultar los sellos de un cliente con get_loyalty_contact.",
26
+ },
27
+ },
28
+ ],
29
+ }));
30
+ server.registerPrompt("gestionar-contactos", {
31
+ title: "Gestionar contactos",
32
+ description: "Flujo guiado para ver agendas, consultar contactos y agregar nuevos.",
33
+ }, async () => ({
34
+ messages: [
35
+ {
36
+ role: "user",
37
+ content: {
38
+ type: "text",
39
+ text: "Quiero gestionar mis contactos. Primero muéstrame mis agendas con list_agendas, luego los contactos de una agenda con get_contacts, y ayúdame a agregar nuevos con add_contact si necesito.",
40
+ },
41
+ },
42
+ ],
43
+ }));
44
+ server.registerPrompt("verificar-numero", {
45
+ title: "Verificar número de teléfono",
46
+ description: "Flujo guiado para enviar un código OTP y verificar un número de teléfono.",
47
+ }, async () => ({
48
+ messages: [
49
+ {
50
+ role: "user",
51
+ content: {
52
+ type: "text",
53
+ text: "Quiero verificar un número de teléfono por SMS. Usa verify_phone para enviar el código OTP, y cuando me den el código usa check_verification para validarlo.",
54
+ },
55
+ },
56
+ ],
57
+ }));
58
+ }
59
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,kBAAkB,CAAC,MAAiB;IAClD,MAAM,CAAC,cAAc,CAAC,gBAAgB,EAAE;QACtC,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EAAE,oGAAoG;KAClH,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,wNAAwN;iBAC/N;aACF;SACF;KACF,CAAC,CAAC,CAAC;IAEJ,MAAM,CAAC,cAAc,CAAC,mBAAmB,EAAE;QACzC,KAAK,EAAE,+BAA+B;QACtC,WAAW,EAAE,uEAAuE;KACrF,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,uKAAuK;iBAC9K;aACF;SACF;KACF,CAAC,CAAC,CAAC;IAEJ,MAAM,CAAC,cAAc,CAAC,qBAAqB,EAAE;QAC3C,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,sEAAsE;KACpF,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,6LAA6L;iBACpM;aACF;SACF;KACF,CAAC,CAAC,CAAC;IAEJ,MAAM,CAAC,cAAc,CAAC,kBAAkB,EAAE;QACxC,KAAK,EAAE,8BAA8B;QACrC,WAAW,EAAE,2EAA2E;KACzF,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,8JAA8J;iBACrK;aACF;SACF;KACF,CAAC,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerFaqResources(server: McpServer): void;
@@ -0,0 +1,173 @@
1
+ const FAQ_ENTRIES = {
2
+ "getting-started": {
3
+ title: "Primeros pasos",
4
+ description: "Cómo obtener tu API key y configurar el MCP server",
5
+ content: `# Primeros pasos con SMS Masivos MCP
6
+
7
+ ## Obtener tu API key
8
+
9
+ 1. Inicia sesión en [smsmasivos.com.mx](https://smsmasivos.com.mx)
10
+ 2. Ve a **Configuración** → **API**
11
+ 3. Copia tu API key
12
+
13
+ ## Configurar en Claude Desktop
14
+
15
+ Agrega esto a tu archivo de configuración de Claude Desktop (\`claude_desktop_config.json\`):
16
+
17
+ \`\`\`json
18
+ {
19
+ "mcpServers": {
20
+ "smsmasivos": {
21
+ "command": "npx",
22
+ "args": ["-y", "@smsmasivos/mcp-server"],
23
+ "env": {
24
+ "SMSMASIVOS_API_KEY": "tu-api-key-aquí"
25
+ }
26
+ }
27
+ }
28
+ }
29
+ \`\`\`
30
+
31
+ ## Verificar conexión
32
+
33
+ Pregunta a Claude: "¿Cuántos créditos SMS tengo?" — si responde con tu saldo, todo está configurado.
34
+ `,
35
+ },
36
+ "common-errors": {
37
+ title: "Errores comunes",
38
+ description: "Soluciones a los errores más frecuentes",
39
+ content: `# Errores comunes
40
+
41
+ ## AuthError — API key inválida o no proporcionada
42
+ - Verifica que \`SMSMASIVOS_API_KEY\` esté configurada correctamente
43
+ - Asegúrate de que la API key esté activa en tu panel
44
+
45
+ ## RateLimitError — Demasiadas solicitudes
46
+ - La API tiene límites de velocidad por Cloudflare
47
+ - El MCP reintenta automáticamente una vez con el header Retry-After
48
+ - Si persiste, espera unos segundos entre operaciones
49
+
50
+ ## NetworkError — Error de conexión
51
+ - Verifica tu conexión a internet
52
+ - El servidor puede estar en mantenimiento temporal
53
+ - El MCP reintenta automáticamente en caso de timeout
54
+
55
+ ## "Créditos insuficientes"
56
+ - Usa \`check_balance\` para verificar tu saldo
57
+ - Recarga créditos en smsmasivos.com.mx → Créditos
58
+
59
+ ## "Número inválido"
60
+ - Los números deben tener 10 dígitos (sin código de país)
61
+ - No incluyas el prefijo +52
62
+ - Ejemplo correcto: \`5512345678\`
63
+ `,
64
+ },
65
+ "limits-and-pricing": {
66
+ title: "Límites y créditos",
67
+ description: "Información sobre créditos, límites por request y rate limiting",
68
+ content: `# Límites y créditos
69
+
70
+ ## Créditos
71
+ - Cada SMS consume **1 crédito**
72
+ - Consulta tu saldo con \`check_balance\`
73
+ - Los envíos en modo sandbox (\`sandbox='1'\`) **no consumen créditos**
74
+
75
+ ## Límites por request
76
+ - **Máximo 500 números** por llamada a \`send_sms\`
77
+ - Para envíos masivos mayores, divide en lotes de 500
78
+
79
+ ## Rate limiting
80
+ - La API está protegida por Cloudflare
81
+ - Límite general: ~60 requests por minuto
82
+ - El MCP maneja reintentos automáticamente
83
+
84
+ ## Verificación OTP
85
+ - Cada verificación consume **1 crédito**
86
+ - Los códigos expiran por defecto en 10 minutos
87
+ `,
88
+ },
89
+ "sandbox-mode": {
90
+ title: "Modo sandbox",
91
+ description: "Cómo usar el modo sandbox para pruebas sin envío real",
92
+ content: `# Modo sandbox
93
+
94
+ El modo sandbox permite probar el flujo completo sin enviar mensajes reales ni consumir créditos.
95
+
96
+ ## Cómo activar
97
+ - En \`send_sms\`: usa \`sandbox='1'\`
98
+ - En \`list_campaigns\`: usa \`sandbox='1'\` para ver campañas de prueba
99
+ - En \`get_campaign_stats\`: usa \`sandbox='1'\` si la campaña fue de sandbox
100
+
101
+ ## Comportamiento
102
+ - El SMS **no se envía** realmente
103
+ - **No se consumen créditos**
104
+ - Se genera un ID de campaña válido
105
+ - Las estadísticas muestran "en proceso" brevemente y luego datos simulados
106
+
107
+ ## Cuándo usar
108
+ - Pruebas de integración
109
+ - Validar flujos antes de envíos reales
110
+ - Desarrollo y debugging
111
+ `,
112
+ },
113
+ "tool-examples": {
114
+ title: "Ejemplos de uso",
115
+ description: "Ejemplos prácticos de cada tool disponible",
116
+ content: `# Ejemplos de uso
117
+
118
+ ## Consultar saldo
119
+ > "¿Cuántos créditos tengo?"
120
+ → Usa \`check_balance\`
121
+
122
+ ## Enviar SMS
123
+ > "Envía 'Hola mundo' al 5512345678"
124
+ → Usa \`send_sms\` con numbers y message
125
+
126
+ ## SMS programado
127
+ > "Programa un SMS para mañana a las 10am"
128
+ → Usa \`send_sms\` con el parámetro date
129
+
130
+ ## SMS en sandbox
131
+ > "Envía un mensaje de prueba sin enviar realmente"
132
+ → Usa \`send_sms\` con sandbox='1'
133
+
134
+ ## Ver campañas
135
+ > "¿Cuáles son mis últimas campañas?"
136
+ → Usa \`list_campaigns\`
137
+
138
+ ## Estadísticas de campaña
139
+ > "¿Cómo fue la entrega de la campaña 12345?"
140
+ → Usa \`get_campaign_stats\` con el campaign_id
141
+
142
+ ## Gestionar agendas
143
+ > "¿Qué agendas tengo?"
144
+ → Usa \`list_agendas\`, luego \`get_contacts\` con el list_key
145
+
146
+ ## Verificación OTP
147
+ > "Verifica el número 5512345678"
148
+ → Usa \`verify_phone\`, luego \`check_verification\` con el código
149
+
150
+ ## Lealtad
151
+ > "¿Cuántos sellos tiene el cliente 5512345678?"
152
+ → Usa \`list_loyalty_cards\` para obtener el key, luego \`get_loyalty_contact\`
153
+
154
+ ## Monedero
155
+ > "¿Cuál es el saldo del cliente en mi monedero?"
156
+ → Usa \`list_wallets\` para obtener el key, luego \`get_wallet_contact\`
157
+ `,
158
+ },
159
+ };
160
+ export function registerFaqResources(server) {
161
+ for (const [key, entry] of Object.entries(FAQ_ENTRIES)) {
162
+ server.registerResource(entry.title, `smsmasivos://faq/${key}`, { description: entry.description, mimeType: "text/markdown" }, () => ({
163
+ contents: [
164
+ {
165
+ uri: `smsmasivos://faq/${key}`,
166
+ text: entry.content,
167
+ mimeType: "text/markdown",
168
+ },
169
+ ],
170
+ }));
171
+ }
172
+ }
173
+ //# sourceMappingURL=faq.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"faq.js","sourceRoot":"","sources":["../../src/resources/faq.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAA4E;IAC3F,iBAAiB,EAAE;QACjB,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,oDAAoD;QACjE,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BZ;KACE;IACD,eAAe,EAAE;QACf,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,yCAAyC;QACtD,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;CAwBZ;KACE;IACD,oBAAoB,EAAE;QACpB,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EAAE,iEAAiE;QAC9E,OAAO,EAAE;;;;;;;;;;;;;;;;;;;CAmBZ;KACE;IACD,cAAc,EAAE;QACd,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,uDAAuD;QACpE,OAAO,EAAE;;;;;;;;;;;;;;;;;;;CAmBZ;KACE;IACD,eAAe,EAAE;QACf,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,4CAA4C;QACzD,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCZ;KACE;CACF,CAAC;AAEF,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IACpD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QACvD,MAAM,CAAC,gBAAgB,CACrB,KAAK,CAAC,KAAK,EACX,oBAAoB,GAAG,EAAE,EACzB,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,QAAQ,EAAE,eAAe,EAAE,EAC7D,GAAG,EAAE,CAAC,CAAC;YACL,QAAQ,EAAE;gBACR;oBACE,GAAG,EAAE,oBAAoB,GAAG,EAAE;oBAC9B,IAAI,EAAE,KAAK,CAAC,OAAO;oBACnB,QAAQ,EAAE,eAAe;iBAC1B;aACF;SACF,CAAC,CACH,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerAllResources(server: McpServer): void;
@@ -0,0 +1,5 @@
1
+ import { registerFaqResources } from "./faq.js";
2
+ export function registerAllResources(server) {
3
+ registerFaqResources(server);
4
+ }
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IACpD,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
package/dist/schemas.d.ts CHANGED
@@ -83,6 +83,7 @@ export declare const getCampaignStatsInput: z.ZodObject<{
83
83
  export declare const verifyPhoneInput: z.ZodObject<{
84
84
  phone_number: z.ZodString;
85
85
  country_code: z.ZodDefault<z.ZodString>;
86
+ company: z.ZodString;
86
87
  code_type: z.ZodOptional<z.ZodEnum<["numeric", "alphanumeric"]>>;
87
88
  expiration_date: z.ZodOptional<z.ZodString>;
88
89
  voice: z.ZodOptional<z.ZodEnum<["0", "1"]>>;
@@ -90,12 +91,14 @@ export declare const verifyPhoneInput: z.ZodObject<{
90
91
  }, "strip", z.ZodTypeAny, {
91
92
  country_code: string;
92
93
  phone_number: string;
94
+ company: string;
93
95
  code_type?: "numeric" | "alphanumeric" | undefined;
94
96
  expiration_date?: string | undefined;
95
97
  voice?: "0" | "1" | undefined;
96
98
  whatsapp?: "0" | "1" | undefined;
97
99
  }, {
98
100
  phone_number: string;
101
+ company: string;
99
102
  country_code?: string | undefined;
100
103
  code_type?: "numeric" | "alphanumeric" | undefined;
101
104
  expiration_date?: string | undefined;
@@ -131,3 +134,99 @@ export declare const checkVerificationInput: z.ZodObject<{
131
134
  verification_code: string;
132
135
  country_code?: string | undefined;
133
136
  }>;
137
+ export declare const deleteContactInput: z.ZodObject<{
138
+ list_key: z.ZodString;
139
+ number: z.ZodString;
140
+ email: z.ZodOptional<z.ZodString>;
141
+ }, "strip", z.ZodTypeAny, {
142
+ number: string;
143
+ list_key: string;
144
+ email?: string | undefined;
145
+ }, {
146
+ number: string;
147
+ list_key: string;
148
+ email?: string | undefined;
149
+ }>;
150
+ export declare const listLoyaltyCardsInput: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
151
+ export declare const addLoyaltyContactInput: z.ZodObject<{
152
+ loyalty_key: z.ZodString;
153
+ phone: z.ZodString;
154
+ customer_name: z.ZodOptional<z.ZodString>;
155
+ }, "strip", z.ZodTypeAny, {
156
+ loyalty_key: string;
157
+ phone: string;
158
+ customer_name?: string | undefined;
159
+ }, {
160
+ loyalty_key: string;
161
+ phone: string;
162
+ customer_name?: string | undefined;
163
+ }>;
164
+ export declare const getLoyaltyContactInput: z.ZodObject<{
165
+ loyalty_key: z.ZodString;
166
+ phone: z.ZodOptional<z.ZodString>;
167
+ }, "strip", z.ZodTypeAny, {
168
+ loyalty_key: string;
169
+ phone?: string | undefined;
170
+ }, {
171
+ loyalty_key: string;
172
+ phone?: string | undefined;
173
+ }>;
174
+ export declare const registerLoyaltySaleInput: z.ZodObject<{
175
+ loyalty_key: z.ZodString;
176
+ phone: z.ZodString;
177
+ stamps_quantity: z.ZodNumber;
178
+ }, "strip", z.ZodTypeAny, {
179
+ loyalty_key: string;
180
+ phone: string;
181
+ stamps_quantity: number;
182
+ }, {
183
+ loyalty_key: string;
184
+ phone: string;
185
+ stamps_quantity: number;
186
+ }>;
187
+ export declare const listWalletsInput: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
188
+ export declare const addWalletContactInput: z.ZodObject<{
189
+ wallet_key: z.ZodString;
190
+ phone: z.ZodString;
191
+ customer_name: z.ZodString;
192
+ usertool_id: z.ZodNumber;
193
+ }, "strip", z.ZodTypeAny, {
194
+ phone: string;
195
+ customer_name: string;
196
+ wallet_key: string;
197
+ usertool_id: number;
198
+ }, {
199
+ phone: string;
200
+ customer_name: string;
201
+ wallet_key: string;
202
+ usertool_id: number;
203
+ }>;
204
+ export declare const getWalletContactInput: z.ZodObject<{
205
+ wallet_key: z.ZodString;
206
+ phone: z.ZodOptional<z.ZodString>;
207
+ }, "strip", z.ZodTypeAny, {
208
+ wallet_key: string;
209
+ phone?: string | undefined;
210
+ }, {
211
+ wallet_key: string;
212
+ phone?: string | undefined;
213
+ }>;
214
+ export declare const updateWalletBalanceInput: z.ZodObject<{
215
+ wallet_key: z.ZodString;
216
+ phone: z.ZodString;
217
+ transaction_type: z.ZodEnum<["1", "2"]>;
218
+ transaction_amount: z.ZodNumber;
219
+ usertool_id: z.ZodNumber;
220
+ }, "strip", z.ZodTypeAny, {
221
+ phone: string;
222
+ wallet_key: string;
223
+ usertool_id: number;
224
+ transaction_type: "2" | "1";
225
+ transaction_amount: number;
226
+ }, {
227
+ phone: string;
228
+ wallet_key: string;
229
+ usertool_id: number;
230
+ transaction_type: "2" | "1";
231
+ transaction_amount: number;
232
+ }>;