io.github.ilopezluna/factura-luz

Official registry Productivity

Lee y explica facturas de la luz españolas (QR de la CNMC). Todo en local.

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

NPM package factura-luz-mcp
Claude Code
claude mcp add factura-luz -- npx -y factura-luz-mcp@0.1.0
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "factura-luz": {
            "command": "npx",
            "args": [
                "-y",
                "factura-luz-mcp@0.1.0"
            ]
        }
    }
}

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. Entiende tu factura
  2. Stack
  3. Requisitos
  4. Desarrollo
  5. Scripts
  6. Estructura
  7. Despliegue

Entiende tu factura

Aplicación 100% cliente (sin backend) que explica tu factura de la luz. Sube tu factura (PDF o imagen), el navegador lee el código QR de la CNMC y te muestra un desglose claro de lo que estás pagando: potencia, energía, impuestos y contrato.

👉 Pruébala en vivo: entiende-tu-factura.com

Privacidad: todo el procesamiento ocurre en tu navegador. Tu factura nunca se envía a ningún servidor.

Stack

  • React 19 + Vite + TypeScript
  • Tailwind CSS v4
  • Extracción de QR/PDF con jsqr + pdfjs-dist
  • Tests con Vitest

Requisitos

  • Node.js (ver .nvmrc → 22.20.0)

Desarrollo

npm install
npm run dev        # http://localhost:5173

Scripts

ScriptDescripción
npm run devServidor de desarrollo (Vite)
npm run buildTypecheck + build de producción a dist/
npm run previewSirve el build de producción
npm testTests (Vitest)
npm run typecheckComprobación de tipos sin emitir
npm run formatFormatea con Prettier
npm run validateformat:check + typecheck + test

Estructura

src/
├── lib/cnmc/          # Extracción y cálculo (lógica CNMC propia)
│   ├── extraction/    # scan/pdf (agnósticos) + extractor (navegador) + validadores
│   ├── parsing/       # parseo de parámetros del QR
│   ├── types/         # QrParameters + enums
│   ├── content/       # vocabulario y explicaciones en español
│   ├── format/        # formateo de números en es-ES
│   ├── utils/         # cálculo de costes y análisis de potencia
│   └── __tests__/     # tests de lógica pura
├── styles/            # Tailwind v4 + design tokens
├── App.tsx
└── main.tsx

Solo extraction/extractor.ts depende del navegador; extraction/scan.ts y extraction/pdf.ts no tocan el DOM.

Despliegue

Push a main despliega automáticamente a GitHub Pages (.github/workflows/deploy.yml), disponible en **https://entiende-tu-factura.com**. El base de Vite es relativo (./), por lo que funciona tanto en usuario.github.io/<repo>/ como en un dominio propio.

Frequently asked questions

What is io.github.ilopezluna/factura-luz?

Lee y explica facturas de la luz españolas (QR de la CNMC). Todo en local.

How do I install io.github.ilopezluna/factura-luz?

It runs on your machine. In Claude Code: claude mcp add factura-luz -- npx -y factura-luz-mcp@0.1.0. For other clients, paste the JSON configuration from this page into their MCP settings.

Does io.github.ilopezluna/factura-luz need an API key?

Its registry entry lists no required key or secret. Some features may still need an account with the service it connects to.

Is io.github.ilopezluna/factura-luz open source?

Yes. Its code is on GitHub under the Apache-2.0 license.

Who maintains io.github.ilopezluna/factura-luz?

It is published by ilopezluna. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.