facturas-inbox-mcp
v0.1.0Spanish invoice PDFs to validated data: NIF/IVA/IRPF extraction, arithmetic checks, IVA per quarter.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
scan_folder Scan a folder of documents
Classify every PDF/TXT in a folder and extract invoice fields in one call. Returns one compact row per document (type, status, number, date, NIFs, amounts, failed checks). Paginated: pass next_cursor to continue. Use this first to triage a folder; use extract_invoice for full detail on a single document.
| Parameter | Type | Description |
|---|---|---|
cursor | string | next_cursor from a previous call |
folder | string | Folder to read. Absolute, or relative to the first allowed folder. Defaults to the first allowed folder. |
limit | integer | Documents per page |
recursive | boolean | Include subfolders |
classify_document Classify a document
Label one document as invoice, credit_note (factura rectificativa), simplified_invoice (ticket), payroll (nómina), tax_form (modelo AEAT), bank_statement or other, with a confidence score and the signals behind the label.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to a .pdf or .txt document. Absolute, or relative to the first allowed folder. |
extract_invoice Extract invoice fields
Extract invoice number, issue date, issuer/recipient NIF/CIF, taxable base, VAT lines, IRPF withholding and total from one document, then cross-check them (NIF checksum, base × rate = VAT, base + VAT − IRPF = total). status is 'ok' only when every check passes. Non-invoices are skipped unless force is true. response_format 'concise' lists only failed checks; 'detailed' adds every check, classifier signals and a text preview.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path to a .pdf or .txt document. Absolute, or relative to the first allowed folder. |
force | boolean | Extract even if the document does not look like an invoice |
response_format | string |
validate_tax_id Validate a Spanish tax ID
Check a Spanish NIF (DNI), NIE or CIF with the official control-character algorithm. Accepts spaces, hyphens and an 'ES' VAT prefix. Says which kind it is and, when invalid, what the control character should be. Offline: it does not confirm the ID is registered with AEAT or VIES.
| Parameter | Type | Description |
|---|---|---|
tax_id * | string | e.g. 'B12345674', '12345678-Z', 'ES X1234567L' |
vat_summary Summarize VAT for a period
Total IVA repercutido (issued invoices) and IVA soportado (received invoices) for one taxpayer over a period, broken down by rate, plus the net figure. Direction comes from whether own_tax_id is the issuer or the recipient. Only invoices whose checks all pass are counted; everything else is listed under 'excluded' with a reason. Give either quarter (e.g. '2026-Q3') or from + to.
| Parameter | Type | Description |
|---|---|---|
own_tax_id * | string | NIF/CIF of the business whose VAT position you want |
folder | string | Folder to read. Absolute, or relative to the first allowed folder. Defaults to the first allowed folder. |
from | string | Start date, inclusive (YYYY-MM-DD) |
quarter | string | Calendar quarter, e.g. '2026-Q3' |
recursive | boolean | |
to | string | End date, inclusive (YYYY-MM-DD) |
export_csv Export a folder to CSV
Scan a folder and write one row per document to a new CSV file (semicolon-separated, decimal comma, UTF-8 with BOM: opens directly in Spanish-locale Excel). Returns the file path and row counts, not the data. Never overwrites: fails if the file already exists. The output must be inside an allowed folder.
| Parameter | Type | Description |
|---|---|---|
output_path * | string | Where to write the .csv. Absolute, or relative to the first allowed folder. |
folder | string | Folder to read. Absolute, or relative to the first allowed folder. Defaults to the first allowed folder. |
recursive | boolean |