mcp-melhor-envio — Claude Code MCP server: setup
Connects an agent to Melhor Envio for carrier rates, shipment orders, labels, agencies, and tracking. It fits delivery workflows that need API access.
claude mcp add mcp-melhor-envio -e MELHOR_ENVIO_TOKEN=<MELHOR_ENVIO_TOKEN> -- npx -y @codespar/mcp-melhor-envioWhat mcp-melhor-envio does
mcp-melhor-envio connects an agent to Melhor Envio, a shipping service that compares carrier rates. Its tools can price a route, create or cancel shipment orders, retrieve order details, and follow a shipment by its ID.
The server also covers label previews and downloads, pickup-agency searches, stored addresses, available services, tracking history, account balance, and cart checkout. It runs through npx and authenticates with the Bearer token stored in MELHOR_ENVIO_TOKEN.
For testing, set MELHOR_ENVIO_SANDBOX=true to use the Melhor Envio sandbox. Without MELHOR_ENVIO_TOKEN, authentication will fail.
What it helps with
- compare carrier rates for a route
- create a shipment order
- track a shipment by order ID
- generate and download a label PDF
- find nearby carrier pickup agencies
Example prompts for the agent
- Compare shipping prices and available services for the sender and recipient addresses.
- Create a shipment, add it to the cart, and prepare the checkout.
- Show the full tracking history for this order ID and produce its label PDF.
How to install mcp-melhor-envio
Platform CLI
claude mcp add mcp-melhor-envio -e MELHOR_ENVIO_TOKEN=<MELHOR_ENVIO_TOKEN> -- npx -y @codespar/mcp-melhor-envioReplace <…> with your own values
Platform CLI
codex mcp add melhor-envio --env MELHOR_ENVIO_TOKEN=<MELHOR_ENVIO_TOKEN> -- npx -y @codespar/mcp-melhor-envioReplace <…> with your own values
Config file
{
"mcpServers": {
"melhor-envio": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-melhor-envio"
],
"env": {
"MELHOR_ENVIO_TOKEN": "<MELHOR_ENVIO_TOKEN>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"melhor-envio": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@codespar/mcp-melhor-envio"
],
"env": {
"MELHOR_ENVIO_TOKEN": "<MELHOR_ENVIO_TOKEN>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e MELHOR_ENVIO_TOKEN=<MELHOR_ENVIO_TOKEN> melhor-envio npx -y @codespar/mcp-melhor-envioReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-melhor-envio
How do I install mcp-melhor-envio in Claude Code?
Run claude mcp add mcp-melhor-envio -e MELHOR_ENVIO_TOKEN=<MELHOR_ENVIO_TOKEN> -- npx -y @codespar/mcp-melhor-envio.
What does mcp-melhor-envio do?
It gives an agent Melhor Envio tools for rate calculation, shipment orders, labels, pickup agencies, and tracking.
What is required for the server to work?
You need a Melhor Envio Bearer token in MELHOR_ENVIO_TOKEN. Set MELHOR_ENVIO_SANDBOX=true when using the test environment.