# fiscal

Wires your agent into Brazil's fiscal infrastructure, so NF-e, NFC-e, NFS-e, CT-e, MDF-e and DC-e go to SEFAZ from the chat.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: BrasilNFe
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/BrasilNFe/brasilnfe-mcp
- Updated: 2026-06-12
- HTML: https://affpapa.org/en/nevibecode/mcp/fiscal

## What it does

The server exposes more than 30 tools across eight groups. Product and retail invoices, service notes, transport and cargo documents, energy invoices, fiscal events such as cancellation or correction letters, SEFAZ lookups, and CRUD for customers, products and tax rules. Five resources under the `brasilnfe://` scheme serve authorised XML, DANFE and received documents for a period, and five ready prompts cover guided issuance, cancellation and pre-flight checks. The agent picks the right tool on its own, builds the payload from the schema and turns SEFAZ errors into plain language.

Transport is Streamable HTTP against MCP `2025-06-18`, with the endpoint at `https://api.brasilnfe.com.br/services/Mcp`. Auth is a Bearer token, and the default ceiling is 60 requests per minute per token. You get the token from the panel after signing up; homologação mode is free and keeps test documents out of production SEFAZ.

Cancellation and number voiding cannot be undone, so run the flow in homologação (`tipoAmbiente: 2`) first. Call the `*_consultar` tools before creating a customer or product, or you will end up with duplicates. Close idle sessions with `DELETE /services/Mcp` to free quota sooner.

## Requirements
- Remote server: `https://api.brasilnfe.com.br/services/Mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http fiscal https://api.brasilnfe.com.br/services/Mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add fiscal --url https://api.brasilnfe.com.br/services/Mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "fiscal": {
            "url": "https://api.brasilnfe.com.br/services/Mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "fiscal": {
            "type": "http",
            "url": "https://api.brasilnfe.com.br/services/Mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http fiscal https://api.brasilnfe.com.br/services/Mcp
```

## When to use it
- issue an NFC-e for a buyer's CPF without leaving the chat
- check SEFAZ service status for a given state
- cancel an authorised NF-e with a justification
- pull XML and DANFE for a document key
- estimate taxes and pick a taxation rule before issuing

## Example prompts
- List the SEFAZ status for SP.
- Look up CNPJ 39.658.743/0001-99.
- Issue an NFC-e for R$ 89,90 to the consumer with CPF 123.456.789-00.

## Similar
- [MCP Fiscal Brasil](https://affpapa.org/en/nevibecode/mcp/mcp-fiscal-brasil.md) — MCP server · ★ 375
- [mcp-nuvem-fiscal](https://affpapa.org/en/nevibecode/mcp/mcp-nuvem-fiscal.md) — MCP server · ★ 274
- [mcp-nfe-io](https://affpapa.org/en/nevibecode/mcp/mcp-nfe-io.md) — MCP server · ★ 274
- [popbill](https://affpapa.org/en/nevibecode/skills/popbill.md) — skill · 4400 installs
- [Conta Azul MCP](https://affpapa.org/en/nevibecode/mcp/conta-azul-mcp.md) — MCP server · ★ 12
- [QuickBooks Automation](https://affpapa.org/en/nevibecode/skills/quickbooks-automation.md) — skill · 4700 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
