# mcp-focus-nfe

Connects Focus NFe to your coding assistant to issue and manage Brazilian tax documents like NFe, NFSe, NFCe, CTe, and MDFe.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 274
- Author: codespar
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/codespar/mcp-dev-latam/tree/HEAD/packages/fiscal/focus-nfe
- Updated: 2026-09-27
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-focus-nfe

## What it does

This server gives your AI assistant 19 tools for handling Brazilian fiscal documents via Focus NFe. It lets the agent generate goods invoices (NFe), retail receipts (NFCe), service bills (NFSe), and transport records. It can also inspect document states, cancel active registrations, or obtain DANFE PDF download links.

Transport workflows are also supported. The server issues CTe cargo documents, closes finished MDFe trip manifests, and handles CCe correction letters. It also lets you register or delete webhook callbacks. Requests use Basic Auth with your API token as the username.

Without `FOCUS_NFE_TOKEN`, all requests fail. When building or testing flows, set `FOCUS_NFE_SANDBOX` to `"true"` to route calls through the homologation environment at `homologacao.focusnfe.com.br`.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `FOCUS_NFE_TOKEN` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mcp-focus-nfe -e FOCUS_NFE_TOKEN=<FOCUS_NFE_TOKEN> -- npx -y @codespar/mcp-focus-nfe
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add focus-nfe --env FOCUS_NFE_TOKEN=<FOCUS_NFE_TOKEN> -- npx -y @codespar/mcp-focus-nfe
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "focus-nfe": {
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-focus-nfe"
            ],
            "env": {
                "FOCUS_NFE_TOKEN": "<FOCUS_NFE_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "focus-nfe": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-focus-nfe"
            ],
            "env": {
                "FOCUS_NFE_TOKEN": "<FOCUS_NFE_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e FOCUS_NFE_TOKEN=<FOCUS_NFE_TOKEN> focus-nfe npx -y @codespar/mcp-focus-nfe
```
Replace <…> with your own values

## When to use it
- Issue Brazilian NFe, NFSe, and NFCe invoices from chat
- Download DANFE PDF links for authorized invoices
- Cancel registered fiscal documents within the legal window
- Emit transport CTe slips and close finished MDFe manifests
- Subscribe webhook endpoints to document status updates

## Example prompts
- Check the status of NFe reference `ref-9842` and return the DANFE link
- Issue a test NFSe service invoice in the homologation environment
- Register a webhook URL to receive notifications about fiscal document events

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [CCXT](https://affpapa.org/en/nevibecode/mcp/ccxt.md) — MCP server · ★ 44583
- [Finance Toolkit](https://affpapa.org/en/nevibecode/mcp/finance-toolkit.md) — MCP server · ★ 5458
- [EdgarTools](https://affpapa.org/en/nevibecode/mcp/edgartools.md) — MCP server · ★ 2814
- [LetsFG — Flights & Hotels](https://affpapa.org/en/nevibecode/mcp/letsfg-flights-hotels.md) — MCP server · ★ 2188
- [AutoTS](https://affpapa.org/en/nevibecode/mcp/autots.md) — MCP server · ★ 1434

From the same set: [codespar/mcp-dev-latam](https://affpapa.org/en/nevibecode/by/codespar/mcp-dev-latam.md) — 124 cards

---
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
