Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words Sign in

Fiscal MCP

by JoseTorquatoversion 0.3.1i★ 1iRuns on your computerRepository ↗

How to install

What it does

Valida NF-e, NFC-e e NFS-e offline, com schema XSD oficial e sem certificado.

  • Connects Runs on your computer
  • Account or key No key needed
  • Category Other

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity4/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness12/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score16/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install Fiscal MCP. Follow https://mcp.popnx.com/i/josetorquato-fiscal-mcp.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 25, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Fiscal MCP for Claude on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "fiscal": { "command": "uvx", "args": [ "fiscal-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Fiscal MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  3. Paste these settings and save the file

    {
      "mcpServers": {
        "fiscal": {
          "command": "uvx",
          "args": [
            "fiscal-mcp"
          ]
        }
      }
    }
  4. Quit Claude and open it again

  5. Try it

    Use Fiscal MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Fiscal MCP or shows a Fiscal MCP tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Fiscal MCP yet

Fiscal MCP runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Fiscal MCP

  • Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • Install Python (uv) on your computer first (one time)
  • Install Python (uv) on your computer first (one time)
  • Install Python (uv) on your computer first (one time)

B · Others in Other that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Fiscal MCP for Claude Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user fiscal -- uvx fiscal-mcp 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Fiscal MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  3. Paste this command and press Enter

    claude mcp add --scope user fiscal -- uvx fiscal-mcp
  4. Type /mcp in Claude Code

    You should see Fiscal MCP listed as connected

  5. Try it

    Use Fiscal MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Fiscal MCP or shows a Fiscal MCP tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Fiscal MCP for Cursor on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "fiscal": { "command": "uvx", "args": [ "fiscal-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Fiscal MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  3. Open the AI chat in Cursor in Agent mode

  4. Try it

    Use Fiscal MCP and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Fiscal MCP or shows a Fiscal MCP tool in the answer, you are connected

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Fiscal MCP for VS Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "fiscal": { "type": "stdio", "command": "uvx", "args": [ "fiscal-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Fiscal MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  3. Open the AI chat in VS Code in Agent mode

  4. Try it

    Use Fiscal MCP and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Fiscal MCP or shows a Fiscal MCP tool in the answer, you are connected

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Fiscal MCP💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user fiscal -- uvx fiscal-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "fiscal": {
      "command": "uvx",
      "args": [
        "fiscal-mcp"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "fiscal": {
      "command": "uvx",
      "args": [
        "fiscal-mcp"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "fiscal": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "fiscal-mcp"
      ]
    }
  }
}

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Registry name
io.github.JoseTorquato/fiscal-mcp
Downloads per weeki
6/wk
Connection
Runs on your computer
Latest versioni
0.3.1
Categoryi
Other
Published to registryi
Nov 25, 2026
Code last changedi
Nov 25, 2026
Maker
JoseTorquato
Packages
pypi: fiscal-mcp
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 27, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account JoseTorquato, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed 2 days ago

  • ✓ Pass

    Has a licence

    Uses MIT

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

Not checked yet

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/josetorquato-fiscal-mcp.svg)](https://mcp.popnx.com/en/servers/josetorquato-fiscal-mcp)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Otheri

  • More stars than 87% of the other 22467 servers in this category
  • Published to the registry more recently than 95% of the other 22467 servers in this category
  • Basic checks equal to or better than 99% of the other 22467 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is Fiscal MCP safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed 2 days ago, and the latest version (0.3.1) reached the registry 2 days ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.

What can I use instead?

In the same category: World Monitor, openstatus, Oh My Posh Validator, Strata, Jitsu

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

World Monitor

Real-time global intelligence on conflict, markets, energy, trade, shipping and cyber. 100 tools.

by koala73Widely used★ 91.2KUpdated 11 days ago

Connect now (has URL) · sign-in✓ service owner · worldmonitor.app

openstatus

Manage monitors, status pages, incidents and maintenances in your openstatus workspace.

by openstatusHQWidely used★ 9.3KUpdated 3 months ago

Connect now (has URL) · sign-in✓ service owner · openstatus.dev

Oh My Posh Validator

Validate oh-my-posh configurations and segment snippets against the official schema.

by JanDeDobbeleerWidely used★ 23.8K Stars for the whole repoUpdated 38 days ago

Connect now (has URL)2 tools · light✓ service owner · ohmyposh.dev

Strata

MCP server for progressive tool usage at any scale (see https://klavis.ai)

by Klavis-AIGrowing★ 5.8KUpdated 14 months ago

Connect now (has URL) · needs a keyRepo archived✓ klavis.ai

Jitsu

Manage Jitsu data pipelines: destinations, streams, connections, functions, live events.

by jitsucomWidely used★ 5.1KUpdated 4 months ago

Connect now (has URL) · sign-in✓ service owner · jitsu.com
Compared with similar ones
This one
Fiscal MCP
World MonitoropenstatusOh My Posh ValidatorStrataJitsu
Runs whereInstalls on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to install
Needs a keyNoNoNoNoNoNo
Add with + in ClaudeNoNoNoNoNoNo
Basic checks3/34/44/44/41/44/4
LicenseMITAGPL-3.0AGPL-3.0MITApache-2.0MIT
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

fiscal-mcp

Documento fiscal brasileiro como ferramenta de agente. Valide NF-e e NFS-e antes de transmitir — sem certificado, sem cadastro, sem enviar nada para lugar nenhum.

pip install "fiscal-mcp[xsd]"

fiscal-mcp validar nota.xml

[erro] ibs-cclasstrib-prefixo-cst cClassTrib não corresponde ao CST do item item 2: imposto/IBSCBS/cClassTrib = '000123' não começa por imposto/IBSCBS/CST = '200' → Os três primeiros dígitos do cClassTrib são o CST do item. Este é o erro mais comum ao ligar o módulo de IBS/CBS num ERP.

[erro] schema-elemento-fora-de-ordem cEAN apareceu onde o leiaute espera xProd item 1, linha 62 do XML → O schema da NF-e exige a sequência exata do leiaute — trocar a ordem reprova mesmo com todos os campos presentes.

2 erro(s), 0 aviso(s)

Três camadas, num laudo só: schema XSD oficial, regras fiscais e chave de acesso. Tudo local — o processo não abre socket, e há teste que prova.


Por que existe

Rejeição da SEFAZ chega tarde, custa uma transmissão e vem com mensagem críptica. Boa parte dos motivos é aritmética simples ou campo fora de formato — coisa que dá para pegar antes de enviar, na sua própria máquina.

E agora tem prazo: desde 3 de agosto de 2026, documentos fiscais do regime regular precisam trazer os campos de IBS e CBS, e notas sem eles podem ser rejeitadas (CGIBS).

Enquanto isso, um agente de IA consegue mexer no seu Notion e no seu GitHub, mas não sabe ler uma nota fiscal.

O que ele faz

FerramentaO que faz
validar_nfeschema XSD oficial, regras fiscais (IBS/CBS incluso), totais e chave — com o que fazer em cada achado
explicar_nferesumo estruturado do XML, em vez do documento inteiro
validar_nfseNFS-e do padrão nacional: estrutura, DPS embutida, prestador, serviço
explicar_nfseresumo estruturado da NFS-e
explicar_rejeicaocódigo da SEFAZ → significado → ação, e se é reversível
validar_chave_acessodecompõe os 44 dígitos da NF-e e confere o dígito verificador
validar_chave_nfsedecompõe os 50 dígitos da NFS-e nacional
listar_rejeicoes_conhecidaso que o catálogo cobre

Nenhuma delas assina, transmite, emite ou cancela documento. Não existe caminho, nesta versão, para causar efeito fiscal — e um teste verifica isso a cada mudança.

Como usar

Na linha de comando
fiscal-mcp validar nota.xml          # NF-e ou NFS-e, ele descobre sozinho

fiscal-mcp validar nota.xml --json # para script e CI fiscal-mcp validar nota.xml --sem-schema fiscal-mcp explicar nota.xml # resumo estruturado fiscal-mcp chave 4326081234... # 44 dígitos (NF-e) ou 50 (NFS-e) fiscal-mcp rejeicao 539 # traduz o código da SEFAZ fiscal-mcp rejeicao # lista o catálogo fiscal-mcp tabelas # qual tabela oficial está embarcada

Sai com código 1 quando encontra erro, então serve direto em CI.

Como servidor MCP
pip install "fiscal-mcp[servidor,xsd]"

Copie e cole no seu cliente. Claude Code:

claude mcp add fiscal -- fiscal-mcp-servidor

Claude Desktop (claude_desktop_config.json), Cursor (.cursor/mcp.json), VS Code e a maioria dos outros:

{

"mcpServers": { "fiscal": { "command": "fiscal-mcp-servidor" } } }

Sem instalar Python — útil para quem trabalha com ERP em Delphi ou C#:

{

"mcpServers": { "fiscal": { "command": "docker", "args": ["run", "-i", "--rm", "ghcr.io/josetorquato/fiscal-mcp"] } } }

Aí é só perguntar ao agente: *"esse XML está pronto para transmitir?"*

O que ele não faz

Escrito antes das perguntas, porque prometer demais é o jeito mais rápido de perder a confiança de quem trabalha com fiscal:

  • Não emite, não assina, não transmite. Sem certificado digital envolvido.
  • Passar aqui não garante autorização. É validação local: pega o erro previsível, não substitui a SEFAZ.
  • A validação por schema exige o extra `[xsd]`. Sem ele, o laudo diz que essa camada não rodou — nunca finge que rodou.
  • NFS-e só no padrão nacional. Município com padrão próprio não é reconhecido (ADR-0006).
  • Não verifica dígito verificador de NFS-e — o algoritmo não foi confirmado, e chutar produziria acusação falsa.
  • Não valida assinatura digital. Documento não assinado nunca passa no XSD oficial; o laudo diz isso como informação, não como erro.
  • Não dá conselho tributário. CFOP, CST e alíquota são do seu contador.
Estado da validação, por documento
CamadasRegrasTestado contra
NF-e / NFC-eschema XSD + regras + chave31✅ duas NF-e reais autorizadas em produção, 17 amostras públicas e XML sintético
NFS-e nacionalregras + chave10✅ uma nota autorizada de verdade
Contra nota real, autorizada em produção

Em 26/08/2026 o validador rodou em duas NF-e reais, ambas autorizadas pela SEFAZ em ambiente de produção:

NotaGrupo IBS/CBSErrosAvisos
emitida em 26/08/2026presente e preenchido00
emitida em 09/04/2026ausente (anterior ao grupo)01 — ibs-grupo-ausente

A primeira é o caso que importa: uma nota da reforma, aceita pela SEFAZ, passou limpa nas 28 regras e no XSD oficial. Qualquer achado ali seria falso positivo por definição. A segunda mostra o outro lado — a ferramenta não reprovou uma nota pré-reforma, apontou a ausência como aviso, que é a leitura correta da postergação da UB12-10.

Que as regras não estavam apenas dormentes foi verificado por contraprova: corrompendo o cClassTrib da nota real, três regras disparam; corrompendo o CST, duas.

O que isso ainda não cobre. Duas notas, de um item cada, do mesmo emissor, no caminho tributado normal. Monofasia (CST 620), redução de alíquota, crédito presumido e ajuste de competência continuam testados só contra fixture. A regra ibs-subgrupos-obrigatorios segue como aviso até rodar contra três XMLs reais distintos sem falso positivo — o contrato está no CHANGELOG.

Tem nota real para contribuir? Continua sendo o que mais ajuda, e agora tem ferramenta para isso: python scripts/anonimizar.py nota.xml.

Contra o corpus público

As 17 amostras MIT da nfelib têm estrutura de documento real — 15 passam com zero erros, e as duas que não passam são explicáveis: uma é inválida no XSD oficial de propósito, a outra tem valores de preenchimento incoerentes entre si (vIBS = 0 com vIBSUF = 16). Nenhuma regra de tabela acusa nenhuma delas, e há teste que trava isso.

Das 31 regras de NF-e, 20 são da Camada A de IBS/CBS: CST e cClassTrib conferidos contra a tabela oficial embarcada da SVRS — 18 CST e 173 classificações, versionadas no repositório com URL de origem, data e sha256 (procedência). Mais aritmética por item, exclusividade de regime, presença condicional e as alíquotas de transição por ano de emissão (IBS de 2026 a 2028 e CBS de 2026, LC 214/2025, arts. 343, 344 e 346).

fiscal-mcp tabelas diz qual versão da tabela está embarcada. Quem valida contra tabela precisa saber contra qual.

A regra de IBS/CBS emite aviso, não erro: a NT 2025.002 v1.51 reclassificou a regra de rejeição correspondente (UB12-10) como *implementação futura*, e a v1.53 (30/10/2026) mantém esse status sem data, então a nota não é recusada por isso hoje. Ela carrega data de reavaliação, e um teste falha quando essa data passa. Acusar errado é pior que não acusar.

Tem um XML real que pode compartilhar? É a contribuição mais valiosa possível agora — abra uma issue com os dados trocados por fictícios.

Escrever uma regra

Regras são dados, não código. Absorver uma nota técnica deveria ser editar um YAML — e é:

- id: tot-produtos-confere

tipo: soma_itens severidade: erro # erro | aviso | informacao campo_item: prod/vProd campo_total: total/ICMSTot/vProd tolerancia: "0.01" mensagem: O total de produtos não bate com a soma dos itens acao: > Some o vProd de cada item e compare com total/ICMSTot/vProd.

Tipos disponíveis: existe, nao_vazio, valor_em, formato, soma_itens, condicional.

Escopo. Por padrão a regra roda uma vez, na raiz da nota. Com escopo: item ela roda uma vez por item, com os caminhos relativos ao det — e o achado diz qual item, pelo nItem:

- id: ibs-grupo-ausente

tipo: existe escopo: item # documento (padrão) | item campo: imposto/IBSCBS

Caminho absoluto. Num escopo: item, o caminho que começa com / vale a partir da raiz da nota. É o que permite uma regra olhar o item e algo fora dele ao mesmo tempo:

- id: ibs-totais-presentes

tipo: condicional escopo: item quando_campo: imposto/IBSCBS/CST # relativo ao item campo: /total/IBSCBSTot # a partir da raiz

Vigência. Regra que ainda não estabilizou declara quando será reavaliada. Não é comentário: um teste falha quando a data passa, e é assim que a manutenção deixa de depender de memória.

  vigencia:

reavaliar_em: "2026-09-01" fonte: "Ato Técnico Conjunto RFB/CGIBS nº 1, de 31/07/2026"

Todo achado precisa de `acao`. Quem lê é um agente que vai tentar de novo — erro sem ação vira loop de retry ou nota duplicada. Um teste falha se alguma regra não tiver.

Contribuir

O que mais ajuda, em ordem:

  1. XML real anonimizado — principalmente NF-e, e municípios de NFS-e diferentes.
  2. Código de rejeição que você levou e não está no catálogo.
  3. Regra nova em regras/, com as duas fixtures.
  4. Leitura da seção 7 da NT 2025.002-RTC v1.51 — o leiaute de IBS/CBS já está mapeado; o que falta confirmar em fonte primária são os códigos de rejeição, e nenhum entra aqui sem leitura humana.

Antes de abrir PR, leia o CONTRIBUTING. Há uma regra sem exceção: PR com dado fiscal real identificável é fechado sem merge.

Como isso vai crescer

O produto é a validação: o validador mais fundo que existe para NF-e, que roda offline e que você pode conferir antes de transmitir. Emissão está suspensa, com gatilho escrito — ver ADR-0011. O que vem depois, e por que nesta ordem, está escrito:

DocumentoPara quê
ROADMAP.mdas fases e o critério de saída de cada uma
BACKLOG.mdas tarefas, priorizadas
docs/adr/as decisões e por que foram tomadas assim
docs/spec/o produto em detalhe

Três decisõe

Only the beginning is shown; read the rest in the repo