Skip to main content
Glama

Suíte Brasil IA — APIs Fiscais, Contábeis, Financeiras e Segurança

English Documentation (README.en.md) | Guia B2B para Empresas (PIX / API Key) | Catálogo JSON | llms.txt

Conjunto de 7 APIs serverless em produção na Cloudflare Edge projetadas para escritórios de contabilidade, BPOs financeiros, ERPs, fintechs, automações (n8n / Make) e agentes autônomos de IA.

  • Indexadas oficialmente: Compatíveis com x402scan.com (GET /openapi.json OpenAPI 3.1.0) e PayAI Bazaar (eip155:8453 / Base Mainnet USDC).

  • Conector MCP Unificado em 1 comando: Conecte todas as 7 ferramentas de uma vez no Claude Desktop, Cursor, VS Code ou Windsurf via npx -y github:brunopompeo1/brazil-ai-fiscal-apis-x402.

  • Amostra gratuita em cada API: Chame GET /sample em qualquer serviço para inspecionar o payload real sem custo antes de pagar.


Catálogo de APIs em Produção (7 Serviços)

Serviço

O que resolve na prática

Endpoint Pago (x402)

Preço (Base USDC)

Amostra Grátis

1. Auditor XML NF-e / NFC-e

Comprime XML SEFAZ 4.00 (~90% menos tokens), confere matemática (vProd/vNF), CFOP, NCM, cStat=100 e decodifica chave de 44 dígitos

POST https://br-nfe-xml-auditor-x402.architect-x402.workers.dev/audit

$0.010

/sample

2. Leitor de Boletos & Guias BR

Valida e decodifica Boletos FEBRABAN (47/44 dígitos, regra pós-22/02/2025), guias DARF/FGTS/IPTU (48 dígitos) e chaves NF-e

POST https://br-docs-parser-x402.architect-x402.workers.dev/parse

$0.008

/sample

3. Motor Tributário & Folha BR

Calcula Simples Nacional (Anexos I–V + otimização Fator R 28%), INSS/IRRF (Legal vs Simplificado) + FGTS e retenções B2B de NFS-e

POST https://br-tax-payroll-calc-x402.architect-x402.workers.dev/calc

$0.008

/sample

4. Business Intel CNPJ & PIX

Dossiê completo de CNPJ (QSA, Simples/MEI, score de risco B2B), Geo-CEP IBGE, validador CPF/CNPJ e gerador/leitor de PIX EMVCo CRC16

POST https://br-business-intel-x402.architect-x402.workers.dev/intel

$0.010

/sample

5. Calculadoras Banco Central

Correção monetária oficial (IPCA, IGP-M, INPC, Selic, CDI via API SGS), câmbio PTAX oficial (BRL/USD/EUR/GBP) e simulador Price/SAC

POST https://br-fin-calculators-x402.architect-x402.workers.dev/fin

$0.005

/sample

6. Limpeza Web para IA

Converte qualquer página HTML pesada em Markdown limpo, tabelas JSON e JSON-LD com métrica de economia de tokens

GET https://web-enrichment-x402.architect-x402.workers.dev/clean?url=https://example.com&format=json

$0.002

/sample

7. Firewall Anti-Prompt Injection

Detecta injeção de prompt (Llama Guard 3 + heurística + Base64) e mascara dados sensíveis (CPF, CNPJ, chaves) antes de enviar ao modelo

POST https://agent-guard-x402.architect-x402.workers.dev/guard

$0.020

/sample


Related MCP server: Brazilayer MCP Server

Como usar agora mesmo

1. Servidor MCP Unificado (Claude Desktop, Cursor, VS Code, Windsurf)

Cole no seu claude_desktop_config.json ou .cursor/mcp.json (ver examples/ai-connectors.json):

{
  "mcpServers": {
    "brazil-ai-suite": {
      "command": "npx",
      "args": ["-y", "github:brunopompeo1/brazil-ai-fiscal-apis-x402"],
      "env": {
        "X402_PRIVATE_KEY": "0xSUA_CHAVE_PRIVADA_BASE_OPCIONAL",
        "X402_MAX_USDC_PER_CALL": "0.05"
      }
    }
  }
}
  • Com X402_PRIVATE_KEY configurada (carteira com USDC na Base), os micropagamentos x402 ocorrem automaticamente via @x402/fetch.

  • Sem carteira configurada, todas as ferramentas continuam visíveis e retornam os requisitos exatos HTTP 402 sem quebrar o agente (além da ferramenta gratuita brazil_ai_suite_status).

2. Em Sistemas, ERPs, Python ou TypeScript (Pay-per-use x402)

Todas as rotas pagas retornam HTTP 402 com o cabeçalho PAYMENT-REQUIRED detalhando o valor em USDC na rede Base:

Teste rápido via terminal (curl) para ver o contrato OpenAPI 3.1 ou a amostra gratuita:

curl -s https://br-nfe-xml-auditor-x402.architect-x402.workers.dev/sample
curl -s https://br-nfe-xml-auditor-x402.architect-x402.workers.dev/openapi.json

3. Contratação B2B para Empresas e Escritórios (PIX / Mensalidade)

Quer integrar no seu ERP, sistema contábil ou fluxo n8n pagando mensalidade fixa em Reais via PIX com API Key dedicada (sem precisar usar carteira cripto)?

Confira os planos e peça um piloto em docs/GUIA_EMPRESAS_B2B.md.


Descoberta Automática para IAs

  • Catálogo completo: catalog.json

  • Índice llms.txt: llms.txt

  • Cada serviço expõe individualmente GET /openapi.json, GET /sample, GET /llms.txt, GET /.well-known/x402 e POST /mcp.

Available Tools

8 tools
agent_guard_sanitizeBInspect

Hybrid Edge AI firewall (@cf/meta/llama-guard-3-8b + multi-language regex + Base64 decoder) that detects prompt injection and masks corporate PII/secrets ($0.020 USDC via x402 on Base).

Inputs: text (required), maskPii, deepScan.

brazil_ai_suite_statusAInspect

FREE: Lists all 7 Brazil AI & x402 Suite microservices, live USDC prices on Base, endpoints, and current MCP client payment mode (x402 wallet, B2B API Key, or discovery-only).

Inputs: no named parameters.

br_business_intelBInspect

Brazilian Corporate CNPJ KYB Dossier (QSA partners, Simples/MEI, B2B Risk Score), IBGE Geo-CEP lookup, CPF/CNPJ Mod-11 validator, and Central Bank PIX BRCode (EMVCo + CRC16) generator/decoder ($0.010 USDC via x402 on Base).

Inputs: cep, cnpj, aiSummary, pixDecode, +2 more.

br_docs_parserBInspect

Brazilian FEBRABAN Bank Boleto (47/44), Tax/Utility Slip DARF/FGTS/IPTU (48/44), and NF-e Access Key (44) validator & decoder with post-2025 due date engine ($0.008 USDC via x402 on Base).

Inputs: code (required), aiSummary, documentType.

br_fin_calculatorsBInspect

Official Central Bank of Brazil (BCB) IPCA/IGPM/Selic/CDI monetary correction, PTAX currency conversion, and Price/SAC loan simulator ($0.005 USDC via x402 on Base).

Inputs: loan, ptax, aiSummary, correction.

br_nfe_xml_auditorBInspect

Brazilian NF-e/NFC-e XML-to-JSON compressor (~90% token savings), mathematical & CFOP tax auditor, and 44-digit Access Key Mod-11 decoder ($0.010 USDC via x402 on Base).

Inputs: xml, accessKey, aiSummary, includeItems.

br_tax_payroll_calcAInspect

Deterministic Brazilian tax & payroll calculator: Simples Nacional (Anexos I-V + Fator R), progressive INSS/IRRF, FGTS, and B2B NFS-e withholdings ($0.008 USDC via x402 on Base).

Inputs: payroll, simples, aiSummary, nfseRetention.

web_enrichment_cleanBInspect

Scrapes any URL at the Cloudflare Edge and returns clean Markdown, structured HTML tables as JSON, Schema.org JSON-LD, and token compression metrics ($0.002 USDC via x402 on Base).

Inputs: url (required), format.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 8 tools

    Disambiguation4/5

    Each tool targets a different domain (status, NF-e XML, documents/boleto, web scraping, payroll tax, KYB/PIX, BCB financial math, security sanitization), so most selections are obvious. However, the 44-digit NF-e access key decoder appears in both br_nfe_xml_auditor and br_docs_parser, and CPF/CNPJ Mod-11 validation lives in br_business_intel while similar document validation lives in br_docs_parser, creating a few boundary collisions.

    Naming Consistency3/5

    Six tools share a 'br_' domain prefix but the suffixes mix verb and noun forms (_auditor, _parser, _calc, _calculators, _sanitize, _clean), and three tools break the prefix pattern entirely (brazil_ai_suite_status, web_enrichment_clean, agent_guard_sanitize). The set is still readable and roughly domain-clustered, but there is no single predictable pattern.

    Tool Count5/5

    Eight tools map cleanly onto the advertised seven microservices plus a status/discovery endpoint. Nothing is redundant padding and nothing essential appears merged away; the scope is compact and each tool earns its place.

    Completeness4/5

    The suite covers the main Brazilian business/finance surface—document parsing and validation, NF-e auditing, tax/payroll, credit-risk KYB, PIX generation/decoding, BCB indices, and edge scraping/security. Minor gaps remain (PIX decoding is bundled rather than explicit, no PDF/image document OCR, no standalone CEP or CPF utilities), but agents can reach these through existing tools.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Connects AI agents to Brazilian tax compliance data (CNPJ, CPF, NFe, SPED, eSocial) and provides tools for due diligence, risk scoring, and tax regime comparison.
      44
      203 PyPI
      431
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server that exposes Brazilian tax infrastructure as tools, resources, and prompts, enabling AI agents to emit and manage fiscal documents (NF-e, NFC-e, NFS-e, CT-e, MDF-e, DC-e) through natural language.
      -
    • A
      license
      B
      quality
      C
      maintenance
      Enables AI assistants and automation tools to query and analyze Brazilian fiscal data, including CNPJ, Simples Nacional, NF-e, NFS-e, SPED, eSocial, tax regime comparison, and supplier risk assessment without requiring API keys.
      44
      MIT