Labsco
MCP SERVER

NFS-e Nacional

by SamuelMoraesF

Pull the electronic service invoices (NFSe) issued in a date range, then take any access key from that list and fetch the full record, its XML or its DANFSe PDF.

Accounting, Invoicing & BookkeepingVerified
Summary
Invoice lookup that ends with the XML and the PDF already on disk.

The three tools chain in one direction: search a period, take an access key out of the result, then pull the full record or the DANFSe. Because nfse_detalhes and nfse_pdf write files and return paths, the model keeps a short answer while the artefacts land where the accounting work happens. Issuing or cancelling an invoice is not in the tool set — this side is retrieval only.

What it is

A retrieval server for Brazil's national NFSe service, where every invoice is addressed by its access key.

What you get
  • Search NFSe issued between a start and an end date, and get the date, recipient, value, status and access key of each one.
  • Open a single invoice from its access key: header, issuer, values and DPS, with the XML written to disk.
  • Download the DANFSe PDF for an invoice and receive the path of the saved file.
Requirements

A writable working directory: nfse_detalhes saves the XML and nfse_pdf saves the PDF locally, and both hand back a path rather than the document itself. No environment variables are declared.

Setup effort

Build from source — clone the repository and build it, then point your client at the binary