Fattura Elettronica IT MCP Server

Italian e-invoicing: FatturaPA XML/SDI v1.6.1, 21 MCP tools for B2B and B2G.

Local serverstdioPython

What is the Fattura Elettronica IT MCP server?

Italian e-invoicing: FatturaPA XML/SDI v1.6.1, 21 MCP tools for B2B and B2G. That is what the fattura elettronica it mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

The short version

A Python MCP server for Italian electronic invoicing in FatturaPA XML format (SDI / Agenzia delle Entrate standard, version 1.2.3). 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).

The tools it exposes

The server publishes 14 tools. What each one is for:

  • 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
  • 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

What it needs from you

Configuration is passed through the environment: FATTURA_XSD_PATH, SDI_CERT_PATH, SDI_ENDPOINT_URL, SDI_CHANNEL_ID, EINVOICING_SIGNER_TOKEN, CONSERVAZIONE_STORAGE_PATH. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Getting it running

mcp-fattura-elettronica-it on PyPI is all you need. Most clients run it directly, so configuration is a few lines and a restart.

How it compares

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Fattura Elettronica IT's toolset — build_transmission_header, validate_cedente_prestatore, validate_cessionario and 11 more — is a fair guide to whether it matches your workflow. It is maintained by cmendezs; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Fattura Elettronica IT.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
build_transmission_headerBuild DatiTrasmissione block: ProgressivoInvio, CodiceDestinatario, PECDestinatario
validate_cedente_prestatoreValidate seller block: IdFiscaleIVA, Anagrafica, Sede, RegimeFiscale codes
validate_cessionarioValidate buyer block: IdFiscaleIVA or CodiceFiscale, Sede
get_regime_fiscale_codesReturn all valid RegimeFiscale codes with descriptions (RF01-RF19)
validate_partita_ivaValidate Italian VAT number (Partita IVA) format and checksum (11 digits)
generate_progressivo_invioGenerate a unique ProgressivoInvio identifier (max 10 alphanumeric chars)
lookup_codice_destinatarioReturn info about a CodiceDestinatario (6-char SDI code) or PEC address
build_dati_generaliBuild DatiGenerali block: TipoDocumento, Divisa, Data, Numero, Causale
get_tipo_documento_codesReturn all TD01-TD28 codes with descriptions and use cases (incl. cross-border)
add_linea_dettaglioAdd a DettaglioLinee entry: NumeroLinea, Descrizione, Quantita, PrezzoUnitario
compute_totaliCompute DatiRiepilogo: imponibile, imposta, AliquotaIVA from line items
get_natura_codesReturn all Natura codes (N1-N7 and sub-codes) for VAT exemption with legal references
build_dati_pagamentoBuild DatiPagamento: CondizioniPagamento (TP01/02/03), ModalitaPagamento (MP01-MP23)
add_allegatoAttach a base64-encoded document to the Allegati block with name and format

How to install the Fattura Elettronica IT MCP server

{
  "mcpServers": {
    "fattura-elettronica-it": {
      "command": "uvx",
      "args": ["mcp-fattura-elettronica-it"]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
FATTURA_XSD_PATHFilesystem location the server is allowed to use.Optional
SDI_CERT_PATHFilesystem location the server is allowed to use.Optional
SDI_ENDPOINT_URLEndpoint or connection string the server talks to.Yes
SDI_CHANNEL_IDConfiguration value read at startup.Optional
EINVOICING_SIGNER_TOKENCredential the server authenticates with.Yes
CONSERVAZIONE_STORAGE_PATHFilesystem location the server is allowed to use.Optional

Example prompts to try

  • Use Fattura Elettronica IT to build transmission header.
  • Use Fattura Elettronica IT to validate cedente prestatore.
  • Use Fattura Elettronica IT to validate cessionario.

Frequently asked questions

It connects Fattura Elettronica IT to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (build_transmission_header, validate_cedente_prestatore, validate_cessionario, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Fattura Elettronica IT directly.