Skip to main content
ME

Melhor Envio

v0.1.3OAuth2

Multi-carrier shipping: quote Correios, Jadlog, Loggi, and 10+ carriers. Generate labels, track packages, and manage agencies.

18 tools1 env varsπŸ‡§πŸ‡· Brazilstable on npm

What your agent can do

Melhor Envio gives your agent 18 tools it calls directly β€” pick the ones it needs, in Claude, Cursor, or any MCP client.

  • calculate_shipping β€” Calculate shipping rates from multiple carriers
  • create_shipment β€” Create a shipment order
  • track_shipment β€” Track a shipment by order ID
Example call
// Your agent calls a tool directly β€” no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("calculate_shipping", { /* ... */ });

Install

terminal
$ npm install @codespar/mcp-melhor-envio

Quickstart

Add this entry to your claude_desktop_config.json (or any MCP-compatible client config).

claude_desktop_config.json
{
  "mcpServers": {
    "melhor-envio": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-melhor-envio"
      ],
      "env": {
        "MELHOR_ENVIO_TOKEN": "<your_melhor_envio_token>"
      }
    }
  }
}

After restart, your agent can call any of the 18 tools below β€” try calculate_shipping first.

Environment variables Β· 1

Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.

MELHOR_ENVIO_TOKEN
requiredsecret

API key for melhor-envio

Available tools Β· 18

Each tool is independent β€” your agent loads only what it needs to reduce context and response time.

READcalculate_shipping
Calculate shipping rates from multiple carriers
WRITEcreate_shipment
Create a shipment order
WRITEtrack_shipment
Track a shipment by order ID
WRITEgenerate_label
Generate shipping label for an order
READlist_agencies
List carrier pickup agencies near a location
DELETEcancel_shipment
Cancel a shipment order
READget_balance
Get current account balance
WRITEadd_cart
Add shipment orders to cart for batch checkout

Compatible frameworks

MCP is a protocol β€” any framework that speaks it can mount this server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Any MCP clientProtocol

Frequently asked questions

Run `npx -y @codespar/mcp-melhor-envio` and add the config block above to your MCP client β€” Claude, Cursor, VS Code, or any MCP-compatible client. No build step, no SDK required. Prefer hosted? CodeSpar's managed tier runs it for you with auth handled.
Melhor Envio β€” MCP server Β· 18 tools | CodeSpar