Basic information
About MCP NFSe Nacional Server
π§π· MCP Server para consultar NFSe no portal nacional (nfse.gov.br). Busque notas, baixe XMLs e PDFs direto do seu AI agent.
MCP NFSe Nacional is a MCP server in the Other category listed in the AddMCP.net directory, published by SamuelMoraesF. Supported transport: stdio. Runtime: node. The repository has 14 GitHub stars. Source code is hosted on github.com. Related topics: brasil, brazil, gov-br, mcp, nfe.
Setup
{
"mcpServers": {
"nfse-nacional": {
"command": "npx",
"args": [
"-y",
"samuelmoraesf/mcp-nfse-nacional"
],
"env": {
"CERT_PASSWORD": "sua_senha_do_certificado",
"CERT_FILE": "caminho/para/seu/certificado.pfx",
"NODE_OPTIONS": "--openssl-legacy-provider"
}
}
}
}
{
"mcpServers": {
"nfse-nacional": {
"command": "npx",
"args": [
"-y",
"samuelmoraesf/mcp-nfse-nacional"
],
"env": {
"CERT_PASSWORD": "sua_senha_do_certificado",
"CERT_FILE": "caminho/para/seu/certificado.pfx",
"NODE_OPTIONS": "--openssl-legacy-provider"
}
}
}
}
{
"servers": {
"nfse-nacional": {
"command": "npx",
"args": [
"-y",
"samuelmoraesf/mcp-nfse-nacional"
],
"env": {
"CERT_PASSWORD": "sua_senha_do_certificado",
"CERT_FILE": "caminho/para/seu/certificado.pfx",
"NODE_OPTIONS": "--openssl-legacy-provider"
}
}
}
}
MCP NFSe Nacional config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"nfse-nacional": {
"command": "npx",
"args": [
"-y",
"samuelmoraesf/mcp-nfse-nacional"
],
"env": {
"CERT_PASSWORD": "sua_senha_do_certificado",
"CERT_FILE": "caminho/para/seu/certificado.pfx",
"NODE_OPTIONS": "--openssl-legacy-provider"
}
}
}
}
MCP NFSe Nacional tools
Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MCP NFSe Nacional?
MCP NFSe Nacional is an MCP (Model Context Protocol) server that enables AI agents to authenticate with an e-CNPJ/e-CPF digital certificate and consult, retrieve details, and download PDFs of Brazilian Electronic Service Invoices (NFSe) from the national portal (nfse.gov.br).
How to use MCP NFSe Nacional?
Install and run via npx with the required environment variables CERT_FILE (path to .pfx/.p12 certificate) and CERT_PASSWORD. Optionally configure MCP_TRANSPORT (stdio or streamable-http) and STORAGE_PATH. The server exposes three tools: nfse_buscar, nfse_detalhes, and nfse_pdf. Docker images are also provided for the streamable-http mode.
Key features of MCP NFSe Nacional
- Three tools: list invoices, get details, download PDFs.
- Automatic authentication with digital certificate.
- Transparent session renewal on authentication errors.
- Supports stdio and streamable-http transport modes.
- Docker image for production deployment.
- Configurable local storage for downloaded XMLs and PDFs.
Use cases of MCP NFSe Nacional
- AI agents retrieving NFSe data for a given date range.
- Automating the download of DANFSe PDFs from the national portal.
- Integrating invoice details into tax compliance workflows.
- Providing LLM-based assistants with access to real fiscal documents.
Frequently asked questions
1 What authentication is required?
The server requires a digital certificate file (.pfx or .p12) and its password. Authentication is handled automatically; if the session expires, the server re-authenticates transparently.
2 What runtime or dependencies are needed?
The server is a Node.js application run via npx. No additional runtime dependencies beyond Node.js are required. For Docker, a pre-built image is available.
3 Where are downloaded files stored?
XMLs and PDFs are saved locally in the directory specified by STORAGE_PATH (defaults to ./storage). The path can be customized via environment variable.
4 Which transport modes are supported?
Two modes: stdio (default, for direct client integration like Claude Desktop or VS Code) and streamable-http (for HTTP-based servers). In HTTP mode, bind address and port are configurable.
5 What security precautions should I take?
The certificate is a critical asset; never version it in Git, restrict file permissions, use environment variables for the password, and do not expose the HTTP server publicly without authentication. Mount the certificate as read-only in Docker.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In