# ICMS Calculator MCP for AI Agents AI Agent Connect

> ICMS Calculator helps you calculate complex Brazilian taxes like ICMS-ST, DIFAL, and tax-inclusive bases. It automates the math for interstate commerce and regional tax differentials for e-commerce and logistics businesses.

## Overview
- **Category:** finance
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_nKPLhJb00sxxzp6Bnq3okHk7UsNFivgJGnUkodcp/ai-agent-connect
- **Tags:** icms, brazil, tax-calculator, st-calculation, difal, mva

## Description

When you're shipping goods across Brazilian state lines, the tax math gets messy fast. You have to juggle "inside" calculations for grossed-up values, figure out the correct MVA for tax substitution, and keep track of varying interstate rates. This Connector takes that weight off your shoulders. Instead of digging through tax tables or manual spreadsheets, you can just tell your AI client to do the math for you. It handles the DIFAL for B2C transactions and pulls the correct rates based on where the product is starting and ending. It's built for anyone who needs to get the tax right the first time without the headache of manual entry or constant cross-referencing. You can find this tool in the Vinkius catalog to get your Brazilian tax workflows sorted. It turns a multi-step manual process into a single request, ensuring your invoices are accurate every time a product moves across a state border. This means you don't have to worry about undercharging on a shipment or overpaying on a substitution. Whether you are calculating a complex tax-inclusive base or just need to know the rate between two regions, the logic is handled for you. You get the numbers you need to keep your logistics moving without the risk of human error.

## Tools

### calculate_tax_differential
Get the DIFAL amount for B2C interstate operations. It handles the math for different regional rates.

### calculate_icms_substitution
Calculate the amount of ICMS-ST to be collected. This tool uses the MVA margin to find the correct value.

### calculate_tax_base
Calculate the grossed-up product value using the "inside" method. It helps you find the correct tax-inclusive base.

### get_interstate_rate
Identify the correct interstate tax rate based on origin and destination. It pulls the right data for regional movements.

## Prompt Examples

**Prompt:** 
```
What's the tax base for a product worth 100.00 with an 18% tax rate?
```

**Response:** 
```
Based on the calculation, here are the details for your product:

| Item | Value |
| :--- | :--- |
| **Original Price** | 100.00 |
| **Tax Base** | 121.95 |
| **Tax Amount** | 21.95 |

*Note: This uses the "inside" calculation method.*
```

**Prompt:** 
```
What is the interstate rate for a shipment from Southeast to North region?
```

**Response:** 
```
The interstate tax rate for a shipment originating in the **Southeast** and heading to the **North** region is **7%**.
```

**Prompt:** 
```
Calculate DIFAL for a product worth 500.00, with an interstate rate of 12% and destination internal rate of 18%.
```

**Response:** 
```
For a product worth 500.00 with the specified rates, the calculated **DIFAL amount is 30.00**.
```

## Capabilities

### Calculate DIFAL amounts
Get the correct tax differential for B2C interstate sales.

### Compute ICMS-ST values
Calculate tax substitution amounts using the MVA margin.

### Gross up product prices
Find the tax-inclusive base using the inside calculation method.

### Fetch state-to-state rates
Identify the correct interstate tax rate for regional movements.

## Use Cases

### Calculating B2C DIFAL for a new shipment
An e-commerce owner asks their agent to find the DIFAL for a product moving from the Southeast to the North region. The agent uses `calculate_tax_differential` to give the exact amount.

### Grossing up a product price for a state sale
A logistics manager needs to know the tax-inclusive base for a specific price. They ask the agent to use `calculate_tax_base` to find the grossed-up value.

### Verifying ICMS-ST for a wholesale order
A tax accountant needs to check the substitution tax for a large shipment. They ask the agent to run `calculate_icms_substitution` using the MVA margin.

### Checking regional rates for a new route
A shipping company wants to know the rate for a new route. The agent uses `get_interstate_rate` to identify the correct rate between the two states.

## Benefits

- Stop manually looking up state rates by using `get_interstate_rate` to pull data for any region.
- Avoid errors in tax substitution by letting `calculate_icms_substitution` handle MVA margins.
- Get accurate grossed-up values for every item using the `calculate_tax_base` inside method.
- Automate DIFAL calculations for B2C sales with `calculate_tax_differential` to save time on invoices.
- Reduce the risk of human error in complex Brazilian tax math by letting your AI client handle the logic.
- Speed up shipping workflows by getting instant tax numbers for interstate movements.

## How It Works

The bottom line is you get accurate Brazilian tax math without ever opening a spreadsheet.

1. Provide the product price, tax rates, or the origin and destination regions.
2. The Connector processes the specific Brazilian tax logic for the given scenario.
3. You get the final tax amount, DIFAL values, or grossed-up totals.

## Frequently Asked Questions

**Can the ICMS Calculator handle Brazilian tax substitution?**
Yes, it calculates ICMS-ST amounts by factoring in the MVA margin for you.

**Does the ICMS Calculator work for interstate B2C sales?**
Yes, it includes a specific tool to calculate the DIFAL amount for B2C interstate operations.

**How does the ICMS Calculator find state rates?**
It identifies the correct interstate tax rate based on the specific origin and destination regions you provide.

**Can I use the ICMS Calculator to gross up product values?**
Yes, it can calculate the grossed-up product value using the "inside" calculation method.

**Is the ICMS Calculator for Brazilian e-commerce?**
It is a perfect fit for Brazilian e-commerce, especially for businesses shipping across state lines.

**Does the ICMS Calculator handle different regional rates?**
Yes, it pulls the correct rates automatically based on the regional movements of your goods.

**How do I calculate the grossed-up product value?**
Use the `calculate_tax_base` tool. You provide the net product value and the tax rate, and it returns the grossed-up base and the tax amount included in that base.

**Can I calculate ICMS-ST with MVA?**
Yes. The `calculate_icms_substitution` tool allows you to input the initial tax base, the MVA percentage, and the relevant interstate and internal rates to find the substitution amount.

**How does the tool determine the interstate rate?**
The `get_interstate_rate` tool checks the origin and destination regions. It applies 4% for imports, 7% for movements from South/Southeast to North/Northeast/Midwest, and 12% for all other interstate routes.