chapin-mcp
Generates WhatsApp click-to-chat links via wa.me from Guatemalan phone numbers, normalizing +502 mobile and landline formats and optionally including a prefilled message.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@chapin-mcp Validá el NIT 576937-K y decime si es correcto"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
chapin-mcp 🇬🇹
Servidor MCP + librería TypeScript con utilidades de Guatemala para agentes de IA. Conectalo a Cursor, Claude, Grok Bot o cualquier cliente MCP y tu agente podrá validar NITs y DPIs, desglosar el IVA, escribir montos en letras para facturas y armar enlaces de WhatsApp con +502, sin inventarse nada.
English version below.
¿Por qué?
Los LLMs se equivocan con cosas muy chapinas: calculan mal el dígito verificador del NIT, no saben que el CUI trae el departamento y municipio, o escriben "veintiuno quetzales". chapin-mcp le da al agente herramientas deterministas y probadas para esas tareas.
Related MCP server: mcp-el-salvador-dte
Herramientas MCP
Herramienta | Qué hace | Ejemplo |
| Valida un NIT de la SAT (módulo 11, verificador |
|
| Valida el CUI del DPI (RENAP): verificador, departamento y municipio |
|
| Desglosa o agrega IVA (12% por defecto) |
|
| Monto en letras estilo factura/cheque |
|
| Normaliza teléfonos +502, móvil/fijo, enlace |
|
| Los 22 departamentos: código, cabecera y nº de municipios |
|
Instalación en Cursor
Agregá esto a .cursor/mcp.json (en tu proyecto) o a ~/.cursor/mcp.json (global):
{
"mcpServers": {
"chapin": {
"command": "npx",
"args": ["-y", "github:folgmateo/chapin-mcp"]
}
}
}Luego pedile al agente cosas como:
"Validá estos NITs de clientes y decime cuáles están malos"
"Generá el texto de la factura por Q3,599.99 con el monto en letras"
"Armame los botones de WhatsApp para estos teléfonos de la barbería"
Claude Desktop / otros clientes MCP
Mismo bloque mcpServers en el archivo de configuración del cliente. También podés correrlo directo:
npx -y github:folgmateo/chapin-mcp # servidor MCP por stdioUso como librería
npm install github:folgmateo/chapin-mcpimport { validarNit, validarCui, desglosarIva, montoEnLetras, enlaceWhatsApp } from "chapin-mcp";
validarNit("576937-K").valido; // true
validarCui("1234567890101").departamento?.nombre; // "Guatemala"
desglosarIva(112); // { base: 100, iva: 12, total: 112, tasa: 0.12 }
montoEnLetras(21); // "VEINTIÚN QUETZALES CON 00/100"
enlaceWhatsApp("5555-1234", "Hola!"); // "https://wa.me/50255551234?text=Hola!"Desarrollo
npm install
npm test # compila con tsc y corre los tests (node:test), incluida una prueba MCP de punta a punta
npm start # levanta el servidor por stdioNotas
Las validaciones son matemáticas/de formato: confirman que un NIT o CUI puede existir, no que esté registrado en la SAT o el RENAP.
Códigos de departamento y conteo de municipios (340 en total) según la división político-administrativa vigente.
¿Encontraste un caso raro? ¡Abrí un issue o PR!
English
MCP server + TypeScript library with Guatemala-specific utilities for AI agents. Plug it into Cursor, Claude, Grok Bot or any MCP client so your agent can validate Guatemalan tax IDs (NIT) and national IDs (DPI/CUI), split 12% VAT (IVA), write amounts in Spanish words for invoices and checks, normalize +502 phone numbers into WhatsApp links, and look up the 22 departments.
Tools: validar_nit, validar_cui, calcular_iva, monto_en_letras, telefono_whatsapp, departamentos.
Cursor setup (.cursor/mcp.json):
{ "mcpServers": { "chapin": { "command": "npx", "args": ["-y", "github:folgmateo/chapin-mcp"] } } }As a library: npm install github:folgmateo/chapin-mcp, then import { validarNit } from "chapin-mcp".
Validation is checksum/format-based only; it does not query SAT or RENAP. Tested on Node 20, 22 and 24.
Licencia / License
MIT © 2026 Mateo Folgar
Available Tools
6 toolscalcular_ivaCalcular IVA (12%)A
Desglosa el IVA de un precio que ya lo incluye, o lo agrega a un monto base. Tasa por defecto: 12% (Guatemala).
Inputs: monto (required), tasa, incluyeIva.
departamentosDepartamentos de GuatemalaA
Lista los 22 departamentos de Guatemala (código, cabecera, número de municipios) o busca uno por código o nombre.
Inputs: buscar.
monto_en_letrasMonto en letrasA
Convierte un monto en quetzales a letras, como en facturas y cheques: 1250.5 → 'MIL DOSCIENTOS CINCUENTA QUETZALES CON 50/100'.
Inputs: monto (required), estilo.
telefono_whatsappTeléfono y enlace de WhatsAppA
Normaliza un teléfono de Guatemala (+502), indica si es móvil o fijo y genera un enlace wa.me con mensaje opcional.
Inputs: telefono (required), mensaje.
validar_cuiValidar CUI / DPIB
Valida el CUI de 13 dígitos del DPI guatemalteco (RENAP): dígito verificador, departamento y municipio.
Inputs: cui (required).
validar_nitValidar NITA
Valida un NIT de Guatemala (SAT) con su dígito verificador módulo 11. Acepta guiones/espacios y 'CF' (Consumidor Final).
Inputs: nit (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a clearly distinct operation: two validators (NIT vs CUI), a geography lister, an IVA calculator, a number-to-words converter, and a phone normalizer. Even the two 'validar_*' tools are unambiguous because the identifier types (NIT/CF vs 13-digit CUI) are explicitly named.
Half the set follows a verb_noun pattern (validar_nit, validar_cui, calcular_iva), but the rest are bare nouns or noun phrases (departamentos, monto_en_letras, telefono_whatsapp). The convention is mixed even though all names are lowercase snake_case and readable.
Six tools is well-scoped for a Guatemala-specific formatting/validation utility server; each tool earns its place and there is no filler. No obvious consolidation or splitting is needed.
The core local-domain utilities (NIT, CUI, departamentos, IVA, letras, teléfono) form a coherent surface with no dead ends, since validators return useful detail like department/municipio. Minor gaps exist: no standalone municipio lookup, no NIT/CUI generation or reverse parsing (e.g. birth date from CUI), and no other common invoice helpers (e.g. retención/IVA split rates).
Maintenance
Related MCP Connectors
Validate/decode LATAM tax & bank IDs (MX, AR, CL, CO, PE, UY, BR) + FX, pay-per-call x402 USDC.
Argentina CUIT/CUIL validation and AFIP fiscal QR generation. Pure, no-auth MCP tools.
15 deterministic validation tools for AI agents: tax IDs (15 countries), VAT, IBAN, LEI, HS codes.
500+ deterministic tools for AI agents: math, conversion, validation, hashing, encoding, date/time.
Related MCP Servers
- AlicenseAqualityDmaintenanceLatin American business compliance suite — 28 tools for tax ID validation (CPF, CNPJ, RFC, RUT, CUIT, NIT), banking (PIX, CLABE, CBU), VAT rules, e-invoicing (NF-e, CFDI, DTE), holidays, and labor calendar across Brazil, Mexico, Chile, Argentina, and Colombia.28MIT
- AlicenseAqualityDmaintenanceProvides tools for El Salvador electronic invoicing (DTE), including IVA calculation, document-type catalog, and DUI/NIT validation.41MIT
- AlicenseNot gradedqualityCmaintenanceValidates LatAm banking and tax IDs (Mexican CLABE, Brazilian CNPJ/CPF checksums) and performs BrasilAPI company, CEP, and bank lookups, enabling AI agents to verify financial and tax information in Latin America.52 npmMIT
- AlicenseAqualityBmaintenanceEnables AI agents to validate Mexican RFC, CURP, CLABE and NSS identifiers with real check digits, parse CFDI 4.0 invoices with labelled SAT catalogue codes and verified totals, and query the SAT's public status service to see whether an invoice is still valid. It also generates coherent test people and companies, all read-only and without API keys, certificates or PAC contracts.9342 npm1MIT