Skip to main content
ClaudeWave
square-al avatar
square-al

fiskalizimi-utils

Ver en GitHub

Albanian tax utilities for TypeScript and Python: NIPT/NUIS validation, TVSH (VAT) math, fiscal invoice totals (Law 87/2019) and 2026 payroll/profit-tax calculations. Zero dependencies, plus a CLI.

MCP ServersRegistry oficial0 estrellas0 forksPythonMITActualizado today
ClaudeWave Trust Score
95/100
Verified
Passed
  • Open-source license (MIT)
  • Actively maintained (<30d)
  • Clear description
  • Topics declared
  • Documented (README)
Last scanned: 8/21/2026
Install in Claude Code / Claude Desktop
Method: NPX · tsx
Claude Code CLI
claude mcp add fiskalizimi-utils -- npx -y tsx
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "fiskalizimi-utils": {
      "command": "npx",
      "args": ["-y", "tsx"]
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
Casos de uso

Resumen de MCP Servers

# fiskalizimi-utils

Zero-dependency utilities for **Albanian fiscalization** (Law 87/2019 "On the invoice and the circulation monitoring system") **and payroll**: NIPT/NUIS validation, TVSH (VAT) math, fiscal invoice totals with the per-rate VAT breakdown every fiscalized invoice must report, and gross↔net salary / profit-tax math over a verified, dated rates config. Also available as an **MCP server** for AI agents.

Built and maintained by [Square Software](https://square.al), a software company in Tirana that ships [fiscalization integrations](https://square.al/fiscalization-api) for POS, ERP and e-commerce systems. These are the same pure functions that power our free online tools:

- [Verifikues NIPT / NUIS](https://square.al/sq/llogarites/nipt)
- [Llogaritësi i TVSH-së](https://square.al/sq/llogarites/tvsh)
- [Llogaritësi i faturës / fiskalizimit](https://square.al/sq/llogarites/fiskalizimi)

📖 **Full documentation: [fiskalizimi-utils.readthedocs.io](https://fiskalizimi-utils.readthedocs.io)**

## Install

| Where | Install | Contents |
| --- | --- | --- |
| [npm](https://www.npmjs.com/package/fiskalizimi-utils) | `npm install fiskalizimi-utils` | NIPT, TVSH, invoice totals, payroll, profit tax (ESM + types) |
| [JSR](https://jsr.io/@square-al/fiskalizimi-utils) | `deno add jsr:@square-al/fiskalizimi-utils` | same, TypeScript source |
| [PyPI](https://pypi.org/project/fiskalizimi-utils/) | `pip install fiskalizimi-utils` | the above **+ severance, annual leave** |
| MCP | `al.square/fiskalizimi` in the [MCP registry](https://registry.modelcontextprotocol.io) · `.mcpb` on [Releases](https://github.com/square-al/fiskalizimi-utils/releases) | every calculator as a tool for AI agents — see [mcp/](mcp/) |
| Docker | `docker run --rm squaresoftware/fiskalizimi --help` | the CLI, no runtime to install |

```bash
npm install fiskalizimi-utils
# or straight from GitHub:
npm install github:square-al/fiskalizimi-utils
```

## Usage

### Validate a NIPT / NUIS

```ts
import { validateNipt } from 'fiskalizimi-utils'

const res = validateNipt(' m5 1418-039h ') // separators + case are normalized
res.valid       // true
res.normalized  // 'M51418039H'
res.parts       // { prefix: 'M', digits: '51418039', checkLetter: 'H' }

validateNipt('M5141803OH')
// { valid: false, issues: ['digits-not-numeric'], likelyTypo: true }  ← O vs 0
```

Format-level validation only (letter A–M + 8 digits + control letter). A well-formed NIPT is not necessarily registered — check existence in the official registry (QKB), e.g. `https://opencorporates.al/sq/nipt/m51418039h`.

### TVSH (VAT) math

```ts
import { addVat, extractVat, ALBANIA_VAT, KOSOVO_VAT } from 'fiskalizimi-utils'

addVat(1000, ALBANIA_VAT.standard)   // { net: 1000, vat: 200, gross: 1200, rate: 0.2 }
extractVat(1180, KOSOVO_VAT.standard) // net 1000, vat 180 — Kosovo 18%
```

### Fiscal invoice totals

```ts
import { invoiceTotals } from 'fiskalizimi-utils'

const t = invoiceTotals([
  { description: 'Service A', quantity: 2, unitPrice: 500, vatRate: 0.2 },
  { description: 'Book', quantity: 1, unitPrice: 800, vatRate: 0.06, discountRate: 0.1 },
])
t.subtotal  // net total
t.totalVat  // VAT total
t.vatByRate // [{ rate: 0.2, base: 1000, vat: 200 }, { rate: 0.06, base: 720, vat: 43.2 }]
```

`vatByRate` is the per-rate base/VAT table a fiscalized invoice reports.

### Payroll — gross ↔ net (Albania 2026)

```ts
import { grossToNet, netToGross, profitTax, AL_2026 } from 'fiskalizimi-utils'

const b = grossToNet(100_000, AL_2026.salary)
b.empSocial     // 9500     (9.5%)
b.empHealth     // 1700     (1.7%)
b.incomeTax     // 5044     (progressive 0 / 13 / 23%)
b.net           // 83756
b.employerCost  // 116700   (gross + employer 15% + 1.7%)

netToGross(83_756, AL_2026.salary)          // ≈ 100000
profitTax(20_000_000, AL_2026.profitTax).tax // 900000  (0% to 14M, 15% above)
```

Every number comes from `AL_2026` — a dated config verified against tatime.gov.al on 2026-06-29 — and none are hard-coded in the functions. Read `AL_2026.notes` for the disclosed approximation in the 50,000–60,000 ALL/month band.

## MCP server

`mcp/` wraps all of the above as an [MCP](https://modelcontextprotocol.io) server (`al.square/fiskalizimi`) so AI agents can validate a NIPT, total an invoice or compute a net salary without a network call: `validate_nipt`, `add_vat`, `extract_vat`, `invoice_totals`, `net_salary`, `gross_salary_from_net`, `profit_tax`, `tax_rates`. Claude Desktop users install the `.mcpb` from the [latest release](https://github.com/square-al/fiskalizimi-utils/releases); any stdio client can run `node mcp/dist/main.js`. Details in [mcp/README.md](mcp/README.md).

## Python

The Python package is a faithful port with the payroll calculators added, and it
carries the dated rates config the [square.al calculators](https://square.al/sq/llogarites)
read:

```python
from fiskalizimi_utils import AL_2026, gross_to_net, validate_nipt, add_vat

validate_nipt("m5141 8039h").normalized    # 'M51418039H'
add_vat(1000, 0.20).gross                  # 1200.0

b = gross_to_net(100_000, AL_2026.salary)
b.net             #  83756.0
b.employer_cost   # 116700.0
```

A parity test suite generates fixtures from this TypeScript source and asserts
the Python implementation against them — down to the half-up rounding JavaScript
does and Python does not — so the two packages cannot silently diverge.
Regenerate the fixtures with `npx tsx scripts/gen-parity-fixture.mjs`.

## Command line

```console
$ fiskalizimi nipt M51418039H     # pip install fiskalizimi-utils
$ fiskalizimi paga 100000 --json
$ fiskalizimi tvsh 1200 --extract
$ docker run --rm squaresoftware/fiskalizimi rates
```

Every subcommand takes `--json`. `nipt` exits non-zero on a bad format, so it
composes in shell scripts.

## Open data

[`dataset/`](dataset/) publishes the same figures as a
[Frictionless](https://frictionlessdata.io) data package under CC-BY-4.0:
income-tax and profit-tax bands, contribution rates and their base window, VAT
rates, the minimum wage, and the filing deadlines — one row per band, rates as
decimal fractions. It is generated from the library
(`cd dataset && PYTHONPATH=../python/src python3 generate.py`), so the data and
the code cannot drift apart.

## Shqip

Mjete TypeScript pa varësi për fiskalizimin shqiptar: verifikim i formatit të **NIPT/NUIS**, llogaritje **TVSH-je** (shto/hiq nga një vlerë) dhe **totalet e faturës** me TVSH-në e ndarë sipas normës — ashtu siç e raporton një faturë e fiskalizuar. I njëjti kod që fuqizon [llogaritësit tanë falas](https://square.al/sq/llogarites). Për integrime fiskalizimi në sistemet tuaja, shihni [square.al](https://square.al/sq/program-fiskalizimi).

## Accuracy

The `AL-2026` rates config was confirmed against
[tatime.gov.al](https://www.tatime.gov.al) on 2026-06-29 and carries
`verified = true`. Two limitations are disclosed in the config's own `notes`
field: the personal-income-tax bracket model is a deliberate approximation of the
official schedule inside the ~50,000–60,000 ALL/month transitional band, and the
severance figures are *orientues* values from the Labor Code's general
principles rather than a statutory table. See
[Accuracy & limitations](https://fiskalizimi-utils.readthedocs.io/en/latest/accuracy/).

Rates and rules change; confirm with the tax authority before invoicing. Nothing
here is tax or legal advice.

- No network calls, no dependencies, side-effect free — safe for browser and Node.
- Tests: `npm test` (TypeScript) and
  `cd python && PYTHONPATH=src python -m unittest discover -s tests -t tests` (104 tests).

## Releasing

See [PUBLISHING.md](PUBLISHING.md). Tagging `vX.Y.Z` publishes to PyPI and JSR
over OIDC with no stored tokens and attaches the MCP bundle to the GitHub release;
the MCP registry entry is then refreshed with `mcp-publisher publish`.

## License

MIT © [Square Software SHPK](https://square.al)
albaniaclie-invoicefiscalizationfiskaliziminiptnuispayrollpythontatimetvshtypescriptvatzero-dependencies

Lo que la gente pregunta sobre fiskalizimi-utils

¿Qué es square-al/fiskalizimi-utils?

+

square-al/fiskalizimi-utils es mcp servers para el ecosistema de Claude AI. Albanian tax utilities for TypeScript and Python: NIPT/NUIS validation, TVSH (VAT) math, fiscal invoice totals (Law 87/2019) and 2026 payroll/profit-tax calculations. Zero dependencies, plus a CLI. Tiene 0 estrellas en GitHub y su última actualización registrada es del 2026-08-20.

¿Cómo se instala fiskalizimi-utils?

+

Puedes instalar fiskalizimi-utils clonando el repositorio (https://github.com/square-al/fiskalizimi-utils) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.

¿Es seguro usar square-al/fiskalizimi-utils?

+

Nuestro agente de seguridad ha analizado square-al/fiskalizimi-utils y le ha asignado un Trust Score de 95/100 (tier: Verified). Revisa el desglose completo de comprobaciones superadas y flags en esta página.

¿Quién mantiene square-al/fiskalizimi-utils?

+

square-al/fiskalizimi-utils es mantenido por square-al. La última actividad registrada en GitHub es del 2026-08-20, con 0 issues abiertos.

¿Hay alternativas a fiskalizimi-utils?

+

Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.

Despliega fiskalizimi-utils en tu cloud

Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.

¿Mantienes este repo? Añade un badge a tu README

Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.

Featured on ClaudeWave: square-al/fiskalizimi-utils
[![Featured on ClaudeWave](https://claudewave.com/api/badge/square-al-fiskalizimi-utils)](https://claudewave.com/repo/square-al-fiskalizimi-utils)
<a href="https://claudewave.com/repo/square-al-fiskalizimi-utils"><img src="https://claudewave.com/api/badge/square-al-fiskalizimi-utils" alt="Featured on ClaudeWave: square-al/fiskalizimi-utils" width="320" height="64" /></a>

Más MCP Servers

Alternativas a fiskalizimi-utils