Mcp Nuvem Fiscal

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

MCP server for Nuvem Fiscal — NF-e, NFS-e, NFC-e, CNPJ, CEP

已驗證STDIO僅桌面金融商業與電商

概覽

AI 產生的概覽

針對 Nuvem Fiscal 的本機 MCP 伺服器,讓助理開立、查詢與取消巴西電子稅務單據,並查詢 CNPJ 與 CEP 資料。

可以做什麼
建立、查詢與取消 NF-e、NFS-e、NFC-e、CT-e 與 MDF-e 稅務單據,包括關閉 MDF-e、查詢 NF-e 批次狀態與事件。為 NF-e 與 CT-e 送出更正函(CCe)。依 CNPJ 查詢公司資料,依 CEP 查詢地址。註冊公司並為其上传 A1 數位憑證。列出帳戶中已註冊的公司。
適用情境
適合需要助理透過 Nuvem Fiscal 處理巴西稅務與開立發票流程的情境:開立或取消稅務單據、送出更正函,或查詢 CNPJ 與 CEP 資料。在接觸真實稅務系統前,先在 homologation 環境或示範模式測試。
執行需求
透過 npx 在本機執行(需要 Node.js)。需要 Nuvem Fiscal 帳戶與 OAuth2 用戶端憑證,透過環境變數 NUVEM_FISCAL_CLIENT_ID 與 NUVEM_FISCAL_CLIENT_SECRET 提供;需要連線至 Nuvem Fiscal API 的網路。設定 MCP_DEMO=true 或 --demo 可離線執行示範模式。
安裝前請注意
此伺服器可建立、取消與更正真實稅務單據並註冊公司,操作失誤會影響實際稅務紀錄,建議先在 homologation 環境或示範模式試用。它涉及 OAuth2 用戶端憑證與 A1 數位憑證(.pfx)等敏感機密。單據資料會傳送至 Nuvem Fiscal API。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

@codespar/mcp-nuvem-fiscal

MCP server for Nuvem Fiscal — NFe, NFSe, NFCe fiscal document emission and CNPJ/CEP lookup

[npm] [License: MIT]

Quick Start

Claude Desktop

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

json
{  "mcpServers": {    "nuvem-fiscal": {      "command": "npx",      "args": ["-y", "@codespar/mcp-nuvem-fiscal"],      "env": {        "NUVEM_FISCAL_CLIENT_ID": "your-client-id",        "NUVEM_FISCAL_CLIENT_SECRET": "your-client-secret"      }    }  }}

Claude Code

bash
claude mcp add nuvem-fiscal -- npx @codespar/mcp-nuvem-fiscal

Cursor / VS Code

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

json
{  "servers": {    "nuvem-fiscal": {      "command": "npx",      "args": ["-y", "@codespar/mcp-nuvem-fiscal"],      "env": {        "NUVEM_FISCAL_CLIENT_ID": "your-client-id",        "NUVEM_FISCAL_CLIENT_SECRET": "your-client-secret"      }    }  }}

Tools (24)

ToolPurpose
create_nfeCreate a NF-e (nota fiscal eletrônica)
get_nfeGet NF-e details by ID
cancel_nfeCancel a NF-e
create_nfseCreate a NFS-e (nota fiscal de serviço eletrônica)
get_nfseGet NFS-e details by ID
cancel_nfseCancel a NFS-e
create_nfceCreate a NFC-e (nota fiscal de consumidor eletrônica)
consult_cnpjConsult company data by CNPJ number
consult_cepConsult address by CEP (postal code)
register_companyRegister a company in Nuvem Fiscal
create_cteCreate a CT-e (conhecimento de transporte eletrônico)
get_cteGet CT-e details by ID
cancel_cteCancel a CT-e
create_mdfeCreate a MDF-e (manifesto de documentos fiscais eletrônico)
get_nfe_eventsGet events for a NF-e (cancellations, corrections, etc.)
cancel_nfceCancel a NFC-e (nota fiscal de consumidor eletrônica)
send_correction_letter_nfeSend a carta de correção eletrônica (CCe) for a NF-e.
send_correction_letter_cteSend a carta de correção for a CT-e.
get_nfe_batchGet NF-e batch (lote) status by batch ID.
get_mdfeGet MDF-e details by ID
cancel_mdfeCancel a MDF-e (manifesto)
close_mdfeClose (encerrar) a MDF-e at route end.
list_empresasList all companies (empresas) registered in the account.
upload_certificateUpload or update an A1 digital certificate (.pfx, base64) for an empresa.

Authentication

Nuvem Fiscal uses OAuth2 client credentials. The server automatically manages token refresh.

Sandbox / Testing

Nuvem Fiscal supports a homologation environment (ambiente=2) for testing fiscal document emission without affecting real tax systems.

Demo Mode

Set MCP_DEMO=true (or pass --demo) to run the server without contacting the Nuvem Fiscal API. In MCP_DEMO=true mode, create_nfse issues distinct fixture IDs per call within one process and echoes input servico.codigo, valor, and servico.descricao into the response. pdf_url is templated from the fixture id. Other demo tools return static fixtures and are useful for offline walkthroughs and integration smoke tests.

Get your credentials

  1. Go to Nuvem Fiscal Developer Portal
  2. Create an account
  3. Register an application to get OAuth2 credentials
  4. Set the environment variables

Environment Variables

VariableRequiredDescription
NUVEM_FISCAL_CLIENT_IDYesOAuth2 client ID
NUVEM_FISCAL_CLIENT_SECRETYesOAuth2 client secret

Roadmap

v0.2 (planned)

  • create_cte — Create a CT-e (electronic transport document)
  • get_cte — Get CT-e details by ID
  • cancel_cte — Cancel an issued CT-e
  • create_mdfe — Create an MDF-e (electronic freight manifest)
  • get_nfe_events — Get events for an NF-e (cancellation, correction, etc.)

v0.3 (planned)

  • batch_nfe — Create multiple NF-e in a single request
  • get_nfe_danfe — Get DANFE PDF for an NF-e
  • manifest_recipient — Manifest recipient awareness of an NF-e

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/nuvem-fiscal/README.md,提交 d0a519a

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

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

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分