Melhor Envio

Finance and commerce

MCP server for Melhor Envio, shipping rates, labels, tracking, agencies.

Your AI app calls the Melhor Envio MCP server, which does the finance and commerce work and sends the result back to the chat.

About Melhor Envio

Melhor Envio is a community MCP server from codespar, filed in our directory under finance and commerce. MCP server for Melhor Envio, shipping rates, labels, tracking, agencies.

Melhor Envio runs on your own machine: your AI app starts it with the command npx -y @codespar/mcp-melhor-envio@0.1.4 and talks to it over standard input and output. It needs MELHOR_ENVIO_TOKEN set before Melhor Envio starts.

Melhor Envio is listed in the official MCP registry as io.github.codespar/mcp-melhor-envio, version 0.1.4.

At a glance

Publisher
codespar (community)
Runs
Locally on your machine
Install from
Node.js package on npm: @codespar/mcp-melhor-envio
Written in
TypeScript
License
MIT
GitHub stars
278
Official MCP registry
io.github.codespar/mcp-melhor-envio

How to set up Melhor Envio

  1. Install Node.js on the machine that runs your AI app, because Melhor Envio starts with npx and downloads its package on first run.
  2. Create MELHOR_ENVIO_TOKEN for Melhor Envio in the connected service's own settings, scoped to the smallest permissions the job needs.
  3. Add Melhor Envio to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Melhor Envio tools to confirm the connection.
  5. Run one read-only task with Melhor Envio first, and keep your app asking before each tool call until the results look right.

Melhor Envio compared with similar servers

  • Mercado Bitcoin by codespar has fewer GitHub stars than Melhor Envio (278 against 278); both are community servers, and both run locally.
  • Matera by codespar has fewer GitHub stars than Melhor Envio (278 against 278); both are community servers, and both run locally.
  • Mercado Libre by codespar has fewer GitHub stars than Melhor Envio (278 against 278); both are community servers, and both run locally.

Before you connect Melhor Envio

  • Give Melhor Envio its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Melhor Envio tool call until you trust what it does with them.
  • Treat text that Melhor Envio fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Melhor Envio on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Melhor Envio

How marketing and sales teams put Melhor Envio to work, by company size. Pick the size closest to yours and start Melhor Envio on one use case.

Small business

  • A small business can ask Melhor Envio which products and customers drive margin, then plan promotions around them.
  • Owners can use Melhor Envio to check refunds, failed payments and churn reasons without opening three dashboards.
  • Melhor Envio runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Ecommerce teams can connect Melhor Envio to tie campaigns to orders and revenue, not just clicks.
  • Marketing and finance can use Melhor Envio to check spend against budget each week and move money to what's working.
  • Start Melhor Envio on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises should keep Melhor Envio read-only for agents, with any money movement handled by people and existing approvals.
  • Large commerce teams can use Melhor Envio to answer revenue questions by channel and region with figures finance signs off on.
  • Melhor Envio is a community server, so have security review the code and pin a version before Melhor Envio touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Melhor Envio README

From codespar/mcp-dev-latam on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

@codespar/mcp-melhor-envio

MCP server for Melhor Envio, shipping aggregator with multi-carrier rate comparison

Quick Start

Claude Desktop

Add to ~/.config/claude/claude_desktop_config.json:

{
  "mcpServers": {
    "melhor-envio": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-melhor-envio"],
      "env": {
        "MELHOR_ENVIO_TOKEN": "your-token",
        "MELHOR_ENVIO_SANDBOX": "true"
      }
    }
  }
}
Claude Code
claude mcp add melhor-envio -- npx @codespar/mcp-melhor-envio
Cursor / VS Code

Add to .cursor/mcp.json or .vscode/mcp.json:

{
  "servers": {
    "melhor-envio": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-melhor-envio"],
      "env": {
        "MELHOR_ENVIO_TOKEN": "your-token",
        "MELHOR_ENVIO_SANDBOX": "true"
      }
    }
  }
}

Tools (18)

Tool Purpose
calculate_shipping Calculate shipping rates from multiple carriers
create_shipment Create a shipment order
track_shipment Track a shipment by order ID
generate_label Generate shipping label for an order
list_agencies List carrier pickup agencies near a location
cancel_shipment Cancel a shipment order
get_balance Get current account balance
add_cart Add shipment orders to cart for batch checkout
checkout_cart Checkout all items in the cart and pay
preview_label Preview a shipping label before generating
print_label Print/download label PDF
get_shipment Get shipment order details by ID
list_shipments List all shipment orders with filters
get_store Get store/company information
search_agencies Search pickup agencies by service and location
create_address Create a stored address for sender/recipient
list_services_available List available shipping services for a route
get_tracking_history Get complete tracking history with events

Authentication

Melhor Envio uses a Bearer token for authentication.

Sandbox / Testing

Melhor Envio provides a sandbox at sandbox.melhorenvio.com.br. Set MELHOR_ENVIO_SANDBOX=true to use it.

Get your credentials
  1. Go to Melhor Envio
  2. Create an account
  3. Navigate to API settings and generate a token
  4. Set the MELHOR_ENVIO_TOKEN environment variable

Environment Variables

Variable Required Description
MELHOR_ENVIO_TOKEN Yes Bearer token from Melhor Envio
MELHOR_ENVIO_SANDBOX No Set to "true" for sandbox mode

Roadmap

v0.2 (planned)
  • create_store, Create a store in Melhor Envio
  • update_store, Update store details
  • get_receipt, Get shipping receipt/label
  • list_companies, List available shipping companies
  • get_invoice, Get invoice for a shipment
v0.3 (planned)
  • batch_shipments, Create multiple shipments in a single request
  • detailed_reports, Generate detailed shipping reports
  • webhook_management, Register, list, and delete webhooks

Want to contribute? Open a PR or request a tool.

Links

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

Questions about Melhor Envio

What is the Melhor Envio MCP server?

MCP server for Melhor Envio, shipping rates, labels, tracking, agencies. Melhor Envio is maintained by codespar on GitHub at codespar/mcp-dev-latam, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Melhor Envio MCP server?

Add Melhor Envio to your AI app's MCP config with the command npx -y @codespar/mcp-melhor-envio@0.1.4. In Claude Code, run claude mcp add --transport stdio codespar-melhor-envio -- npx -y @codespar/mcp-melhor-envio@0.1.4. To run Melhor Envio this way you need Node.js installed.

Does Melhor Envio need an API key?

Yes. Melhor Envio expects MELHOR_ENVIO_TOKEN to be set. Create the key for Melhor Envio in the connected service's own settings, give it the smallest permissions the job needs, and keep it out of shared config files.

Is Melhor Envio an official MCP server?

No. Melhor Envio is a community server maintained by codespar. Community servers can be excellent; read the code and the open issues before you give Melhor Envio access to company data.

What license is Melhor Envio under?

Melhor Envio is released under the MIT license, according to its GitHub repository. The license covers the code of Melhor Envio; the service it connects to has its own terms.