DF-e

io.github.mcp-dir由 GitHub 帳號 mcp-dir 發布v0.1.0更新於 Oct 24, 2026

Brazilian SEFAZ e-invoices (NF-e, CT-e) issued against your company. A1 cert, DANFE PDF.

已驗證Streamable HTTP可網頁執行檔案與儲存金融商業與電商

概覽

AI 產生的概覽

透過貴公司的 A1 憑證從巴西 SEFAZ 拉取開給自家公司的電子稅務文件,並可由 XML 產生 DANFE PDF。

可以做什麼
使用貴公司自己的 A1 數位憑證連接官方 NFeDistribuicaoDFe 網路服務,取得供應商開給自家公司的 NF-e、CT-e 貨運單與事件。工具可列出已連接的稅號、執行增量 NSU 同步(每次最多 50 份文件)、依 NSU 或 44 位存取金鑰查詢單一文件、由 XML 產生 DANFE PDF,並回報本小時剩餘查詢額度。唯讀;不會回傳自家公司開出的發票。
適用情境
適合讓助理追蹤或彙整供應商與貨運商開給貴巴西公司的稅務文件,或產生可列印的 DANFE 檔案。不適用於稽核自家公司開出的發票,那類資料來自貴公司的 ERP。
執行需求
透過 HTTP 存取的遠端 MCP 端點,不需本機執行環境。需要公司自己的 A1 e-CNPJ 憑證(會計師事務所的憑證無效),並依已連接稅號付費訂閱。回傳的資料會傳送給你所選擇的 LLM 服務方。
安裝前請注意
A1 憑證屬敏感憑據,會加密儲存並用於與 SEFAZ 的 TLS 握手。服務在來源端為唯讀,但回傳的稅務資料會傳送給你選擇的 LLM 服務方。SEFAZ 限制每個稅號每小時 20 次查詢,且與其他系統共用;在佇列結束後繼續輪詢會被封鎖一小時。部分文件在收件人確認前僅以摘要形式回傳,不含明細行。

安裝

在 SourceWeft 中

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

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.mcp-dir%2Fdfe-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "df-e": {
      "type": "http",
      "url": "https://api.mcp.ai/p_dfe"
    }
  }
}

README

該儲存庫沒有 README。

工具

12

dfe_list_accounts

Lista os CNPJs conectados neste install (razão social, CNPJ e UF).

輸入參數account

dfe_sincronizar

Puxa os documentos fiscais NOVOS emitidos contra este CNPJ (nota de fornecedor, evento, CT-e) — NFeDistribuicaoDFe. COMO USAR: chame com `ult_nsu: "0"` na primeira vez. A resposta traz `proximo_nsu` — passe ELE na chamada seguinte, sem alterar. Repita até `fim_da_fila: true`. PARE quando `fim_da_fila` for true. Continuar consultando depois disso é o que a SEFAZ pune com bloqueio de 1 hora no CNPJ. Cada documento vem com `completo`: true = XML íntegro da nota (dá para auditar em auditor_fiscal_auditar_nota); false = apenas RESUMO (chave, emitente, valor), que é o que a SEFAZ entrega enquanto o destinatário não fizer a manifestação. ATENÇÃO: este serviço NÃO devolve as notas que VOCÊ emitiu — só as recebidas. Para auditar a própria emissão, pegue o XML no seu ERP (ex.: omie_get_invoice_xml).

輸入參數accountult_nsuforcar_nsu

dfe_consultar_nsu

Busca UM documento específico pelo NSU. Serve para recuperar um item que falhou na descompactação durante a sincronização — não para varrer a fila (isso é dfe_sincronizar).

輸入參數nsu必填account

dfe_consultar_chave

Busca um documento pela chave de acesso de 44 dígitos. LIMITES: só documentos que chegaram ao Ambiente Nacional nos ÚLTIMOS 90 DIAS, e nunca a nota em que este CNPJ é o EMITENTE (a SEFAZ não devolve a própria emissão).

