Server data from the Official MCP Registry
Italian e-invoicing: FatturaPA XML/SDI v1.2.3, 27 tools. UBL 2.1 and CII wire formats.
Italian e-invoicing: FatturaPA XML/SDI v1.2.3, 27 tools. UBL 2.1 and CII wire formats.
This is a well-structured MCP server for Italian electronic invoicing (FatturaPA) with proper input validation, no hardcoded credentials, and no malicious patterns. The codebase demonstrates good security practices including XML escaping, schema validation, and careful error handling. Permissions are appropriately scoped to the server's purpose (local XML processing, no external API calls). Minor quality suggestions exist around error handling, but do not rise to security concerns. Supply chain analysis found 7 known vulnerabilities in dependencies (1 critical, 4 high severity). Package verification found 1 issue.
3 files analyzed ยท 13 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Set these up before or after installing:
Environment variable: FATTURA_XSD_PATH
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-cmendezs-mcp-fattura-elettronica-it": {
"env": {
"FATTURA_XSD_PATH": "your-fattura-xsd-path-here"
},
"args": [
"mcp-fattura-elettronica-it"
],
"command": "uvx"
}
}
}From the project's GitHub README.
A Python MCP server for Italian electronic invoicing in FatturaPA XML format (SDI / Agenzia delle Entrate standard, version 1.6.1). It enables AI agents (Claude, IDEs) to generate, validate, and analyze B2B, B2G, and cross-border electronic invoices that are directly compliant with the technical specifications of the Sistema di Interscambio (SDI).
This is a Model Context Protocol (MCP) server exposing 21 tools covering the full lifecycle of a FatturaPA XML document: transmission header construction, seller/buyer validation, document type codes (TD01-TD28), line items, VAT summary computation, payment terms, XSD validation against the official Agenzia delle Entrate schema (v1.6.1), XML generation, parsing, JSON export, SDI filename generation, and withholding tax (ritenuta d'acconto) calculation. The server requires no external API calls, as all logic runs locally. Licensed under Apache 2.0.
pip install mcp-fattura-elettronica-it
mcp-einvoicing-core is installed automatically as a dependency.
lxml is also required and included, so no extra steps are needed.
Without prior installation, using uvx:
uvx mcp-fattura-elettronica-it
git clone https://github.com/cmendezs/mcp-fattura-elettronica-it.git
cd mcp-fattura-elettronica-it
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
cp .env.example .env
The server does not require external credentials in v0.1.0. The available environment variables are:
| Variable | Description | Default |
|---|---|---|
LOG_LEVEL | Log level (DEBUG, INFO, WARNING, ERROR) | INFO |
FATTURA_XSD_PATH | Path to the FatturaPA XSD file | schemas/FatturaPA_v1.6.1.xsd |
Add the following to your claude_desktop_config.json file:
{
"mcpServers": {
"fattura-elettronica-it": {
"command": "uvx",
"args": ["mcp-fattura-elettronica-it"]
}
}
}
Configuration file (~/.cursor/mcp.json or .cursor/mcp.json in the project folder):
{
"mcpServers": {
"fattura-elettronica-it": {
"command": "uvx",
"args": ["mcp-fattura-elettronica-it"]
}
}
}
{
"mcpServers": {
"fattura-elettronica-it": {
"command": "uvx",
"args": ["mcp-fattura-elettronica-it"],
"disabled": false,
"autoApprove": []
}
}
}
| Tool | Description |
|---|---|
build_transmission_header | Build DatiTrasmissione block: ProgressivoInvio, CodiceDestinatario, PECDestinatario |
validate_cedente_prestatore | Validate seller block: IdFiscaleIVA, Anagrafica, Sede, RegimeFiscale codes |
validate_cessionario | Validate buyer block: IdFiscaleIVA or CodiceFiscale, Sede |
get_regime_fiscale_codes | Return all valid RegimeFiscale codes with descriptions (RF01-RF19) |
validate_partita_iva | Validate Italian VAT number (Partita IVA) format and checksum (11 digits) |
generate_progressivo_invio | Generate a unique ProgressivoInvio identifier (max 10 alphanumeric chars) |
lookup_codice_destinatario | Return info about a CodiceDestinatario (6-char SDI code) or PEC address |
| Tool | Description |
|---|---|
build_dati_generali | Build DatiGenerali block: TipoDocumento, Divisa, Data, Numero, Causale |
get_tipo_documento_codes | Return all TD01-TD28 codes with descriptions and use cases (incl. cross-border) |
add_linea_dettaglio | Add a DettaglioLinee entry: NumeroLinea, Descrizione, Quantita, PrezzoUnitario |
compute_totali | Compute DatiRiepilogo: imponibile, imposta, AliquotaIVA from line items |
get_natura_codes | Return all Natura codes (N1-N7 and sub-codes) for VAT exemption with legal references |
build_dati_pagamento | Build DatiPagamento: CondizioniPagamento (TP01/02/03), ModalitaPagamento (MP01-MP23) |
add_allegato | Attach a base64-encoded document to the Allegati block with name and format |
| Tool | Description |
|---|---|
generate_fattura_xml | Generate a complete FatturaPA XML file from structured input data |
validate_fattura_xsd | Validate a FatturaPA XML string against the official XSD schema v1.6.1 |
parse_fattura_xml | Parse an existing FatturaPA XML string and return a structured JSON dict |
export_to_json | Export a parsed FatturaPA structure to clean JSON format |
validate_partita_iva_format | Validate Partita IVA format and Luhn-like checksum (11-digit Italian VAT) |
get_sdi_filename | Generate the official SDI filename: IT{PartitaIVA}_{ProgressivoInvio}.xml |
check_ritenuta_acconto | Check and compute ritenuta d'acconto (withholding tax) for professional invoices |
1. validate_partita_iva_format("01234567897")
โ { "valid": true }
2. generate_progressivo_invio(sequence=1)
โ { "progressivo_invio": "00001" }
3. build_transmission_header(id_paese="IT", id_codice="01234567897",
progressivo_invio="00001", formato_trasmissione="FPR12",
codice_destinatario="ABC123")
4. validate_cedente_prestatore(id_paese="IT", id_codice="01234567897",
denominazione="ACME Srl", regime_fiscale="RF01",
indirizzo="Via Roma 1", cap="00100", comune="Roma", nazione="IT")
5. validate_cessionario(denominazione="Buyer Srl",
id_paese="IT", id_codice="98765432109",
indirizzo="Via Verdi 2", cap="20100", comune="Milano")
6. build_dati_generali(tipo_documento="TD01", data="2026-01-15",
numero="2026/001", divisa="EUR")
7. add_linea_dettaglio(numero_linea=1, descrizione="Consulenza informatica",
quantita=8, unita_misura="ORE", prezzo_unitario=100.0,
prezzo_totale=800.0, aliquota_iva=22.0)
8. compute_totali(linee=[{"prezzo_totale": 800.0, "aliquota_iva": 22.0}])
โ { "totale_fattura": "976.00" }
9. build_dati_pagamento(condizioni_pagamento="TP02", modalita_pagamento="MP05",
importo_pagamento=976.0, iban="IT60X0542811101000000123456")
10. generate_fattura_xml(...all previous blocks...)
โ { "xml": "<?xml ...", "filename": "IT01234567897_00001.xml" }
11. validate_fattura_xsd(xml_string=...)
โ { "valid": true }
check_ritenuta_acconto(imponibile=1000.0, tipo_ritenuta="RT02",
causale_pagamento="A")
โ {
"DatiRitenuta": {
"TipoRitenuta": "RT02",
"ImportoRitenuta": "200.00",
"AliquotaRitenuta": "20.00",
"CausalePagamento": "A"
},
"importo_ritenuta": "200.00"
}
get_natura_codes()
โ codes: [
{ "code": "N3.1", "description": "Non imponibili โ esportazioni",
"legal_ref": "Art. 8 DPR 633/72" },
{ "code": "N6.1", "description": "Inversione contabile โ rottami",
"legal_ref": "Art. 74 c. 7-8 DPR 633/72" },
...
]
mcp-fattura-elettronica-it (this package, standalone MCP server)
โโโ ItalyPartyValidator(BasePartyValidator) โ Partita IVA modulo-10
โโโ FatturaGenerator(BaseDocumentGenerator) โ FatturaPA XML v1.6.1
โโโ FatturaValidator(BaseDocumentValidator) โ lxml XSD v1.6.1
โโโ FatturaParser(BaseDocumentParser) โ lxml xpath
โ extends
mcp-einvoicing-core (shared foundation, installed as dependency)
โโโ BaseDocumentGenerator / Validator / Parser / PartyValidator
โโโ InvoiceDocument, InvoiceParty, InvoiceLineItem โฆ (Pydantic)
โโโ xml_utils, logging_utils, exceptions
โโโ EInvoicingMCPServer (optional multi-country aggregator)
| Resource | Link |
|---|---|
| FatturaPA specifications | fatturapa.gov.it |
| Official XSD v1.6.1 | Schema v1.2.2, Agenzia delle Entrate |
| XML namespace | http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2 |
| SDI, Sistema di Interscambio | Agenzia delle Entrate |
| Withholding tax (ritenuta d'acconto) | Art. 25 DPR 600/73, Modello 770 |
# Install development dependencies
pip install -e ".[dev]"
# Run all tests
pytest tests/ -v
# Run only MCP integration tests
pytest tests/test_mcp_integration.py -v
| Version | Features |
|---|---|
| v0.1.0 (current) | XML generation, XSD validation, parsing, 21 MCP tools, withholding tax |
| v0.2 | CAdES-BES and XAdES digital signatures (smart card, HSM, P12) |
| v0.3 | Direct SDI integration via SDICoop SOAP and SFTP, sending and receiving |
| v0.4 | Simplified invoice (TD07/TD08/TD09), amounts up to 400 EUR |
| v0.5 | Legally compliant archiving, integration with AgID-accredited providers |
| Country | Server |
|---|---|
| ๐ Global | mcp-einvoicing-core |
| ๐ง๐ช Belgium | mcp-einvoicing-be |
| ๐ง๐ท Brazil | mcp-nfe-br |
| ๐ซ๐ท France | mcp-facture-electronique-fr |
| ๐ฉ๐ช Germany | mcp-einvoicing-de |
| ๐ฎ๐น Italy | mcp-fattura-elettronica-it |
| ๐ต๐ฑ Poland | mcp-ksef-pl |
| ๐ช๐ธ Spain | mcp-facturacion-electronica-es |
This project is distributed under the Apache 2.0 license. See the LICENSE file for full details.
Copyright 2026 cmendezs
Project maintained by cmendezs. For questions about the FatturaPA standard implementation, please open an Issue.
Be the first to review this server!
by Modelcontextprotocol ยท Developer Tools
Web content fetching and conversion for efficient LLM usage
by Toleno ยท Developer Tools
Toleno Network MCP Server โ Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace ยท Developer Tools
Create, build, and publish Python MCP servers to PyPI โ conversationally.