# Auditor Fiscal — how to use (mcp.ai)

Check whether a Brazilian invoice was issued with the right taxes. Send the NF-e line items and get back every divergence between what the invoice declares and what the tax rules require, with the field, the expected value and the arithmetic. Covers ICMS, tax substitution, DIFAL, PIS, COFINS and the new IBS and CBS, plus Simples Nacional effective rate and Fator R. Platform-hosted, no credentials.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_auditor_fiscal?ms=1787633160000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `auditor_fiscal_ajuda`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/auditor_fiscal`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/auditor_fiscal/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/auditor_fiscal/ajuda` — Explica exatamente o que esta auditoria confere e o que ela NÃO confere, e qual caminho usar por regime tributário. Chame antes da primeira auditoria. Não consome saldo.
- `POST https://api.mcp.ai/api/auditor_fiscal/auditar/item` — Audita UM item isolado. Útil para conferir uma dúvida pontual sem montar a nota inteira.
  - body: { regime_tributario: string, item: object }
- `POST https://api.mcp.ai/api/auditor_fiscal/auditar/nota` — Audita uma NF-e inteira: compara o imposto DECLARADO em cada item com o DEVIDO pela regra tributária, e confere a aritmética da nota.
  - body: { xml?: string, xml_base64?: string, regime_tributario?: string, itens?: object[], totais?: object }
- `POST https://api.mcp.ai/api/auditor_fiscal/consultar/codigo` — Consulta um código fiscal na tabela vigente: NCM (8 dígitos), CEST (7), CFOP (4) ou CST de IBS/CBS da Reforma.
  - body: { tipo: string, codigo: string }
- `POST https://api.mcp.ai/api/auditor_fiscal/simples/aliquota` — Simples Nacional: alíquota EFETIVA e Fator R, com a conta aberta.
  - body: { rbt12?: number, receitas_mensais?: number[], meses_de_atividade?: number, anexo?: string, folha_12m?: number }
- `POST https://api.mcp.ai/api/auditor_fiscal/simples/fator/r` — Simples Nacional: alíquota EFETIVA e Fator R, com a conta aberta.
  - body: { rbt12?: number, receitas_mensais?: number[], meses_de_atividade?: number, anexo?: string, folha_12m?: number }

## Example prompts
- "What exactly does this audit check, and what does it not check?"
- "Audit this line: NCM 84713012, CFOP 6102, MS to SP, R$1,000, declared ICMS 120"
- "What is the Simples Nacional effective rate for Annex III with a R$1.2M RBT12?"

## More
- Page: https://mcp.ai/auditor_fiscal
- Agent spec (llms.txt): https://mcp.ai/auditor_fiscal/llms.txt
- Postman collection: https://mcp.ai/auditor_fiscal/postman.json
