Skip to main content
NF

NFe.io

v0.2.0API Key

NF-e/NFS-e emission as a service β€” no cert installation, no XML assembly. Companies, webhooks, and CC-e (Carta de CorreΓ§Γ£o) included. Full doc URL access for DANFE, PDFs, and XMLs.

22 tools2 env varsπŸ‡§πŸ‡· Brazilstable on npm

Install

terminal
$ npm install @codespar/mcp-nfe-io

Quickstart

Add this entry to your claude_desktop_config.json (or any MCP-compatible client config).

claude_desktop_config.json
{
  "mcpServers": {
    "nfe-io": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-nfe-io"
      ],
      "env": {
        "NFEIO_API_KEY": "<your_nfeio_api_key>"
      }
    }
  }
}

After restart, your agent can call any of the 22 tools below β€” try create_nfse first.

Environment variables Β· 2

Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.

NFEIO_API_KEY
requiredsecret

API key for NFe.io (issuance + query)

NFEIO_COMPANY_ID
optional

Default company ID (CNPJ or NFe.io company UUID) to use when not provided per-call

Available tools Β· 22

Each tool is independent β€” your agent loads only what it needs to reduce context and response time.

WRITEcreate_nfse
Issue an NFS-e (service invoice). Returns the invoice with flowStatus, rpsNumber, and PDF URL once processed.
READget_nfse
Fetch a single NFS-e by id.
DELETEcancel_nfse
Cancel an NFS-e. Some municipalities only allow cancellation within a short window (commonly 30 days).
READlist_nfse
List NFS-e with pagination + optional flowStatus filter.
READemail_nfse
Email the PDF of an already-issued NFS-e to a recipient.
WRITEcreate_nfe
Issue an NF-e (product invoice). Returns the invoice with status, access key (chave), and DANFE URL once authorized.
READget_nfe
Fetch a single NF-e by id.
DELETEcancel_nfe
Cancel an NF-e. Must include a justification of at least 15 characters.

Compatible frameworks

MCP is a protocol β€” any framework that speaks it can mount this server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Any MCP clientProtocol

Frequently asked questions

All credentials are encrypted at rest in an isolated vault scoped per organization. OAuth2 tokens are automatically refreshed before expiry. Your agent code never sees raw secrets β€” it receives scoped, short-lived session tokens.
Servers β€” Every LatAm commerce API your agent needs | CodeSpar