DF-e
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DF-eSync the new supplier invoices issued against my company."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DF-e
DF-e MCP, the invoices your suppliers issued against your Brazilian company
Pulls the electronic fiscal documents issued against your Brazilian company (supplier invoices, CT-e freight bills and events) straight from SEFAZ, through the official NFeDistribuicaoDFe web service, using your own A1 digital certificate. Incremental NSU sync with query-budget control so your tax ID never gets blocked. It also renders the DANFE PDF from the XML, which is the printable document, since SEFAZ distributes XML and not PDF. Read-only. Not affiliated with SEFAZ or the Brazilian Federal Revenue Service.
📥 The invoices that came IN, not the ones you issued — everything suppliers and carriers issued against your tax ID, straight from SEFAZ
🔐 Your own A1 certificate, no middleman — the SEFAZ handshake uses your company's own e-CNPJ, encrypted at rest
🔁 Incremental NSU sync — each call brings up to 50 documents and the next one resumes where it stopped, until the queue ends
🚦 It will not get your tax ID blocked — SEFAZ enforces a 1-hour block on whoever keeps polling past the end of the queue, and one tool just reports the hour's remaining budget
🧾 DANFE PDF from the XML — the printable representation SEFAZ does not distribute, rendered without spending a query
💬 Works with any MCP client: Claude Desktop, ChatGPT, Cursor, VS Code, Cline, Continue
Versão em português · Full docs (PT-BR) · Agent skill
One-click install
Claude (Web and Desktop)
Anthropic unified MCP installation at claude.ai/customize/connectors. The same link works for Claude Web and Claude Desktop (just be logged in):
Manual (if the deeplink does not open): claude.ai/customize/connectors → + → Add custom connector → paste Name DF-e and URL https://api.mcp.ai/p_dfe.
Cursor
VS Code (Copilot Chat)
ChatGPT, Manus, OpenClaw and 40+ other clients
Works with any MCP client that speaks MCP over HTTP. The server URL is always:
https://api.mcp.ai/p_dfePer-client details: INSTALL.md.
Related MCP server: Receita Federal: NFS-e
Example prompts
Sync the new fiscal documents for my company
How many SEFAZ queries do I have left this hour?
Which supplier invoices came in this week, and from whom?
Fetch the invoice with access key 3526...
Render the DANFE PDF for the invoices I just synced
What is the total of the inbound invoices that arrived this month?6 tools available
Tool | Description |
| Lista os CNPJs conectados neste install (razão social, CNPJ e UF). |
| Puxa os documentos fiscais NOVOS emitidos contra este CNPJ (nota de fornecedor, evento, CT-e) — NFeDistribuicaoDFe. |
| Busca UM documento específico pelo NSU. |
| Busca um documento pela chave de acesso de 44 dígitos. |
| Gera o DANFE (o PDF da nota) a partir do XML. |
| Quantas consultas ainda cabem nesta hora para este CNPJ, e se ele está bloqueado. |
Details for each tool: docs/ferramentas.md (PT-BR)
What you can ask
Area | Coverage |
Connections | The tax IDs connected to this install, with company name and state |
Sync | Incremental NSU queue: supplier NF-e, CT-e freight bills and events issued against the company |
Single document | Lookup by NSU (to recover an item that failed) or by the 44-digit access key |
DANFE | The invoice PDF rendered from the XML, delivered as a download link |
Budget | How many queries are left this hour and whether the tax ID is blocked |
Three honest notes before you subscribe
It does not return the invoices YOUR company issued. The distribution service hands the recipient what was issued against them; technical note 2014.002 excludes the issuer explicitly. To audit your own output, the XML comes from your ERP.
Without recipient acknowledgement, many documents arrive as a SUMMARY only. SEFAZ releases the access key, the issuer and the amount, and only unlocks the full XML (with line items) after the recipient acknowledges the invoice. No line items means no DANFE and no line-by-line audit. That acknowledgement is not issued by this MCP yet.
The query limit belongs to SEFAZ and is per tax ID. It is 20 queries per hour, shared with any other system querying the same company (your ERP, your accountant). That is why one tool does nothing but report the hour's budget, and why the sync stops on its own at the end of the queue.
Pricing
Billed per connected account. See docs/precos.md (PT-BR).
Privacy & data protection
Read-only, no tool changes data at the source.
Sub-processors: the LLM host you choose (Claude, ChatGPT, Cursor, your own agent). Full list in docs/privacidade-lgpd.md.
Data returned by the tools is sent to the LLM host you choose, a sub-processor outside our control. We recommend plans with training opt-out.
FAQ
Is this an official SEFAZ or Federal Revenue service? No. This is an independent MCP that talks to the public NFeDistribuicaoDFe web service using your own company's digital certificate. It is not affiliated with SEFAZ or the Brazilian Federal Revenue Service and implies no official relationship. The names are used nominatively, to say where the data comes from.
Does it return the invoices my company issued? No, and that is a SEFAZ limit rather than ours: the distribution service hands the recipient what was issued against them, and technical note 2014.002 excludes the issuer. For your own output, the XML lives in your ERP.
Why do some documents arrive without line items?
Because SEFAZ only unlocks the full XML after the recipient acknowledges the invoice. Until then it delivers a summary: access key, issuer and amount. Each document carries completo: true/false so you know which of the two you got. Since the DANFE needs the line items, it is rendered only from the full XML.
Can I use my accountant's certificate? It will not work. SEFAZ matches the certificate holder against the queried tax ID, so you need the A1 e-CNPJ of the company itself. An accounting firm connects one tax ID per client, each with that client's own certificate.
Could this get my tax ID blocked? The risk is real and it comes from the SEFAZ rule: 20 queries per hour per tax ID, and polling past the end of the queue earns a 1-hour block. The MCP stops on its own when the queue ends, and one tool reports the remaining budget without spending a query. What it cannot control is what your other systems query against the same tax ID, because the limit is shared.
Can I fetch an older invoice by its access key? Yes, as long as it reached the national environment within the last 90 days, which is the SEFAZ window for key lookups. Outside it, the incremental NSU queue is the way.
Where does my certificate live? Encrypted at rest, and used only for the TLS handshake with SEFAZ. There is no third party in the path: the certificate hitting SEFAZ is your company's. The captured XMLs are returned to the caller and are not stored by us beyond operational logs.
How is it billed? Per connected tax ID, with unlimited documents. The tax ID is the axis because it is what consumes the SEFAZ query budget; how many invoices your company receives does not change our cost, so charging for that would make no sense. Current pricing at mcp.ai/dfe.
Support
License
MIT — see LICENSE. The MCP server at api.mcp.ai/p_dfe is proprietary (hosted); this repo (manifests, docs, skills) is MIT.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables consulting Brazilian electronic invoices (NFE) from official Receita Federal sources through a read-only MCP tool.MIT
- AlicenseNot gradedqualityCmaintenanceAllows consultation of NFS-e (electronic service invoices) from the Brazilian Federal Revenue official source, with a single read-only tool.MIT
- AlicenseNot gradedqualityCmaintenanceMCP server to query details of received electronic service invoices (NFS-e) from the Brazilian Federal Revenue. Read-only, no credentials required, pay-per-use with prepaid credits.MIT
- AlicenseNot gradedqualityCmaintenanceQueries official Brazilian federal received electronic invoices (NFS-e) via a hosted, read-only MCP server with prepaid credits, requiring no platform credentials.MIT
Related MCP Connectors
Brazilian fiscal MCP server - issue NF-e, NFC-e, NFS-e, CT-e, MDF-e and DC-e via SEFAZ.
Receita Federal: NFE, official-source lookup. Platform-hosted, pay per query with prepaid credit.
Looks up the full data of an electronic invoice (NFe) from the access key. Platform-hosted, no crede
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mcp-dir/dfe-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server