輸入參數chave必填account

dfe_gerar_danfe

Gera o DANFE (o PDF da nota) a partir do XML. A SEFAZ distribui XML, não PDF, então esta é a representação gráfica para imprimir, anexar ou mandar pro cliente. COMO USAR: passe em `xml` o conteúdo do documento que veio em dfe_sincronizar (campo `documentos[].xml`). Assim NÃO gasta consulta na SEFAZ. Se não tiver o XML em mãos, use `chave` ou `nsu` — mas aí gasta uma das consultas da hora. SÓ FUNCIONA com documento `completo: true`. Documento `resumo` não tem os itens, e sem itens não existe DANFE: o XML completo só sai depois da manifestação do destinatário. A resposta traz um link de download em `files[]`, entregue ele ao usuário. Não tente ler o conteúdo do arquivo, é binário.

輸入參數nsuxmlchaveaccount

dfe_orcamento

Quantas consultas ainda cabem nesta hora para este CNPJ, e se ele está bloqueado. Não consome consulta. Chame isto antes de uma carga grande — o limite da SEFAZ é por CNPJ e conta também o que outros sistemas do cliente consultarem.

輸入參數account

show_version

Show Version

Show the current MCP platform and adapter versions.

無需輸入參數。

report_bug

Report Bug

Report a bug, missing feature, or send feedback. Include the conversation array with recent messages for reproduction.

輸入參數contextmessage必填conversation

connect

Connection Status

Returns connection status and URLs. When all providers are connected, returns authenticated:true and empty pending[]. When credentials are missing, returns connect_url for the toolkit and per-install URLs.

無需輸入參數。

toolkit_info

Toolkit Info

Returns the current toolkit state: installed MCPs, their connection status, the accounts connected to each one, and how many catalog tools each exposes.

無需輸入參數。

marketplace

Marketplace

The official mcp.ai marketplace — the in-platform catalog of every MCP/tool, AND the way to run them. Covers capability requests like "find an MCP that does X", "consulta um CPF", "is there a tool for Y". Core flow: action=search discovers MCPs by intent → describe returns one MCP's full profile (every tool with its id + params, pricing, auth) so you pick the right tool_id → invoke RUNS that tool. KEY: invoke works even when the MCP is NOT installed — it runs the tool pontualmente (one-off), without adding the MCP to the toolkit and without bloating the tool list. If the MCP needs a credential/login, invoke returns a connect link; if it is paid and the wallet is empty, invoke returns a checkout/top-up link (the user opens it, then you retry). Use install only to make an MCP PERMANENT in the active toolkit (its tools then show up natively in future sessions); prefer invoke for a single/occasional use. list_tools lists what is callable right now. subscribe/cancel handle per-MCP billing; report_bug sends feedback; request_mcp asks us to build a NEW MCP when nothing fits. Search/describe flag installed_in_toolkit vs installed_in_workspace. Writes (install/uninstall/subscribe/cancel and the one-off install behind invoke) require workspace owner/admin. It also carries the mcp.ai PROMPT LIBRARY, which is about ready-made prompt TEXT rather than MCPs: search_prompts finds one, get_prompt returns its full text with {{variables}} filled, and publish_prompt saves a prompt and returns a shareable mcp.ai/p/<slug> link that opens without login.

輸入參數limitqueryactionmcp_idmessagetool_idargumentsimmediatetier_slugprompt_bodyprompt_slugprompt_tool另有 11 個

authenticate

Authenticate

MCP.AI for IDE agents (Cursor, etc.): log in in the browser, copy the access token. Best: add it to this server's config as a header `Authorization: Bearer <token>` for a permanent, non-expiring connection. Or paste it here for a session-only login: call with { token: "<jwt>" } after the user pastes, or with no args to get the link.

輸入參數token

版本歷史

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

評分

已滿足適用檢查項的 75%

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

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分

    請宣告包含 README 的 GitHub 儲存庫,或在 OAuth 受保護資源後設資料中提供 resource_documentation。

  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。