Cte Mdfe MCP
Issue and query Brazilian CT-e and MDF-e transport tax documents via Focus NFe
- Pricing
- Open source
- Platforms
- CLI, self-hosted
- Runs
- Locally
- Version
- 0.1.0
- Listing updated
- today
Similar MCP servers
About Cte Mdfe MCP
Cte Mdfe MCP is an open-source MCP server for freight and logistics. It runs locally on your machine and is started by your AI client.
This server targets Brazilian freight paperwork. CT-e is the electronic transport knowledge document and MDF-e the electronic manifest of fiscal documents. It issues and queries them through the Focus NFe service, so an assistant can handle the document lifecycle from chat.
Six tools cover it: emitir_cte, consultar_cte and cancelar_cte for CT-e, and emitir_mdfe, consultar_mdfe and encerrar_mdfe for MDF-e, including closing an authorized manifest. A Focus NFe account token is required, and an environment variable selects homologacao (testing, the default) or producao. A mock provider can be enabled with no credentials for testing.
It installs with npx for Claude Desktop, is documented in Portuguese and is MIT licensed.
Install
Run in a terminal
claude mcp add cte-mdfe-mcp --env FOCUS_NFE_TOKEN='<FOCUS_NFE_TOKEN>' -- npx -y cte-mdfe-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"cte-mdfe-mcp": {
"command": "npx",
"args": [
"-y",
"cte-mdfe-mcp"
],
"env": {
"FOCUS_NFE_TOKEN": "<FOCUS_NFE_TOKEN>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"cte-mdfe-mcp": {
"command": "npx",
"args": [
"-y",
"cte-mdfe-mcp"
],
"env": {
"FOCUS_NFE_TOKEN": "<FOCUS_NFE_TOKEN>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"cte-mdfe-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"cte-mdfe-mcp"
],
"env": {
"FOCUS_NFE_TOKEN": "<FOCUS_NFE_TOKEN>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"cte-mdfe-mcp": {
"command": "npx",
"args": [
"-y",
"cte-mdfe-mcp"
],
"env": {
"FOCUS_NFE_TOKEN": "<FOCUS_NFE_TOKEN>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"cte-mdfe-mcp": {
"command": "npx",
"args": [
"-y",
"cte-mdfe-mcp"
],
"env": {
"FOCUS_NFE_TOKEN": "<FOCUS_NFE_TOKEN>"
}
}
}
}Using several servers? Build one config file with the MCP config generator.
Configuration
FOCUS_NFE_TOKENToken da conta Focus NFeRequiredFOCUS_NFE_AMBIENTEhomologacao (padrao) ou producao
Tools this server provides (6)
Taken from the project documentation; the running server may differ.
- emitir_cte
- Issues a CT-e electronic transport knowledge document
- consultar_cte
- Queries status and downloads of a CT-e
- cancelar_cte
- Cancels an authorized CT-e
- emitir_mdfe
- Issues an MDF-e electronic manifest
- consultar_mdfe
- Queries status and downloads of an MDF-e
- encerrar_mdfe
- Closes an authorized MDF-e
What it does
- CT-e issuing
- Emit a CT-e electronic transport document.
- CT-e lookup
- Check status and downloads of a CT-e.
- CT-e cancellation
- Cancel an authorized CT-e.
- MDF-e issuing and closing
- Emit a manifest and close an authorized one.
- Test environment default
- Defaults to the homologacao environment.
- Mock mode
- Try the server with PROVIDER=mock and no credentials.
Good for
- Issue a CT-e for a freight shipment from an assistant
- Check the status of a transport document
- Close a manifest after a trip ends
- Test the integration in the Focus NFe sandbox
Pricing
Open source
Free, MIT; Focus NFe account required
Cte Mdfe MCP FAQ
What do I need?
A Focus NFe account token in FOCUS_NFE_TOKEN.
Is production the default?
No. It defaults to homologacao; set FOCUS_NFE_AMBIENTE to producao for real documents.
Can I try it without credentials?
Yes, with PROVIDER set to mock.
What licence is it under?
MIT.
Is Cte Mdfe MCP free?
Yes. Cte Mdfe MCP is open source, so you can use and self-host it for free.
How do I add Cte Mdfe MCP to Claude Code?
Run this command in your terminal: claude mcp add cte-mdfe-mcp --env FOCUS_NFE_TOKEN='<FOCUS_NFE_TOKEN>' -- npx -y cte-mdfe-mcp
What are the best alternatives to Cte Mdfe MCP?
The closest alternatives to Cte Mdfe MCP are Datos Gob Es, Data Europa, Data Cityofchicago, Data Govt Nz and Datos Cl.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.
