Brazil Invoice

by junter1989k-ai

248 downloads
Not rated
GitHub Website

About

Remote MCP server: AI agents issue Brazil NFS-e service invoices (nota fiscal de servico) via Focus NFe. Stateless, BYO credentials.

Details

Author
junter1989k-ai
Downloads
248

- MCP server integration

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Brazil Invoice
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

The README includes setup instructions such as node test/serve.js # local server on :3227.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "brazil invoice": {
            "brazil-invoice": {
                "type": "http",
                "url": "https://inv-br.wishpool.app/mcp",
                "headers": {
                    "x-focusnfe-token": "your_homologacao_token"
                }
            }
        }
    }
}

McpServers

{
    "brazil-invoice": {
        "type": "http",
        "url": "https://inv-br.wishpool.app/mcp",
        "headers": {
            "x-focusnfe-token": "your_homologacao_token"
        }
    }
}

Brazil Invoice MCP 🇧🇷 — How can my AI agent issue an NFS-e (nota fiscal de serviço) in Brazil?

Remote MCP server that lets any AI agent issue Brazil NFS-e electronic service invoices (nota fiscal de serviço eletrônica, authorized by the municipality/prefeitura) via Focus NFe. Stateless, bring-your-own credentials, never stores anything.

Live endpoint: https://inv-br.wishpool.app/mcp · Registry: app.wishpool/brazil-invoice-mcp

Quick start

{
  "mcpServers": {
    "brazil-invoice": {
      "type": "http",
      "url": "https://inv-br.wishpool.app/mcp",
      "headers": { "x-focusnfe-token": "your_homologacao_token" }
    }
  }
}

Free homologação (sandbox) tokens from focusnfe.com.br issue test NFS-e with no fiscal effect. Add "x-focusnfe-mode": "production" with your produção token to issue real ones (sandbox is the default). Your digital certificate and inscrição municipal stay in your own Focus NFe account — this server never sees them.

Tools

| Tool | What it does |
|---|---|
| create_invoice | Submit an NFS-e (nota fiscal de serviço) — provider CNPJ + inscrição municipal, buyer name + CPF/CNPJ, valor_servicos + discriminacao + item_lista_servico in, a ref out. Async: returns PROCESSING; poll query_invoice. |
| query_invoice | Status check by ref: PROCESSING, AUTHORIZED (with numero + codigo_verificacao + url), ERROR (with message), or CANCELED. |
| cancel_invoice | Void an authorized NFS-e at the prefeitura with a justificativa (15–255 chars). |

Owner policy guardrails ride optional headers (x-agentpay-max-amount, x-agentpay-approval-above, x-agentpay-allowed-tools) — set by the human owner in client config; the agent cannot relax them.

Async flow

NFS-e authorization at the prefeitura is asynchronous. create_invoice returns status: PROCESSING and a ref; call query_invoice with that ref until it reads AUTHORIZED (nota autorizada) or ERROR.

Develop

node test/serve.js   # local server on :3227
node test/e2e.js     # protocol + validation + fake-token live probes (real homologação endpoint)

Safety

Pure stateless translation layer. The prefeitura/SEFAZ authorization burden sits with Focus NFe; credentials travel per-request in headers, nothing is stored. Privacy policy.

Roadmap

v1 covers NFS-e (service invoices) — the fit for digital and service merchants. NF-e (nota fiscal eletrônica for physical goods) is planned for v2.

Sister servers

Mexico CFDI invoices are live: inv-mx.wishpool.app. Local payments in 81 countries, one family: mcp.wishpool.app · Taiwan e-invoice 電子發票 included. More invoice countries coming: Chile DTE · Peru CPE · India GST · Poland KSeF · Romania e-Factura · Italy SdI.

MIT licensed.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.