Model Context Protocol (MCP) server for Italian Electronic Invoicing (FatturaPA / SDI). Provide tools to validate, generate, and explore API specifications for Sistema di Interscambio (SDI) interoperability. Vendor-neutral: builds, validates, and signs locally, direct-to-SdI, no intermediary.
- ✓Open-source license (Apache-2.0)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
claude mcp add mcp-fattura-elettronica-it -- uvx mcp-fattura-elettronica-it{
"mcpServers": {
"mcp-fattura-elettronica-it": {
"command": "uvx",
"args": ["mcp-fattura-elettronica-it"]
}
}
}MCP Servers overview
# mcp-fattura-elettronica-it 🇮🇹
[English](README.md) | [Italiano](README.it.md)
<!-- mcp-name: io.github.cmendezs/mcp-fattura-elettronica-it -->

[](https://pypi.org/project/mcp-fattura-elettronica-it/)
[](https://pypi.org/project/mcp-fattura-elettronica-it/) [](https://glama.ai/mcp/servers/cmendezs/mcp-fattura-elettronica-it)
[](https://github.com/bsab/italia-mcp-servers)
---
## Introduction
A Python MCP server for **Italian electronic invoicing** in **FatturaPA XML** format (SDI / Agenzia delle Entrate standard, XSD v1.2.3, Specifiche Tecniche 1.9.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). It is built on [`mcp-einvoicing-core`](https://github.com/cmendezs/mcp-einvoicing-core), the shared base library for e-invoicing MCP servers.
> **Note:** "Specifiche Tecniche" (the AdE Allegato A controls/codifiche document) and the XSD schema are two separate artefacts with independent version numbers. Specifiche Tecniche 1.9.1 (in force 2026-05-15) does **not** change the XSD — the bundled schema remains v1.2.3.
This is a **Model Context Protocol (MCP)** server exposing **43 tools** covering the full lifecycle of a FatturaPA XML document: transmission header construction, seller/buyer validation (including Gruppo IVA / VAT-group CodiceFiscale), document type codes (TD01-TD28), line items with AltriDatiGestionali support, VAT summary computation, payment terms, XSD validation against the official Agenzia delle Entrate schema (v1.2.3), XML generation, parsing, JSON export, SDI filename generation, withholding tax (ritenuta d'acconto) calculation, digital signatures (XAdES-BES and CAdES-BES), direct SDI transmission via SDICoop SOAP, SDI notification parsing, and conservazione sostitutiva (legally compliant archiving per AgID). Licensed under **Apache 2.0**.
## Installation
### Via PyPI (recommended)
```bash
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`:
```bash
uvx mcp-fattura-elettronica-it
```
### From source
```bash
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
```
## Configuration
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.2.3.xsd` |
| `SDI_ENVIRONMENT` | SDI environment: `test` or `production` | `test` |
| `SDI_CERT_PATH` | Path to the PKCS#12 mTLS certificate for SDI | (none) |
| `SDI_CERT_PASSWORD` | Passphrase for the PKCS#12 file | (none) |
| `SDI_ENDPOINT_URL` | SDICoop endpoint URL override | (auto from environment) |
| `SDI_CHANNEL_ID` | Channel ID assigned during AdE accreditation | (none) |
| `EINVOICING_SIGNER_SOCKET` | Unix socket for the signer microservice | (none) |
| `EINVOICING_SIGNER_TOKEN` | Auth token for the signer microservice | (none) |
| `CONSERVAZIONE_STORAGE_PATH` | Local archive storage path (dev only) | `.conservazione/` |
## Claude Desktop integration
Add the following to your `claude_desktop_config.json` file:
```json
{
"mcpServers": {
"fattura-elettronica-it": {
"command": "uvx",
"args": ["mcp-fattura-elettronica-it"],
"env": {
"SDI_ENVIRONMENT": "test",
"SDI_CERT_PATH": "/path/to/your-cert.p12",
"SDI_CERT_PASSWORD": "your-cert-password",
"SDI_CHANNEL_ID": "your-channel-id"
}
}
}
}
```
## Cursor integration
Cursor supports MCP servers via stdio. Add the configuration in:
- **Global** (all projects): `~/.cursor/mcp.json`
- **Project** (this repository only): `.cursor/mcp.json`
```json
{
"mcpServers": {
"fattura-elettronica-it": {
"command": "uvx",
"args": ["mcp-fattura-elettronica-it"],
"env": {
"SDI_ENVIRONMENT": "test",
"SDI_CERT_PATH": "/path/to/your-cert.p12",
"SDI_CERT_PASSWORD": "your-cert-password",
"SDI_CHANNEL_ID": "your-channel-id"
}
}
}
}
```
Reload the Cursor window (`Ctrl+Shift+P` then *Reload Window*) to apply the changes.
## Kiro integration
Kiro supports MCP servers via its dedicated configuration file. Two levels are available:
- **Global** (all projects): `~/.kiro/settings/mcp.json`
- **Workspace** (this repository only): `.kiro/settings/mcp.json`
```json
{
"mcpServers": {
"fattura-elettronica-it": {
"command": "uvx",
"args": ["mcp-fattura-elettronica-it"],
"env": {
"SDI_ENVIRONMENT": "test",
"SDI_CERT_PATH": "/path/to/your-cert.p12",
"SDI_CERT_PASSWORD": "your-cert-password",
"SDI_CHANNEL_ID": "your-channel-id"
},
"disabled": false,
"autoApprove": []
}
}
}
```
The file is automatically reloaded on save. You can also open the config via the command palette (`Cmd+Shift+P` / `Ctrl+Shift+P`) then *MCP*.
> **Kiro security tip**: rather than writing secrets in plain text, use the syntax `"SDI_CERT_PASSWORD": "${SDI_CERT_PASSWORD}"`, Kiro resolves shell environment variables at startup.
## Available tools
### Header: FatturaElettronicaHeader (7 tools)
| Tool | Description |
|------|-------------|
| `build_transmission_header` | Build DatiTrasmissione block: ProgressivoInvio, CodiceDestinatario, PECDestinatario |
| `validate_cedente_prestatore` | Validate seller block: IdFiscaleIVA, optional Gruppo IVA member CodiceFiscale, Anagrafica, Sede, RegimeFiscale codes |
| `validate_cessionario` | Validate buyer block: IdFiscaleIVA or CodiceFiscale, Sede (warns on the structural precondition of scarto code 00327 for Gruppo IVA) |
| `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 (300-code max per accredited channel, Specifiche Tecniche 1.9.1) |
### Body: FatturaElettronicaBody (8 tools)
| 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, optional AltriDatiGestionali |
| `build_sport_worker_exemption_dato_gestionale` | Build the AltriDatiGestionali entry for the sport-worker IRPEF exemption (TipoDato='ESENZSPORT', Specifiche Tecniche 1.9.1) |
| `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 |
### Global: generation and validation (7 tools)
| 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.2.3 |
| `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 |
### Simplified invoices: FatturaSemplificata VFSM10 (3 tools)
| Tool | Description |
|------|-------------|
| `generate_fattura_semplificata` | Generate a simplified invoice XML (TD07/TD08/TD09) using VFSM10 format |
| `validate_fattura_semplificata_xsd` | Validate a simplified invoice XML against the VFSM10 XSD v1.0.2 |
| `parse_fattura_semplificata_xml` | Parse a simplified invoice XML into a structured dict |
Simplified invoices (art. 21-bis DPR 633/72) are valid for transactions up to EUR 400
(tax-inclusive). They use a flatter structure than ordinary FatturaPA: no per-line VAT
breakdown, no DatiRiepilogo. Each `DatiBeniServizi` entry carries its own `Descrizione`,
`Importo`, and `DatiIVA`. The VFSM10 format uses namespace `v1.0` and is separate from
the EN 16931 CIUS used by ordinary invoices.
### Digital signatures (2 tools)
| Tool | Description |
|------|-------------|
| `sign_fattura_xades` | Apply XAdES-BES enveloped XML signature (.xml). Requires PKCS#12 cert. |
| `sign_fattura_cades` | Apply CAdES-BES CMS/PKCS#7 attached signature (.xml.p7m). Requires PKCS#12 cert. |
Both signature formats are accepted by SDI (Specifiche tecniche SDI v1.8.4, section 2What people ask about mcp-fattura-elettronica-it
What is cmendezs/mcp-fattura-elettronica-it?
+
cmendezs/mcp-fattura-elettronica-it is mcp servers for the Claude AI ecosystem. Model Context Protocol (MCP) server for Italian Electronic Invoicing (FatturaPA / SDI). Provide tools to validate, generate, and explore API specifications for Sistema di Interscambio (SDI) interoperability. Vendor-neutral: builds, validates, and signs locally, direct-to-SdI, no intermediary. It has 1 GitHub stars and its last recorded update is dated 2026-09-09.
How do I install mcp-fattura-elettronica-it?
+
You can install mcp-fattura-elettronica-it by cloning the repository (https://github.com/cmendezs/mcp-fattura-elettronica-it) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is cmendezs/mcp-fattura-elettronica-it safe to use?
+
Our security agent has analyzed cmendezs/mcp-fattura-elettronica-it and assigned a Trust Score of 95/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains cmendezs/mcp-fattura-elettronica-it?
+
cmendezs/mcp-fattura-elettronica-it is maintained by cmendezs. The last recorded GitHub activity is dated 2026-09-09, with 0 open issues.
Are there alternatives to mcp-fattura-elettronica-it?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy mcp-fattura-elettronica-it to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/cmendezs-mcp-fattura-elettronica-it)<a href="https://claudewave.com/repo/cmendezs-mcp-fattura-elettronica-it"><img src="https://claudewave.com/api/badge/cmendezs-mcp-fattura-elettronica-it" alt="Featured on ClaudeWave: cmendezs/mcp-fattura-elettronica-it" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
The fastest path to AI-powered full stack observability, even for lean teams.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!