How to Use the BCB Câmbio — Dólar PTAX, Euro e 150+ Moedas MCP in Mastra AI
Build resilient financial workflows that fetch Central Bank of Brazil rates automatically using Mastra AI.
Works with every AI agent you already use
…and any MCP-compatible client
Connect BCB Câmbio — Dólar PTAX, Euro e 150+ Moedas MCP to Mastra AI
Create your Vinkius account to connect BCB Câmbio — Dólar PTAX, Euro e 150+ Moedas to Mastra AI and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Trigger Actions on PTAX Dollar Shifts
Your Mastra AI workflow queries the official BRL/USD reference rate using the `get_cotacao_dolar` MCP tool. If the central bank API times out, the framework's built-in exponential backoff automatically retries the request. The agent gets reliable buy and sell numbers without failing the entire run. You can chain this data into conditional branches. If the PTAX crosses a specific threshold, the workflow routes the numbers to an approval step or sends an alert. The system handles the entire sequence autonomously.
Map 150+ Currencies with this MCP Server
Workflows processing international payments check live rates via the `get_cotacao_moeda` tool. The agent dynamically pulls the exact spread for Euros, Yen, or exotic currencies like the Colombian Peso. When a user provides an invalid currency name, Mastra catches the error. The agent then runs `listar_moedas` to find the correct three-letter code and retries the conversion step. This self-correcting loop prevents broken payment pipelines.
Audit Past Transactions Automatically
Financial reconciliation agents pull past exchange rates using the `get_dolar_periodo` tool. They pass a MM-DD-YYYY range to grab up to a year of opening, intermediate, and closing bulletins. For audits spanning multiple years, the workflow switches to `get_dolar_sgs`. This grabs massive commercial dollar series data using DD/MM/YYYY formatting. Your agent maps these historical rates against internal ledgers to calculate past FX exposure.
Set up BCB Câmbio — Dólar PTAX, Euro e 150+ Moedas MCP in Mastra AI
Prerequisites
- Node.js 18+ and a TypeScript project
-
@mastra/mcp+@mastra/corepackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
npm install @mastra/mcp @mastra/coreplus your preferred model provider (e.g.@ai-sdk/openai). - 2
Configure the MCPClient
Create an
MCPClientwith your Vinkius endpoint as aURLobject. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Discover and inject tools
Call
mcpClient.listTools()and spread the result into your agent'stoolsobject. All BCB Câmbio — Dólar PTAX, Euro e 150+ Moedas tools become native Mastra tools. - 4
Run with any model
Swap
openai("gpt-4o")for any AI SDK-compatible provider. Callagent.generate()and the agent routes tool calls through MCP automatically.
import { MCPClient } from "@mastra/mcp";
import { Agent } from "@mastra/core/agent";
import { openai } from "@ai-sdk/openai";
const mcpClient = new MCPClient({
id: "bcb-cambio-dolar-ptax-euro-e-150-moedas-mcp-client",
servers: {
"bcb-cambio-dolar-ptax-euro-e-150-moedas-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "BCB Câmbio — Dólar PTAX, Euro e 150+ Moedas Agent",
model: openai("gpt-4o"),
instructions: "You have access to BCB Câmbio — Dólar PTAX, Euro e 150+ Moedas tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent BCB Câmbio — Dólar PTAX, Euro e 150+ Moedas transactions"
);
console.log(result.text); Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Banco Central do Brasil. 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 BCB Câmbio — Dólar PTAX, Euro e 150+ Moedas MCP in Mastra AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the BCB Câmbio — Dólar PTAX, Euro e 150+ Moedas MCP today
We host it, we monitor it, we maintain it. You just paste one token.