sunat-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SUNAT_MCP_DB | No | Path to the SQLite index file. Default is data/padron.sqlite3 in the server directory. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| validar_rucA | Valida la estructura de un RUC peruano: 11 digitos, prefijo vigente y digito verificador segun el algoritmo modulo 11 de SUNAT. Es una comprobacion aritmetica y offline: NO consulta ninguna base de datos.
Un RUC valido aqui puede aun asi no existir en SUNAT o estar de baja; para
eso usa |
| consultar_rucA | Consulta un RUC en el Padron Reducido local: razon social, estado del contribuyente, condicion de domicilio, ubigeo y direccion fiscal. Requiere haber construido el indice con |
| buscar_razon_socialA | Busca contribuyentes cuya razon social coincida con Por defecto busca por PREFIJO, resuelto como un rango sobre el indice (milisegundos). Para buscar por subcadena antepone '%' al texto (p. ej. '%ANDES'), pero eso recorre los ~18 millones de registros y puede tardar decenas de segundos. La comparacion ignora mayusculas y minusculas. |
| estado_padronA | Devuelve la procedencia del indice local: URL de origen, checksum SHA-256 del ZIP, fecha de publicacion de SUNAT, fecha de ingesta y numero de registros. Sirve para saber que tan actualizado esta el dato antes de confiar en el. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 4 tools
Each tool targets a distinct operation: structural validation, database query, name search, and data freshness check. There is no overlap or ambiguity.
All tool names use lower_snake_case and follow a clear verb_noun pattern (e.g., validar_ruc, consultar_ruc). The only exception is estado_padron, but it remains intuitive and consistent in style.
With 4 tools covering the core workflows of RUC validation, query, name search, and data status, the count is well-scoped and each tool earns its place.
The tool set covers the primary use cases for an offline RUC service. A minor gap is the lack of a tool to update the local index programmatically, but the ingest script is documented separately.