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 分