Skip to main content
NF

NFe.io

v0.2.1API Key

Emissão de NF-e/NFS-e como serviço — sem instalação de certificado, sem montagem de XML. Empresas, webhooks e CC-e (Carta de Correção) inclusos. Acesso à URL completa do doc pra DANFE, PDFs e XMLs.

22 ferramentas2 env vars🇧🇷 Brasilestável no npm

O que seu agente faz

O NFe.io dá ao seu agente 22 tools que ele chama direto — escolha as que precisar, no Claude, Cursor ou qualquer cliente MCP.

  • create_nfseIssue an NFS-e (service invoice). Returns the invoice with flowStatus, rpsNumber, and PDF URL once processed.
  • get_nfseFetch a single NFS-e by id.
  • cancel_nfseCancel an NFS-e. Some municipalities only allow cancellation within a short window (commonly 30 days).
Exemplo de chamada
// Your agent calls a tool directly — no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("create_nfse", { /* ... */ });

Instalar

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

Quickstart

Adicione esta entrada ao seu claude_desktop_config.json (ou a config de qualquer cliente compatível com MCP).

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

Depois de reiniciar, seu agente pode chamar qualquer uma das 22 ferramentas abaixo — teste create_nfse primeiro.

Variáveis de ambiente · 2

Necessárias pra autenticar o server. Armazenadas criptografadas ao usar a hospedagem gerenciada da CodeSpar.

NFEIO_API_KEY
obrigatóriosecret

API key for NFe.io (issuance + query)

NFEIO_COMPANY_ID
opcional

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

Ferramentas disponíveis · 22

Cada ferramenta é independente — seu agente carrega só o que precisa pra reduzir contexto e tempo de resposta.

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.

Frameworks compatíveis

MCP é um protocolo — qualquer framework que o fale pode montar este server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Qualquer cliente MCPProtocolo

Perguntas frequentes

Rode `npx -y @codespar/mcp-nfe-io` e adicione o bloco de config acima ao seu cliente MCP — Claude, Cursor, VS Code ou qualquer cliente compatível com MCP. Sem build, sem SDK. Prefere hospedado? O tier gerenciado da CodeSpar roda pra você, com a auth resolvida.
NFe.io — MCP server · 22 tools | CodeSpar