mcpField
C
cte-mdfe-mcp

cte-mdfe-mcp

Local
github.com/FAVIOSENGERFinance0Updated 2w ago

About cte-mdfe-mcp

cte-mdfe-mcp gives AI agents access to issuing and querying Brazil's CT-e and MDF-e transport documents through Focus NFe. Its tools also support canceling authorized CT-e documents and closing authorized MDF-e documents.

Key features

  1. 01Issue CT-e documents
  2. 02Check CT-e status and downloads
  3. 03Cancel authorized CT-e documents
  4. 04Issue MDF-e documents
  5. 05Check MDF-e status and downloads
  6. 06Close authorized MDF-e documents

Use cases

  1. 01Issue CT-e for Brazilian transport operations
  2. 02Check CT-e status and download documents
  3. 03Cancel an authorized CT-e
  4. 04Close an authorized MDF-e

MCP support

The MCP server exposes tools for AI agents to issue, query, and manage CT-e and MDF-e through Focus NFe.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"faviosenger-cte-mdfe": {
"command": "npx",
"args": [
"-y",
"cte-mdfe-mcp"
],
"env": {
"FOCUS_NFE_TOKEN": "<FOCUS_NFE_TOKEN>",
"FOCUS_NFE_AMBIENTE": "<FOCUS_NFE_AMBIENTE>"
}
}
}
}
Run commandnpx -y cte-mdfe-mcp
Environment variables to set
FOCUS_NFE_TOKENSecretToken da conta Focus NFe
FOCUS_NFE_AMBIENTEhomologacao (padrao) ou producao

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmcte-mdfe-mcp0.1.0

Tools

6

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
refstringYesUnique document identifier
dadosobjectYesCT-e fiscal data in the provider's format

Details

From the project README

cte-mdfe-mcp

npm version

Emissao e consulta de CT-e e MDF-e (documentos fiscais de transporte) no Brasil para agentes de IA, via Focus NFe.

Instalação (Claude Desktop)

{
  "mcpServers": {
    "cte-mdfe-mcp": {
      "command": "npx",
      "args": ["-y", "cte-mdfe-mcp"],
      "env": {
        "FOCUS_NFE_TOKEN": "...",
        "FOCUS_NFE_AMBIENTE": "..."
      }
    }
  }
}

Teste sem credencial: "env": { "PROVIDER": "mock" }.

Ferramentas

  • emitir_cte — Emite um CT-e (Conhecimento de Transporte eletronico)
  • consultar_cte — Consulta status e downloads de um CT-e
  • cancelar_cte — Cancela um CT-e autorizado
  • emitir_mdfe — Emite um MDF-e (Manifesto de Documentos Fiscais eletronico)
  • consultar_mdfe — Consulta status e downloads de um MDF-e
  • encerrar_mdfe — Encerra um MDF-e autorizado

Licença

MIT © Favio Senger

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.