What it does
efatura-kontrol checks e-Fatura, e-Arşiv, e-İrsaliye and envelope XML files against the Revenue Administration's (GİB) XSD and schematron rules, along with line, tax and total arithmetic and signature structure. Each finding includes the line number, GİB's original message, a Turkish explanation and a suggested fix. Validation runs offline, and no data is sent over the network.
It is intended for integrators who want to catch errors before sending documents to GİB or a private integrator. GİB's schematron is written in XPath 2.0 and split across several files, so common validation tools often cannot run it. The tool compiles the rules once and runs them with Saxon. Users can work through a command-line tool (validation, summaries, batch checking of folders, code list lookup and finding explanations), a Python library, or an MCP server that exposes the same checks to AI assistants in read-only form.
Running it requires Python 3.10 or later, with the lxml and saxonche packages. The first run takes about half a second to compile the schematron. A Docker image can serve the MCP tools over HTTP on port 8080, optionally protected by an X-API-Key header. A sample invoice generator creates valid but unsigned UBL-TR documents for testing and learning.
Limitations and requirements
Requires Python 3.10 or later and the lxml and saxonche packages (saxonche wheel is about 40 MB). The first run compiles the schematron (about 0.5 s). Remote mode does not accept the file parameter; documents must be sent as XML content. Request bodies are limited to 64 MB. The API key is a simple shared secret, so when the server is exposed to the internet it should sit behind a TLS-terminating reverse proxy. Arithmetic checks are skipped for HKS (hal) invoices. Generated sample invoices are unsigned and are meant for testing only; documents sent to GİB must be signed by an integrator or a mali mühür.
Safety
Our team has not reviewed this resource. Only automated rules checked it; resources with high-risk signals are not published. These are signals, not a guarantee that installing it is safe. Try it in a sandbox project first.
- Runs code or changes an assistant's behaviour
Sources
- Official MCP Registry first seen 13 Nov 2026 · last seen 13 Nov 2026 · its page on the source
io.github.BerkantACUN/efatura-kontrol
GİB e-Fatura/e-Arşiv/e-İrsaliye belgelerini GİB'in XSD ve şematron kurallarıyla yerelde denetler
v0.1.0As shown on registry.modelcontextprotocol.io when we last read it