# Correios do Brazil MCP

> Correios do Brazil connects your agent to the official Brazilian postal service data. It lets you calculate precise shipping costs for services like SEDEX and PAC, verify full addresses from any CEP (ZIP code), and estimate delivery times between two points across Brazil.

## Overview
- **Category:** ecommerce
- **Price:** Free
- **Tags:** postal-service, shipping-rates, delivery-tracking, logistics-automation, address-verification, package-dimensions

## Description

Need reliable logistics data for an e-commerce platform? This MCP gives your agent access to the official Correios API. You can get accurate pricing by specifying origin, destination, weight, and package dimensions for various services. Beyond just costs, you'll instantly retrieve full street names and city details using only a Brazilian ZIP code lookup. It also estimates how many working days it will take for a package to move between any two locations. Just connect your credentials through Vinkius, and your agent handles the complex calculations right where you are working—in the chat or in your IDE.

## Tools

### calculate_prices
Calculates the exact shipping cost for packages by accepting dimensions, weight, and service type.

### consult_cep
Looks up a full address (street, neighborhood, city) given any Brazilian ZIP code.

### estimate_delivery_time
Provides an estimate of working days needed for delivery between two specified locations.

## Prompt Examples

**Prompt:** 
```
Calculate the shipping cost for a 1kg box (20x20x20cm) from 01001000 to 20040002 using SEDEX (04014).
```

**Response:** 
```
I've calculated the shipping for your SEDEX package. The estimated cost is R$ 32.50 with a delivery window of 1-2 business days.
```

**Prompt:** 
```
How long does it take for a PAC delivery from 01310-200 to 70040-900?
```

**Response:** 
```
The estimated delivery time for PAC (service 04510) between these locations is 8 working days.
```

**Prompt:** 
```
What is the address for CEP 01001000?
```

**Response:** 
```
The CEP 01001-000 corresponds to Praça da Sé, Sé, São Paulo - SP.
```

## Capabilities

### Calculate Shipping Rates
Determines precise shipping costs based on package dimensions, weight, and chosen postal service (e.g., SEDEX or PAC).

### Verify Address Details
Takes a Brazilian ZIP code and returns the full, structured address, including street, neighborhood, city, and state.

### Estimate Transit Time
Predicts the estimated number of working days required for delivery between two specific locations in Brazil.

## Use Cases

### Checking Shipping Feasibility
A store owner needs to know if shipping a fragile item from São Paulo to Porto Alegre is possible and how long it will take. They ask the agent, which uses `estimate_delivery_time` and `calculate_prices` to give them a cost quote and an 8-day delivery window.

### Verifying Partner Addresses
A developer receives a new client ZIP code (CEP). Instead of manually checking it, they ask the agent. The MCP uses `consult_cep` to immediately return the full street address for database entry.

### Pre-Calculating Quote on Demand
A sales team member needs a quote for a bulk order. They feed the agent package dimensions and list multiple services (PAC, SEDEX). The MCP uses `calculate_prices` to return three distinct rate options immediately.

### Optimizing Shipping Routes
A logistics manager is comparing two potential destinations. By running `estimate_delivery_time` with the destination ZIP codes, they can quickly compare which route offers the fastest working day count.

## Benefits

- Accuracy: Stop guessing on costs. Using `calculate_prices` provides precise, real-time quotes for services like SEDEX based on exact dimensions and weight.
- Data Integrity: Need to confirm an address? `consult_cep` pulls verified street details from the official source, eliminating manual data entry errors.
- Customer Experience: Give your customers instant cost estimates right in the chat. They never have to leave your site just to check shipping rates.
- Planning Time: Don't guess delivery windows. Use `estimate_delivery_time` to give clients reliable transit time predictions for routes across Brazil.
- Integration Speed: Your agent handles all the complex API calls, allowing you to integrate core logistics logic into your workflow without writing boilerplate code.

## How It Works

The bottom line is you talk to your agent like talking to a person; this MCP handles all the complex API calls in the background.

1. Subscribe to this MCP and enter your Correios Web Services (CWS) credentials within Vinkius.
2. Your AI client sends a request detailing the required action, such as dimensions for shipping or two ZIP codes for time estimation.
3. The MCP runs the query against the official API and returns structured data—be it a cost quote, an address object, or a day count.

## Frequently Asked Questions

**How can I calculate the shipping price for a specific package?**
Use the `calculate_prices` tool. You will need to provide the origin and destination ZIP codes, weight, dimensions, and the service code (e.g., 04014 for SEDEX).

**Can I check the delivery deadline between two Brazilian cities?**
Yes! The `estimate_delivery_time` tool allows you to input the service code and both ZIP codes to receive the estimated delivery time in working days.

**Is it possible to find an address using only the ZIP code (CEP)?**
Absolutely. Use the `consult_cep` tool with the 8-digit ZIP code to retrieve the street name, neighborhood, city, and state automatically.

**How do I get started with using the MCP credentials for `calculate_prices`?**
You first subscribe to the MCP and enter your Correios Web Services (CWS) credentials. Once connected, your AI client can start querying logistics data immediately without needing manual API calls.

**What specific details must I provide when running `calculate_prices`?**
You need to specify the package weight, dimensions (length, width, height), and both the origin and destination ZIP codes. You also have to name the specific postal service you want to use, like SEDEX or PAC.

**Is this MCP limited only to Brazilian postal codes?**
Yes, this MCP is built around the official Correios REST API and functions exclusively with Brazilian ZIP codes (CEP). It cannot process international shipping data.

**What happens if I run `consult_cep` using an invalid or non-existent CEP?**
If you enter a bad ZIP code, the tool will return an error message and won't proceed. This prevents incorrect address data from entering your workflow.

**Can I use `estimate_delivery_time` to compare different shipping services?**
While it estimates time for a specific service, you can run the tool multiple times with varying services (like SEDEX vs. PAC) to manually compare delivery windows and costs.