eqlx.org / eqlx-ebelge
Python library · MCP server · v0.1 · Apache-2.0
Read e-Fatura and e-Defter files. Catch what does not add up.
Turkish companies exchange invoices (e-Fatura) and keep their books (e-Defter) as XML files in the format of GİB, the tax authority. eqlx-ebelge reads those files on your machine, turns them into clean data and a trial balance, and lists what does not add up. AI agents use it read-only.
What goes in, what comes out
No model inside, no network access. Same files, same answer.
You give
- e-Fatura and e-Arşiv invoices (UBL-TR XML)
- e-Defter journals and ledgers (XBRL GL XML)
- as files, folders or ZIP archives
eqlx-ebelge checks
- the check digit of every tax id
- lines, VAT and the amount to pay
- the same invoice appearing twice
- debits against credits in every journal entry
You get
- one clean row per invoice
- a trial balance (mizan) from the journal
- a list of findings, each with its rule and file
One folder, start to finish
The ten made-up files that ship with the tool (ebelge sample demo), checked with ebelge check demo.
1You give a folder
Nine invoices and one month of the journal, the book that lists every accounting entry.
- fatura_01.xml … fatura_07.xml 7 invoices
- fatura_08_toplam_hatali.xml invoice
- fatura_09_vkn_hatali.xml invoice
- edefter_2026_10_yevmiye.xml journal, 7 entries
2The tool reads each invoice
Invoice EQX2026000000008, as it comes out of the XML.
| Seller tax id (VKN) | 4477127820 |
| Line 1: steel profile, 10 × 185.40 | 1,854.00 |
| Line 2: installation, 2,276 less 227.60 discount | 2,048.40 |
| VAT (KDV) at 20 % | 780.48 |
| Total with VAT | 4,682.88 |
| Amount to pay, as written | 99,999.99 |
3Is the tax id a possible one?
A VKN is a company's 10-digit tax number; its last digit is computed from the first nine.
Same seller name, one digit apart.
4Does the invoice add up?
Invoice 8: the amount to pay, recomputed from the lines and VAT, against what is written.
5Is any invoice there twice?
Compared across all files, not one by one.
6Does the journal balance?
In every entry, debits must equal credits. All 7 entries of October, added up:
What comes back
Invoice 8 states 99,999.99 to pay where the totals give 4,682.88. Invoice 9 carries seller VKN 4477127821, which fails its check digit. Invoices 2 and 7 look like the same invoice under two numbers.
Each finding names its rule and its file. The command ends with code 1 when there is an error, so a pipeline can stop on it.
The result at a glance
The same demo folder: 10 documents, 9 invoices, 1 journal file with 7 entries.
5 of 9 invoices pass every check; 4 need a second look.
The trial balance from the journal
A trial balance (mizan) is the list of accounts with what each one holds. ebelge mizan demo builds it from the entries.
Debit balances
What the company holds and has spent.
Credit balances
Where the money came from.
Both sides come to 734,000.00. Account names are shortened into English here; the tool returns the Turkish names from the file (KASA, BANKALAR, …).
Everything it checks
How an agent uses it
The agent decides what to look at. The tool reads the XML and does the arithmetic. It sees one folder and writes nothing.
.. and symlinks that lead out are refusedclaude mcp add ebelge -- ebelge mcp --root /path/to/invoices
Asked in Turkish to check the demo folder, Claude called check and answered with a table of the three findings above. It also noticed that the invalid VKN is one digit away from the seller's real one, a likely typo.
How it was tested
Against the public sample packages of GİB for e-Fatura, e-Arşiv (invoices to non-registered buyers) and e-Defter, and against made-up documents.
What the GİB samples taught it
The first run on GİB's packages showed readings that were missing. They are now handled and tested.
What it does not do
pip install "eqlx-ebelge[mcp]"
ebelge sample demo # ten made-up files to try it on
ebelge check demo # every check
ebelge mizan demo # trial balance from the journal
Local only: no network access, no telemetry, one dependency for the core.