mcpField
M
mcp-correios

mcp-correios

Local
github.com/codesparMaps & Travel275Updated 4w ago

About mcp-correios

mcp-correios is an MCP server for Correios, the Brazilian postal service, offering 21 tools for tracking, shipping rates, CEP lookup and posting. It is an alpha release whose endpoints have not been fully live-validated.

Key features

  1. 01Package tracking with bulk queries up to 50 codes
  2. 02Shipping rate and delivery time calculation
  3. 03CEP address lookup with batch support up to 20
  4. 04Pre-posting, label requests and PLP posting
  5. 05Collection scheduling and reverse logistics orders

Use cases

  1. 01Tracking multiple Correios packages for an e-commerce seller
  2. 02Estimating shipping cost and delivery time between two CEPs
  3. 03Creating pre-posting orders or return requests for shipments

MCP support

This is an MCP server that exposes Correios tools to MCP clients. The server handles the Basic Auth to Bearer token flow automatically.

Configuration

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

mcp.json · Universal config
{
"mcpServers": {
"codespar-mcp-correios": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-correios"
],
"env": {
"CORREIOS_TOKEN": "<CORREIOS_TOKEN>"
}
}
}
}
Run commandnpx -y @codespar/mcp-correios
Environment variables to set
CORREIOS_TOKENSecretAPI key for correios

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
npm@codespar/mcp-correios0.2.0-alpha.3

Tools

21

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
codestringYesTracking code (e.g. SS987654321BR)

Details

From the project README

@codespar/mcp-correios

Alpha release — published under the alpha npm dist-tag. Endpoint paths follow public docs and BACEN/provider conventions but have not been fully live-validated. Pin exact versions during 0.x.x-alpha. Install with npm install <pkg>@alpha.

MCP server for Correios — Brazilian postal service tracking, rates, and shipping

npm License: MIT

Quick Start

Claude Desktop

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

{
  "mcpServers": {
    "correios": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-correios"],
      "env": {
        "CORREIOS_USER": "your-user",
        "CORREIOS_TOKEN": "your-token"
      }
    }
  }
}
Claude Code
claude mcp add correios -- npx @codespar/mcp-correios
Cursor / VS Code

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

{
  "servers": {
    "correios": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-correios"],
      "env": {
        "CORREIOS_USER": "your-user",
        "CORREIOS_TOKEN": "your-token"
      }
    }
  }
}

Tools (21)

ToolPurpose
track_packageTrack a package by Correios tracking code
track_bulkTrack multiple Correios packages in a single call (up to 50 codes)
calculate_shippingCalculate shipping rates between two CEPs
get_delivery_timeGet estimated delivery time between two CEPs
list_servicesList available Correios shipping services
find_cepLook up address by CEP via Correios
find_cep_bulkBatch address lookup for up to 20 CEPs in a single call
list_cep_rangesList CEP ranges (faixas de CEP) served by a given shipping service
get_delivery_modalityGet delivery modality (forma de entrega) for a CEP and service — whether delivery is domicile, agency picku...
create_prepostCreate a pre-posting order for shipping
get_prepostGet a pre-posting order by ID
list_prepostsList pre-posting orders with optional filters (date range, status)
cancel_prepostCancel a pre-posting order
buy_label_rangeRequest a range of SIGEP tracking labels (etiquetas) for a service
post_objectsClose and post a list of pre-posted objects (fechar postagem SIGEP) — creates a PLP
list_postal_codesSearch addresses by street name or location (returns matching CEPs)
create_collectionSchedule a package collection (pickup) from an address
get_collectionGet collection request details by ID
cancel_collectionCancel a scheduled collection request
create_reverseCreate a reverse logistics (return) order
get_reverseGet reverse logistics order details by ID

Authentication

Correios uses Basic Auth for token generation, then Bearer token for subsequent requests. The server automatically manages authentication.

Sandbox / Testing

Correios provides a homologation environment for testing. Contact Correios for homologation credentials.

Get your credentials
  1. Go to Correios CWS Portal
  2. Register for API access (requires a contract with Correios)
  3. Get your username and token
  4. Set the environment variables

Environment Variables

VariableRequiredDescription
CORREIOS_USERYesCorreios API username
CORREIOS_TOKENYesCorreios API token

Roadmap

v0.2 (planned)
  • list_postal_codes — List postal codes for a region
  • get_postal_code_range — Get postal code range for a city
  • create_collection — Schedule a package collection
  • get_collection — Get collection request details
  • create_reverse — Create a reverse logistics (return) request
v0.3 (planned)
  • batch_tracking — Track multiple packages in a single request
  • international_shipping — Calculate international shipping rates

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

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.