Mcp Nfe Io

io.github.codespar由 GitHub 账号 codespar 发布v0.2.2更新于 Oct 24, 2026

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

概览

AI 生成的概览

面向 NFe.io 的本地 MCP 服务器,让助手开具、查询、取消和邮件发送巴西 NF-e 与 NFS-e 税务单据,并查询 CNPJ 和 CEP 信息。

可以做什么
开具、获取、列出、取消并邮件发送 NFS-e 服务发票,并获取其 PDF 与 XML 链接。开具、获取、列出并取消 NF-e 商品发票,获取 DANFE PDF 与 XML 链接,并为已授权发票提交更正函。按 CNPJ 查询巴西公司资料,并将 CEP 邮编解析为完整地址。列出、获取并在 NFe.io 账户上创建公司。列出、注册和删除用于发票事件回调的 webhook 端点。
适用场景
当助手需要通过 NFe.io 处理巴西税务单据时适用,例如创建或取消发票、查看发票状态、获取 PDF 与 XML,或用 CNPJ 和 CEP 查询补全记录。
运行要求
通过 npx 从 npm 包在本地运行,需要 Node.js。需要 NFe.io 账户和 NFEIO_API_KEY 环境变量;NFEIO_COMPANY_ID 可选,用于设置默认公司。需要访问 NFe.io API 主机的网络。演示模式可在无网络时返回预设响应。
安装前请注意
API 密钥可对 NFe.io 账户进行发票开具和查询,请勿放入共享配置。相关工具会创建、取消和邮件发送真实税务单据、创建公司以及注册或删除 webhook,会改变账户状态并可能带来法律或财务后果。邮件发送发票会把 PDF 发给会话之外的收件人。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Nfe Io,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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

来源:packages/fiscal/nfe-io/README.md,提交 d0a519a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分