Mcp Nfe Io

io.github.codesparPublished by GitHub account codesparv0.2.2Updated Oct 24, 2026

MCP server for NFe.io — NF-e, NFS-e, CNPJ, CEP

Overview

AI-generated overview

Local MCP server for NFe.io that lets an assistant issue, query, cancel and email Brazilian NF-e and NFS-e fiscal documents and look up CNPJ and CEP data.

What you can do
Issue, fetch, list, cancel and email NFS-e service invoices, and retrieve their PDF and XML links. Issue, fetch, list and cancel NF-e product invoices, retrieve DANFE PDF and XML links, and file correction letters for authorized invoices. Look up Brazilian company data by CNPJ and resolve CEP postal codes to addresses. List, fetch and provision companies on the NFe.io account. List, register and delete webhook endpoints for invoice event callbacks.
When to use it
Useful when an assistant needs to work with Brazilian fiscal documents through NFe.io: creating or cancelling invoices, checking invoice status, pulling PDFs and XML, or enriching records with CNPJ and CEP lookups.
Requirements
Runs locally via npx from the npm package, so Node.js is needed. Requires an NFe.io account and the NFEIO_API_KEY environment variable; NFEIO_COMPANY_ID is optional and sets a default company. Network access to NFe.io API hosts is required. A demo mode returns canned responses without network access.
Before you install
The API key grants invoice issuance and query access to the NFe.io account, so keep it out of shared configs. Tools create, cancel and email real fiscal documents, provision companies and register or delete webhooks, which changes account state and may have legal or financial consequences. Emailing an invoice sends the PDF to a recipient outside the session.

Installation

In SourceWeft

  1. Open Mcp Nfe Io in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

@codespar/mcp-nfe-io

MCP server for NFe.io — NF-e / NFS-e fiscal document emission plus CNPJ and CEP lookups for Brazil.

[npm] [License: MIT]

Quick Start

Claude Desktop

Add to ~/.config/claude/claude_desktop_config.json:

json
{  "mcpServers": {    "nfe-io": {      "command": "npx",      "args": ["-y", "@codespar/mcp-nfe-io"],      "env": {        "NFEIO_API_KEY": "your-api-key",        "NFEIO_COMPANY_ID": "your-company-id-or-cnpj"      }    }  }}

Claude Code

bash
claude mcp add nfe-io -- npx @codespar/mcp-nfe-io

Cursor / VS Code

Add to .cursor/mcp.json or .vscode/mcp.json:

json
{  "servers": {    "nfe-io": {      "command": "npx",      "args": ["-y", "@codespar/mcp-nfe-io"],      "env": {        "NFEIO_API_KEY": "your-api-key",        "NFEIO_COMPANY_ID": "your-company-id-or-cnpj"      }    }  }}

Tools (22)

ToolPurpose
create_nfseIssue an NFS-e (service invoice).
get_nfseFetch a single NFS-e by id.
cancel_nfseCancel an NFS-e.
list_nfseList NFS-e with pagination + optional flowStatus filter.
email_nfseEmail the PDF of an already-issued NFS-e to a recipient.
create_nfeIssue an NF-e (product invoice).
get_nfeFetch a single NF-e by id.
cancel_nfeCancel an NF-e.
list_nfeList NF-e with pagination + optional status filter.
get_nfe_pdfReturn the DANFE PDF URL for an issued NF-e.
consult_cnpjLook up Brazilian company data (razão social, status, address) by CNPJ.
consult_cepResolve a Brazilian postal code (CEP) to a full address.
correct_nfeIssue a Carta de Correção (CC-e) for an authorized NF-e.
get_nfe_xmlReturn the authorized XML URL for an NF-e.
get_nfse_pdfReturn the PDF URL for an issued NFS-e.
get_nfse_xmlReturn the XML URL for an issued NFS-e.
list_companiesList companies registered on the NFe.io account.
get_companyFetch a single company by id or CNPJ.
create_companyProvision a new company on NFe.io.
list_webhooksList webhook endpoints registered for a company (invoice event callbacks).
create_webhookRegister a webhook endpoint.
delete_webhookRemove a webhook endpoint by id.

Environment

VariableRequiredNotes
NFEIO_API_KEYyesIssuance + query scopes. NFe.io supports splitting this into two keys; either is fine.
NFEIO_COMPANY_IDnoDefault company id (or CNPJ). Per-call company_id arguments override it.

Hosts

NFe.io segments its API across three hostnames. This server maps tools to the correct one automatically:

  • api.nfse.io — product invoices
  • api.nfe.io — service invoices + company management
  • nfe.api.nfe.io — lookups (CNPJ, CEP)

Demo mode

Pass --demo or set MCP_DEMO=true to return canned responses without hitting the network. Useful for documentation, screencasts, and CI.

Links

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

Authentication

Set these environment variables before launching the server:

  • NFEIO_API_KEY (required, secret) — API key for NFe.io (issuance + query)
  • NFEIO_COMPANY_ID — Default company ID (CNPJ or NFe.io company UUID) to use when not provided per-call

Issue credentials at the provider's developer portal: https://nfe.io/docs.

License

MIT

Source: packages/fiscal/nfe-io/README.md at commit d0a519a

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.2.2LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts