MCP Fiscal Brasil logo

MCP Fiscal Brasil

Brazilian tax MCP tools for CNPJ, NF-e, SPED, eSocial, tax codes, compliance, and IBS/CBS transition analysis.

Install MCP Fiscal Brasil

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mcp-fiscal-brasil": {
      "command": "uvx",
      "args": [
        "mcp-fiscal-brasil"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

MCP Fiscal Brasil connects AI assistants and internal automations with Brazilian tax data and document workflows. It provides tools for CNPJ, Simples Nacional, NF-e, NFSe, SPED, eSocial, certificates, tax codes, supplier risk, and tax-regime analysis. Many operations run locally, while selected queries use public Receita Federal, BrasilAPI, or SEFAZ services; no API key is required for the standard setup. Reach for it when an agent needs to inspect Brazilian fiscal records, validate XML, process local files, or support compliance and tax-planning workflows.

Use cases

  • Check a supplier's CNPJ, tax regime, compliance status, and risk score
  • Validate and inspect NF-e XML before processing or filing
  • Analyze SPED files and summarize fiscal records
  • Compare Brazilian tax regimes for a business scenario
  • Look up NCM, CFOP, CST, or CEST codes during invoicing

Key features

  • CNPJ, CPF, Simples Nacional, and MEI queries
  • NF-e parsing, validation, signing checks, distribution, and DANFE generation
  • SPED and eSocial analysis
  • Offline Brazilian tax-code reference lookups
  • Supplier compliance and risk scoring
  • IBS/CBS transition and tax-regime simulations

Tools44

What MCP Fiscal Brasil lets your agent do. Expand a tool for its parameters.

Verified live~7.5k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

28/28 checks healthy over the last 92d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · mcp-fiscal-brasil (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars423Stargazers on the source repository.
Last commit9d agoMost recent push to the default branch.
Tools exposed44Callable tools this server registers over MCP.
Directory activity8 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Fiscal Brasil works

What MCP Fiscal Brasil does

MCP Fiscal Brasil exposes a broad set of Brazilian fiscal operations through the Model Context Protocol. It can retrieve company registration details by CNPJ, check Simples Nacional and MEI status, validate CPF and NF-e keys, parse NF-e/NFC-e XML, generate a DANFE PDF, inspect XML signatures, and check the availability of state SEFAZ services.

The server also covers structured tax and accounting files. SPED tools analyze EFD-ICMS/IPI, EFD-Contribuições, ECD, and ECF content, list selected records, and produce executive summaries. eSocial tools list event definitions and perform basic XML structure checks. Reference tools cover NCM, CFOP, CST/CSOSN, and CEST codes.

Higher-level workflows combine these operations for practical decisions. They can produce CNPJ compliance reports, supplier risk scores, batch reviews of multiple companies, consolidated NF-e validation, SPED summaries, tax-regime comparisons, and year-by-year simulations of the IBS/CBS transition from 2026 through 2033.

How it works

The package runs as an MCP process and is intended to be launched through uvx. Local validation and parsing functions do not need external APIs, including CPF checks, NF-e key checks, XML processing, SPED analysis, and the bundled tax-code lookups. NCM and CEST use bundled SQLite data, while CFOP and CST/CSOSN use in-memory reference tables.

External lookups use public fiscal services where applicable. NF-e distribution and recipient events use the Brazilian SEFAZ services and require the user's local A1 digital certificate. Authentication and signing occur locally through the certificate; the certificate is not uploaded to a remote server. Complete NF-e retrieval through distribution requires the recipient's prior Ciencia da Operacao event.

Setup and configuration

Python 3.11 or newer is supported. The quick-start command is:

bash
uvx mcp-fiscal-brasil

For Claude Desktop, add an MCP server entry that invokes uvx with mcp-fiscal-brasil as its argument, then restart the application. The package does not require an API key for the standard installation.

An A1 certificate in .pfx or .p12 format is needed for SEFAZ distribution and NF-e manifestation. The certificate must belong to the user performing the operation and be available locally. NCM and CEST databases may need to be populated with the project's database-building script when the bundled sample does not contain the required entry.

Tools and capabilities

  • Query company registration, partners, addresses, CNAE, status, and company size by CNPJ.
  • Validate CPF, NF-e access keys, XML signatures, and consolidated NF-e documents.
  • Parse NF-e/NFC-e XML and generate a base64-encoded DANFE PDF for model 55 NF-e files.
  • Analyze SPED files, inspect record types, and create summaries from local text files.
  • Consult Simples Nacional, MEI, NFSe guidance, federal certificates, FGTS certificates, NCM, CFOP, CST/CSOSN, and CEST.
  • Compare tax regimes, model IBS/CBS transition scenarios, and score supplier risk.

Limitations and notes

NFSe has no single national format, so the NFSe tool directs users to the relevant municipality system rather than providing one uniform query path. Name-based company search returns guidance because free public APIs do not provide a general text search facility. DANFE generation supports NF-e model 55 and requires the XML namespace used by the fiscal portal.

Tax-regime comparisons and reform simulations are estimates based on supplied scenario data and return assumptions and disclaimers. The bundled NCM and CEST databases may contain only a sample until populated. A CA bundle in PEM format can optionally be supplied when validating the ICP-Brasil certificate chain.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Fiscal Brasil

MCP Fiscal Brasil is an MCP server that connects AI assistants and automations to Brazilian fiscal data and documents. Its main tools query CNPJ and tax regimes, parse and validate NF-e, analyze SPED and eSocial files, inspect NCM/CFOP/CST/CEST codes, and calculate compliance, supplier-risk, and tax-planning results.

Install and launch it with `uvx mcp-fiscal-brasil`. Python 3.11 or newer is supported. For Claude Desktop, add `uvx` as the command and `mcp-fiscal-brasil` as its argument in the MCP server configuration, then restart Claude Desktop.

No, the standard setup does not require an API key. Some tools query public fiscal services, while local validation, XML parsing, SPED processing, and bundled code lookups operate without external credentials.

NF-e distribution and recipient manifestation require the user's local A1 digital certificate in `.pfx` or `.p12` format. Authentication and signing occur locally through mTLS, and the certificate is not sent to a remote server.

Yes, it generates a base64-encoded DANFE PDF from an NF-e model 55 XML file. The XML must include the fiscal portal namespace, and a digital certificate is not needed for this operation.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Fiscal Brasil AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mcp-fiscal-brasil?style=directory)](https://allmcps.com/mcp/mcp-fiscal-brasil)
HTML Embed
<a href="https://allmcps.com/mcp/mcp-fiscal-brasil"><img src="https://allmcps.com/api/badge/mcp-fiscal-brasil?style=directory" alt="MCP Fiscal Brasil on AllMCPs" /></a>