4,500+ servers built on MCP Fusion
Vinkius
Correios (Brazil) logo
Vinkius
LangChain logo

How to Use the Correios (Brazil) MCP in LangChain

Build multi-step shipping workflows in LangChain with real-time Correios tracking and price calculations using MCP.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

Correios (Brazil) MCP on Cursor AI Code Editor MCP Client Correios (Brazil) MCP on Claude Desktop App MCP Integration Correios (Brazil) MCP on OpenAI Agents SDK MCP Compatible Correios (Brazil) MCP on Visual Studio Code MCP Extension Client Correios (Brazil) MCP on GitHub Copilot AI Agent MCP Integration Correios (Brazil) MCP on Google Gemini AI MCP Integration Correios (Brazil) MCP on Lovable AI Development MCP Client Correios (Brazil) MCP on Mistral AI Agents MCP Compatible Correios (Brazil) MCP on Amazon AWS Bedrock MCP Support
MCP Servers - Free for Subscribers
LangChain

Connect Correios (Brazil) MCP to LangChain

Create your Vinkius account to connect Correios (Brazil) to LangChain and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.

GDPR Free for Subscribers

Chain CEP lookups to shipping calculations

`lookup_cep` serves as the entry point for your agent to resolve Brazilian addresses before running shipping logic. Your LangChain agent takes a raw CEP input, retrieves the street address, and immediately feeds those destination coordinates into `calculate_price_deadline` to find shipping rates. This multi-step chain runs programmatically without hardcoded steps. If the rate exceeds a customer's threshold, the agent branches to `list_contract_services` to find cheaper contract-specific postage options.

Track packages in LangChain agent loops (MCP Server)

`track_object` lets your LangChain agent fetch the current delivery status of any Brazilian package during an active execution run. When a customer asks about a delayed order, the agent pulls the tracking code, gets the status, and matches it against your internal database using LangChain's vector store retrievers. You can monitor this entire execution flow inside LangSmith. The platform traces the exact payload sent to the Correios MCP Server, showing you the exact latency of the tracking request and the raw JSON response.

Manage corporate Correios contracts dynamically

`get_contract_status` checks if your active corporate credentials with the Brazilian postal service are valid before executing high-volume label generation. Your LangChain agent verifies this contract state, then uses `list_contract_services` to verify which shipping methods are active for that specific account. This prevents failed API calls down the line when generating bulk shipping quotes. By combining these contract tools with standard LangChain tools, your agent can automatically switch to retail pricing if your corporate contract is temporarily suspended.

Setup guide

Set up Correios (Brazil) MCP in LangChain

Prerequisites

  • Python 3.10+ installed
  • langchain-mcp-adapters + langgraph packages
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install dependencies

    Run pip install langchain-mcp-adapters langgraph langchain-openai. The MCP adapters package converts MCP tools into native LangChain BaseTool objects.

  2. 2

    Connect via HTTP transport

    Use MultiServerMCPClient with "transport": "http" pointing to your Vinkius endpoint. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com.

  3. 3

    Create a ReAct agent

    Pass the discovered tools to create_react_agent() from LangGraph. The agent automatically routes Correios (Brazil) tool calls through the MCP protocol.

  4. 4

    Run with any LLM

    Swap ChatOpenAI for ChatAnthropic, ChatGoogleGenerativeAI, or any LangChain-compatible model. The MCP tools work identically across all providers.

agent.py
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from langchain_openai import ChatOpenAI

async with MultiServerMCPClient({
    "correios-brazil-mcp": {
        "transport": "http",
        "url": "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
    }
}) as client:
    tools = client.get_tools()

    agent = create_react_agent(
        ChatOpenAI(model="gpt-4o"),
        tools,
    )
    result = await agent.ainvoke({
        "messages": "List recent Correios (Brazil) transactions"
    })
    print(result["messages"][-1].content)

Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Correios. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.

Why Choose Vinkius

Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.

Real-time monitoring

Live

visibility into every interaction

Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.

Built-in savings

60%

lower AI costs

Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.

Single dashboard

One

place for every integration

Every tool your AI connects to, managed from a single screen. One account, complete control.

Common questions about Correios (Brazil) MCP in LangChain

You register the MCP tools with your MultiServerMCPClient and pass them to your agent constructor. The agent automatically feeds the output of `lookup_cep` directly into subsequent chain links like database writers or shipping calculators.
Yes, every call to tools like `calculate_price_deadline` or `track_object` is fully traced in LangSmith. You see the exact input parameters, execution time, and raw response payload from the Brazilian postal service.
LangChain agents use ReAct loops to decide which tool to call based on the previous step's output. For example, the agent might first run `lookup_cep`, evaluate the address, and then decide whether to call `search_units_by_cep` to find a nearby drop-off point.
No, the Vinkius platform handles authentication at the gateway level. Your LangChain code only needs a single endpoint token to access all 8 shipping and tracking tools over MCP.
All requests run inside isolated V8 sandboxes that immediately wipe memory after execution. Your sensitive contract status data and customer CEP codes are never cached or logged by the underlying server.

Start using the Correios (Brazil) MCP today

We host it, we monitor it, we maintain it. You just paste one token.

Built & Managed by Vinkius 30s setup 8 tools

We've already built the connector for Correios (Brazil). Just plug in your AI agents and start using Vinkius.

No hosting. No infrastructure. No complex setup.
All 8 tools are live and waiting. You're up and running in seconds.

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
+ other MCP clients

Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.