Skip to main content
MCP server CX Codex

mcp-focus-nfe — Claude Code MCP server: what it does, how to install

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

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add mcp-focus-nfe -e FOCUS_NFE_TOKEN=<FOCUS_NFE_TOKEN> -- npx -y @codespar/mcp-focus-nfe
Open on GitHub

What mcp-focus-nfe 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.

What it helps with

  • 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 for the agent

  • 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

How to install mcp-focus-nfe

Platform CLI

claude mcp add mcp-focus-nfe -e FOCUS_NFE_TOKEN=<FOCUS_NFE_TOKEN> -- npx -y @codespar/mcp-focus-nfe

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about mcp-focus-nfe

How to install mcp-focus-nfe in Claude Code?

Run claude mcp add mcp-focus-nfe -e FOCUS_NFE_TOKEN=<FOCUS_NFE_TOKEN> -- npx -y @codespar/mcp-focus-nfe in your terminal, replacing <FOCUS_NFE_TOKEN> with your token.

What does mcp-focus-nfe do?

It provides 19 tools to emit, query, and cancel Brazilian fiscal documents such as NFe, NFSe, NFCe, CTe, and MDFe via Focus NFe.

How can I test mcp-focus-nfe without filing real taxes?

Set the FOCUS_NFE_SANDBOX environment variable to "true" to point API requests to the test environment at homologacao.focusnfe.com.br.

Similar MCP servers

Everything for Finance and business →

From the same set124

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor