Urgent.News

What's breaking now, across thousands of outlets.

AI

Issue Brazilian invoices from Claude with an MCP server (and a human approval step)

Brazilian service invoices (NFS-e) are issued per city or through a national system, and every field is checked by tax authorities. SendNF exposes this as an API and as an MCP server, so an AI agent can look up a company by CNPJ, preview an invoice and issue it. What you need An API key. Keys that start with nt_test_ are sandbox keys (no tax value). nt_live_ keys issue real invoices. An MCP…

Brazilian government service invoices, known as NFS-e, are issued either at the city level or through a national system overseen by tax authorities. Every piece of information on the invoice is scrutinized by these authorities. The SendNF platform provides an API and an MCP (Multi-Cloud Platform) server, enabling an AI agent to locate a company using its CNPJ (Cadastro Nacional de Pessoa Jurídica), preview the invoice, and finally issue it.

To get started, you need an API key. Keys beginning with "nt_test_" are designated for testing purposes within a sandbox environment and do not generate any tax values. On the other hand, keys starting with "nt_live_" are utilized for generating actual, tax-compliant invoices. To use the MCP server, you must configure a client such as Claude or Cursor with the following parameters:

mcpServers:

sendnf:

type: http

url: https://api.sendnf.com/mcp

headers:

Authorization: Bearer nt_test_YOUR_KEY

The server employs Streamable HTTP and does not maintain any sessions. Without a valid API key, the server will respond with a 401 status code. The AI agent has access to 44 tools to assist in the invoicing process. These include reading tools such as lookup_cnpj (which provides public data from the tax authority and the applicable city system), search_service_codes (which allows you to search the national service list LC 116 along with NBS), and check_readiness (which identifies any missing information for a company).

Validation tools include validate_dps (which checks an XML DPS against the official layout but does not guarantee acceptance by the city). Preview tools allow you to generate a preview of the invoice without actually sending it (preview_nfse, preview_nfce, and preview_nfe).

For actually issuing the invoice, you can use issue_nfse, issue_nfce, issue_nfe, or cancel_document tools. However, by default, any key used through the MCP requires approval. When you create a note draft using create_note_draft, the invoice is validated and left in a pending_approval state with a PDF preview. The invoice will not be sent to the tax authority until a human approves it via the dashboard or an approver link.

The approval period lasts for 7 days, and the audit log records the user who approved the invoice, the date, and the IP address from which the approval was made.

SendNF handles three types of invoices: NFS-e, NFC-e, and NF-e (model 55) for MEI and Simples Nacional businesses. It does not issue CT-e or MDF-e invoices. Detailed information, examples, and tool lists can be found in the SendNF-mcp repository on GitHub. For more information about the product, including plans and pricing, visit https://sendnf.com/mcp/ and https://sendnf.com/precos/ respectively.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

Who Gets the Free AI Lane First? Use This Four-Gate Assignment Sheet

A team has one free AI lane and fourteen candidate workloads. The intuitive allocation is by seniority or by who asked loudest.

  • Four-gate assignment sheet determines AI workload priority
  • Scores based on burst ratio, revert hours, and fallback option
  • Workloads must meet capacity headroom, revertibility, data classification, and owner/expiry gates

More from Monday 9 November →