jlj-treasury
by jlj-lab-s
README.md
# JLJ Treasury — Norma 43, SEPA ISO 20022 (`pain.001` / `pain.008` / `camt.053`) & Reconciliation SDK + MCP
[](https://www.npmjs.com/package/jlj-treasury)
[](https://pypi.org/project/jlj-treasury/)
[](https://github.com/jlj-lab-s/jlj-treasury-sdk/actions/workflows/ci.yml)
[](./LICENSE)
[](#)
Official zero-dependency TypeScript/Node, Python 3 SDK, and **Model Context Protocol (MCP)** server for **[JLJ Treasury API](https://treasury-api.specgrid-api.workers.dev)** (operated by **JLJ Lab** on Cloudflare Workers with **zero payload retention**):
- **AEB Cuaderno 43 (Norma 43):** Full fixed-width parser (`11`/`22`/`23`/`24`/`33`/`88`) with cent-exact mathematical balance & EOF audit.
- **SEPA Direct Debit Creditor Identifier (`AT-02`):** ISO 7064 Mod 97-10 validator & generator (e.g. Spanish `ES<check>000<NIF>`).
- **SEPA Credit Transfer (`pain.001.001.03` / `.09` — Cuaderno 34.14):** Bank-ready XML batch generator with IBAN Mod-97 checks & SEPA Latin sanitization.
- **SEPA Direct Debit (`pain.008.001.02` / `.08` — Cuaderno 19.14 `CORE` & `B2B`):** Direct debit XML generator with mandate metadata & `CtrlSum` math.
- **ISO 20022 `camt.053` Parser (XXE-Hardened):** Normalized to the exact same `BankMovement` schema as Norma 43.
- **Deterministic Bank-to-Invoice Reconciliation:** Transparent cent-exact matching by RF reference, invoice ID, IBAN, and NIF.
## Quick Install (`0` Dependencies)
```bash
# Node.js / TypeScript SDK + MCP CLI
npm install jlj-treasury
# Python 3 SDK
pip install jlj-treasury
# Instant 1-command Stdio MCP Server (no clone required)
npx -y jlj-treasury
```
## AI Agent Integration — MCP Server (Cursor · Claude Desktop · Windsurf · Antigravity)
### Option A: Remote Streamable HTTP (Recommended — Zero Install)
```json
{
"mcpServers": {
"jlj-treasury": {
"url": "https://treasury-api.specgrid-api.workers.dev/mcp",
"headers": {
"Authorization": "Bearer JLJ-YOUR-POLAR-KEY"
}
}
}
}
```
### Option B: Local Zero-Dependency Stdio MCP (`npx -y jlj-treasury`)
```json
{
"mcpServers": {
"jlj-treasury": {
"command": "npx",
"args": ["-y", "jlj-treasury"],
"env": {
"JLJ_TREASURY_API_KEY": "JLJ-YOUR-POLAR-KEY"
}
}
}
}
```
## Quickstart — TypeScript / Node 20+
```ts
import { JljTreasuryClient } from 'jlj-treasury';
const client = new JljTreasuryClient({ apiKey: process.env.JLJ_TREASURY_API_KEY });
const cid = await client.generateCreditorId('ES', 'B85905495', '000');
console.log(cid);
```
## Quickstart — Python 3
```python
import os
from jlj_treasury import JljTreasuryClient
client = JljTreasuryClient(api_key=os.environ.get("JLJ_TREASURY_API_KEY"))
print(client.generate_creditor_id("ES", "B85905495", "000"))
```
## Quickstart — PHP 8+ (Laravel / WooCommerce / PrestaShop)
```php
<?php
require_once __DIR__ . '/php/JLJTreasuryClient.php';
$client = new \JLJLab\Treasury\JLJTreasuryClient(apiKey: getenv('JLJ_TREASURY_API_KEY') ?: null);
$cid = $client->generateCreditorId('ES', 'B85905495', '000');
echo $cid['normalized'] . PHP_EOL;
```
## No-Code Templates & API Tools (1-Click Import)
- **n8n Workflow:** [`n8n/jlj-norma43-sepa-reconcile-workflow.json`](./n8n/jlj-norma43-sepa-reconcile-workflow.json)
- **Make.com Blueprint:** [`make/jlj-treasury-sepa-make-blueprint.json`](./make/jlj-treasury-sepa-make-blueprint.json)
- **Postman Collection v2.1:** [`postman/jlj-treasury.postman_collection.json`](./postman/jlj-treasury.postman_collection.json)
## Pricing & Instant API Key (Polar.sh MoR)
- **Starter ($19/mo · 10,000 req/mo):** [Subscribe via Polar.sh](https://buy.polar.sh/polar_cl_hbJIuq7U8kFjONnDGVJRn42XxljYxAqFrWnig4ani0f)
- **Growth ($49/mo · 100,000 req/mo):** [Subscribe via Polar.sh](https://buy.polar.sh/polar_cl_aPr8CE88rNVAejyTvgPXVQUUEnkCw6COLJfIE4JY12C)
- **Live Interactive Sandbox:** [treasury-api.specgrid-api.workers.dev](https://treasury-api.specgrid-api.workers.dev)
## License
MIT License — Copyright (c) 2026 JLJ Lab.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues