# BR Business Days Calculator MCP MCP

> BR Business Days Calculator adds or subtracts business days while perfectly skipping weekends and Brazilian national holidays. Stop relying on standard LLM date math for SLAs; this local, deterministic engine guarantees accurate delivery dates for Brazil.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** sla-tracking, date-math, business-logic, holiday-calculation, scheduling, time-management

## Description

Calculating project deadlines that respect official work calendars is tricky stuff. If you ask your AI agent to add a few weeks to a start date, it often ignores major Brazilian holidays or just counts Saturdays and Sundays as working days. This MCP fixes that completely. It's built on a reliable calculation engine that knows the specific national holidays for Brazil, ensuring every single day counted is an actual business day. Whether you need to check if a future date is valid for billing or calculate a precise delivery timeline, this tool handles all the math locally and instantly. You connect it via Vinkius, giving your agent access to enterprise-grade calendar accuracy without needing external API calls. It just works.

## Tools

### add_business_days
Adds or subtracts X Brazilian business days from a given date, skipping weekends and national holidays automatically.

### is_business_day
Checks if a provided date is a valid working day by accounting for all Brazilian national holidays and weekends.

## Prompt Examples

**Prompt:** 
```
Calculate a 10-business-day delivery SLA starting from `2024-02-09` (Brazil).
```

**Response:** 
```
✅ **Business SLA Date:** `2024-02-27` (Skipped Carnival holidays and weekends).
```

**Prompt:** 
```
Is `2024-11-15` counted as a valid business day for banking operations in Brazil?
```

**Response:** 
```
✅ **Validation:** False. `2024-11-15` is a static Brazilian National Holiday (Republic Proclamation).
```

**Prompt:** 
```
Add exactly 1 business day to `2024-03-28` (Thursday before Easter).
```

**Response:** 
```
✅ **New Date:** `2024-04-01` (Skipped Good Friday `03-29` and the weekend).
```

## Capabilities

### Calculate future deadlines
Determines a final date by adding or subtracting a specified number of working days from any starting date.

### Validate calendar dates
Checks if a given date falls on a day that is actually considered a business day, excluding weekends and holidays.

## Use Cases

### Setting a Project Deadline
A project manager needs to set an SLA that is 15 business days away from today. The agent runs the calculation, using `add_business_days`, and returns the correct date, skipping the upcoming Carnival holiday.

### Checking Billing Validity
A financial analyst needs to confirm if a payment due on November 15th is valid. The agent checks this using `is_business_day` and immediately confirms it's a national holiday, requiring manual adjustment.

### Timeline Adjustment
A development team lead shifts the project start date back by two weeks. Using `add_business_days`, they quickly calculate the new required completion date without needing to check an external calendar.

## Benefits

- Guaranteed Accuracy: You never have to worry about LLMs miscalculating delivery dates. The engine correctly skips weekends and known Brazilian holidays every time you use `add_business_days`.
- Local Speed: This MCP runs entirely locally, meaning no external network calls or API latency slow down your agent's response time when using this tool.
- Validation Check: Use the `is_business_day` function to instantly verify if a specific date—like a contract deadline—actually falls on a working day in Brazil.
- Deterministic Results: Forget hallucinated dates. The engine provides absolute reliability, ensuring your project schedules are based on hard-coded business rules.
- Flexible Math: Easily calculate backward or forward in time by passing negative or positive values to `add_business_days`.

## How It Works

The bottom line is you get a guaranteed, accurate business date without any guesswork about holidays or weekends.

1. You provide the engine with a starting date and the required number of days (positive for adding, negative for subtracting).
2. The MCP calculates the timeline, automatically skipping all Saturdays, Sundays, and known Brazilian national holidays.
3. It returns the exact final working day that meets your requirement.

## Frequently Asked Questions

**Does it require an external API?**
No! It uses a statically compiled list of Brazilian national holidays.

**Does it skip weekends automatically?**
Yes, Saturdays and Sundays are ignored.

**Are Carnival and Easter supported?**
Yes, the dynamic dates for these holidays are embedded.

**How does `add_business_days` perform in terms of latency?**
It performs instantly because it runs locally within a V8 isolate. This MCP uses a hardcoded list for holidays, meaning zero external network calls are needed. You get immediate results regardless of your connection speed.

**Is the calculation secure and dependent on an external API when using `is_business_day`?**
No, it's completely self-contained and local. The MCP doesn't require any external network calls or APIs to function. This means your data never leaves your environment, which is critical for enterprise security.

**What happens if I pass an improperly formatted date string to `add_business_days`?**
The engine will throw a clear error message indicating the required ISO format (YYYY-MM-DD). It won't attempt to guess or correct bad inputs, ensuring you only work with valid dates.

**If I use `is_business_day` for a date that is not in Brazil, will it fail?**
Yes. The tool strictly validates against the hardcoded Brazilian national holiday list and rules. If the date falls outside of the defined scope or doesn't fit the required locale, you'll receive an explicit failure notice.

**How can I ensure absolute determinism when chaining tools like `add_business_days`?**
The calculation is deterministic by design. It relies on a static, local holiday list that won't change or 'hallucinate.' You can trust that adding 10 business days today will always result in the same date.