How to Build an AI Travel Agent that Understands Brazilian Local Holidays via MCP
The era of Autonomous AI Agents is here. But large language models, no matter how advanced, share a critical blind spot: they lack real-time awareness of regional calendars and hyperlocal events.
If you are building an AI Travel Agent, a concierge chatbot, or a scheduling assistant for travelers visiting Brazil, you have likely encountered the frustration of an AI recommending a museum tour or business meeting on a day when the entire city is shut down for a municipal holiday.
In this guide, we will demonstrate how to solve this problem by integrating the Model Context Protocol (MCP) from Feriados API into your AI workflow, giving your LLM hyperlocal awareness of all 5,570 Brazilian municipalities.
Why Standard LLMs Fail at Brazilian Travel Planning
Brazil has a unique calendar structure: in addition to 10 national public holidays, each of the 26 states plus the Federal District has its own regional holidays, and every single one of the 5,570 municipalities can declare up to 4 religious or civic holidays (such as the city foundation day or patron saint celebration).
When an AI travel agent relies purely on pre-trained weights or generic web searches, it assumes that regular weekdays are working days across the country. In reality, a holiday in Ouro Preto, Gramado, or Paraty can completely disrupt an itinerary.
The Solution: Injecting Hyperlocal Intelligence via MCP
The Model Context Protocol (MCP) allows AI assistants (like Claude, Cursor, or custom OpenAI/Anthropic frameworks) to query external APIs natively during their reasoning loops. By adding Feriados API as an MCP server, your travel agent can autonomously execute tools to verify dates before finalizing recommendations.
1. Configuring the MCP Server
You can attach the server locally via stdio or remotely via URL in your agent configuration:
{ "mcpServers": { "feriadosapi": { "command": "npx", "args": [ "-y", "@feriados-api/mcp-server" ], "env": { "FERIADOS_API_KEY": "YOUR_API_KEY_HERE" } } }}{ "mcpServers": { "feriadosapi": { "url": "https://mcp.feriadosapi.com/api/mcp?apiKey=YOUR_API_KEY_HERE" } }}2. The Agent in Action
Here is an actual trace of an autonomous travel planning session when the agent is equipped with the Feriados MCP tool:
> User: "Plan a 3-day itinerary in Ouro Preto starting on June 24, 2026. Make sure to check local municipal holidays so we don't schedule visits when museums are closed."
> Agent (Thinking): "Ouro Preto has IBGE code 3146107. I need to verify whether June 24, 25, or 26 have any municipal holidays in 2026, as historic towns in Brazil often close public attractions on municipal celebrations."
> Agent (Tool Call): "buscar_feriados" Args: {"ibge": 3146107, "ano": "2026"}
< Tool Result: "Returned: 2026-06-24 - Aniversário de Ouro Preto (Municipal Holiday). 2026-07-08 - Padroeira..."
> Agent (Response): "I noticed that June 24 is the **City Anniversary of Ouro Preto**! Because it is a municipal holiday, many historic museums, banks, and public offices will be closed or operating on restricted hours. Therefore, I recommend scheduling outdoor explorations and viewpoints for June 24, and reserving your guided museum and church visits for June 25 and 26 when regular business resumes."Best Practices for AI Travel Tech in Brazil
- Always pass the IBGE code: City names can be ambiguous across Brazilian states (e.g., there are multiple cities named "Bonito" or "Santa Terezinha"). Always resolve destinations to their official 7-digit IBGE code for 100% precision.
- Check banking settlement days: If your AI travel agent also books flights or hotels via PIX or bank transfer, use the
verificar_dia_util_bancariotool to prevent settlement delays on FEBRABAN holidays.
Ready to make your travel AI truly intelligent? Get your free Feriados API key and give your agent hyperlocal awareness today.

Tired of handling holidays manually?
Get your Feriados API key and integrate Brazilian national, state, and municipal holidays in minutes. Free tier available.
Get free API key