Mcp Focus Nfe

io.github.codespar由 GitHub 帳號 codespar 發布v0.2.2更新於 Oct 24, 2026

MCP server for Focus NFe — NFe, NFSe, NFCe emission and management

概覽

AI 產生的概覽

針對 Focus NFe 的本機 MCP 伺服器,讓助理開立、查詢與取消巴西電子稅務單據(NFe、NFSe、NFCe、CTe、MDFe)並管理 webhook。

可以做什麼
建立、查詢與取消 NFe 發票,包含取得 PDF(DANFE)連結與送出更正函(CCe)。建立、查詢與取消 NFSe 服務發票與 NFCe 消費者發票。建立、查詢與取消 CTe 運輸單據,並建立或關閉 MDFe 貨運清單。註冊、列出與刪除在稅務單據事件發生時通知指定網址的 webhook。
適用情境
適合讓助理協助巴西企業透過 Focus NFe 開立或追蹤電子稅務單據,或把單據事件接到 webhook,而不必離開對話。建議先在 homologation 沙箱環境測試,再處理真實單據。
執行需求
透過 npm 套件 @codespar/mcp-focus-nfe 以 npx 在本機執行,需要 Node.js。需要 Focus NFe 帳號與 API 權杖,透過環境變數 FOCUS_NFE_TOKEN 提供;選用環境變數 FOCUS_NFE_SANDBOX 設為 true 可切換至 homologation 環境。需要能連線至 Focus NFe 的網路。
安裝前請注意
此伺服器持有可開立與取消真實稅務單據的 Focus NFe API 權杖,請勿放入共用設定。多個工具會寫入或變更資料:建立、取消與更正單據,以及註冊或刪除 webhook。已開立的稅務單據具有法律與稅務後果,請先在沙箱試用,並在對正式環境執行前確認操作。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp Focus Nfe,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@codespar/mcp-focus-nfe

MCP server for Focus NFe — NFe, NFSe, and NFCe fiscal document emission

[npm] [License: MIT]

Quick Start

Claude Desktop

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

json
{  "mcpServers": {    "focus-nfe": {      "command": "npx",      "args": ["-y", "@codespar/mcp-focus-nfe"],      "env": {        "FOCUS_NFE_TOKEN": "your-token",        "FOCUS_NFE_SANDBOX": "true"      }    }  }}

Claude Code

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

Cursor / VS Code

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

json
{  "servers": {    "focus-nfe": {      "command": "npx",      "args": ["-y", "@codespar/mcp-focus-nfe"],      "env": {        "FOCUS_NFE_TOKEN": "your-token",        "FOCUS_NFE_SANDBOX": "true"      }    }  }}

Tools (19)

ToolPurpose
create_nfeCreate and emit an NFe (nota fiscal eletronica)
get_nfeGet NFe details and status by reference
cancel_nfeCancel an authorized NFe (within 24h of emission)
get_nfe_pdfGet NFe PDF (DANFE) download URL
send_correction_letterSend a correction letter (Carta de Correcao / CCe) for an authorized NFe
create_nfseCreate and emit an NFSe (nota fiscal de servico)
get_nfseGet NFSe details and status by reference
cancel_nfseCancel an authorized NFSe
create_nfceCreate and emit an NFCe (nota fiscal do consumidor eletronica)
get_nfceGet NFCe details and status by reference
cancel_nfceCancel an authorized NFCe
create_cteCreate and emit a CTe (conhecimento de transporte eletronico) for cargo transport
get_cteGet CTe details and status by reference
cancel_cteCancel an authorized CTe
create_mdfeCreate and emit an MDFe (manifesto eletronico de documentos fiscais) for cargo transport manifest
close_mdfeClose/finalize an MDFe (encerramento) after trip completion
register_webhookRegister a webhook trigger (gatilho) that notifies your URL when fiscal document events occur
list_webhooksList all registered webhooks (gatilhos)
delete_webhookDelete a registered webhook by ID

Authentication

Focus NFe uses Basic Auth with the API token as username and empty password.

Sandbox / Testing

Focus NFe provides a homologation environment at homologacao.focusnfe.com.br. Set FOCUS_NFE_SANDBOX=true to use it.

Get your credentials

  1. Go to Focus NFe
  2. Create an account
  3. Get your API token from the dashboard
  4. Set the FOCUS_NFE_TOKEN environment variable

Environment Variables

VariableRequiredDescription
FOCUS_NFE_TOKENYesAPI token from Focus NFe
FOCUS_NFE_SANDBOXNoSet to "true" for homologation mode

Roadmap

v0.2 (planned)

  • create_cte — Create a CT-e (electronic transport document)
  • get_cte — Get CT-e details by ID
  • correction_letter — Issue a correction letter for an NF-e
  • manifest_recipient — Manifest recipient awareness of an NF-e
  • get_nfse_pdf — Get PDF for a service invoice (NFS-e)

v0.3 (planned)

  • batch_nfe — Create multiple NF-e in a single request
  • batch_nfse — Create multiple NFS-e in a single request

Want to contribute? Open a PR or request a tool.

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.

License

MIT

來源:packages/fiscal/focus-nfe/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 分