# Vatlayer MCP

> Vatlayer validates EU VAT numbers against official registries and retrieves real-time tax rates for any member state. Use it to calculate prices compliant with global billing laws, guaranteeing your e-commerce checkout handles European taxation correctly.

## Overview
- **Category:** finance-accounting
- **Price:** Free
- **Tags:** vat-validation, tax-compliance, eu-vat, tax-rates, billing-automation

## Description

*Listen up.* If you're shipping anything into the EU and don't want to get flagged by customs or hit with a massive billing error, this is what you need. This server connects your AI client straight into European tax compliance. It handles VAT validation and rate calculations across every single member state in the bloc.

**Validate an EU Tax ID.** You gotta start here. Use `validate_vat` when you get an order or a partner’s VAT number. The tool doesn't just check if it exists; it hits official registries, confirming the legitimacy of the full number and pulling back the registered company name and address details for solid verification.

**Determine the right tax rate.** You might need one rate, or you might need all of them. If you know the specific country code but only need the current standard or reduced VAT percentage, run `get_rate`. It gives you that precise single rate number immediately. But if you're building a universal checkout page and wanna make sure your system covers *everything*, use `get_rate_list`. That tool dumps out a complete dataset of every available VAT rate across the entire European Union.

**Calculate the final price.** This is the payoff, right? Don't calculate this yourself. The `calculate_price` tool takes an initial base amount and a target country code, then it computes the total selling price *after* accurately adding the required local VAT. It handles all that complex billing math so you don't have to.

Here’s how these pieces fit together in your agent's workflow. You first use `validate_vat` on an incoming client number to confirm they are who they say they are and that their tax ID is real. Next, if you need the rate for a specific sale, you can either call `get_rate` with the country code or grab the full picture using `get_rate_list` to check against your internal ruleset.

When all validation passes and you've locked down the correct tax percentage, you run `calculate_price`. This tool ensures that whatever base amount you start with—whether it’s a product price or a service fee—the final number returned is fully compliant with European billing laws. You get the total price, including the precise VAT amount for sale in that specific country.

You don't guess on taxes; you use these tools. `validate_vat` confirms identity and location details. `get_rate` or `get_rate_list` gives you the necessary percentage. And `calculate_price` makes sure your checkout page is perfect, delivering a final price that works every time across all EU markets.

This means your AI client can automate complex compliance checks—stuff that used to require manual lookups and dedicated tax software—and just execute it as part of the natural conversation flow. It's fast. It's accurate. You just feed it the data, and the server spits out compliant numbers.

## Tools

### calculate_price
Computes a final selling price, accurately adding the required VAT for a specific country and amount.

### get_rate_list
Fetches a complete dataset containing every available VAT rate across all EU countries.

### get_rate
Retrieves the current standard or reduced VAT rate percentage for one specified EU member state.

### validate_vat
Verifies an EU VAT number and returns the official registered company name and address if it's valid.

## Prompt Examples

**Prompt:** 
```
Validate the VAT number LU26375245 and tell me which company it belongs to.
```

**Response:** 
```
I've validated the VAT number LU26375245. It is a valid number belonging to 'Amazon Europe Core S.à r.l.' located in Luxembourg.
```

**Prompt:** 
```
What is the current standard VAT rate in Germany?
```

**Response:** 
```
Fetching VAT rates for Germany (DE)... The current standard VAT rate is 19%. There are also reduced rates of 7% for certain goods.
```

**Prompt:** 
```
Calculate the total price including VAT for 150 EUR in France.
```

**Response:** 
```
Based on a base amount of 150 EUR and the French standard VAT rate of 20%, the VAT amount is 30 EUR, making the total price 180 EUR.
```

## Capabilities

### Validate EU Tax Numbers
Checks an inputted VAT number against official records to confirm its validity and retrieve the registered company details.

### Retrieve Specific VAT Rates
Fetches the current standard or reduced VAT rate for a single, specified EU member state using its country code.

### Get Full Tax Rate List
Pulls a complete dataset containing all available VAT rates across every European Union member state.

### Calculate Final Price
Computes the total price, including required local VAT amounts, given an initial base amount and country of sale.

## Use Cases

### A customer checks out from a new country.
The user is worried if their checkout process handles VAT correctly. They ask: 'What's the total cost for 50 units in Spain?' Your agent uses `calculate_price`, which returns the final, tax-inclusive amount instantly, giving the customer confidence and you compliance.

### A vendor submits an invoice with a suspicious VAT ID.
The accounts team doesn't trust the number. They ask: 'Check this VAT ID: FR12345678901.' The agent calls `validate_vat` and confirms if it's real, providing the official company details right in the chat.

### A developer needs to compare tax rates for a new product line.
Instead of checking Google or calling three different APIs, the dev asks: 'Give me all EU VAT rates.' The agent runs `get_rate_list`, providing a structured dump of every rate so they can code against it.

### The billing logic needs to adapt based on location.
A request comes in for pricing from an unknown IP. You tell your agent: 'Determine the tax for this transaction using this IP address.' The server uses its localization tools and runs `calculate_price` with the correct, inferred rate.

## Benefits

- Finalize pricing correctly every time. Instead of manually applying taxes, run `calculate_price` and get a single, compliant total price immediately.
- Stop dealing with invalid vendor IDs. Use `validate_vat` to check any VAT number instantly, confirming the company name and location before you audit anything.
- Avoid rate guesswork. Need Germany's current tax rate? Call `get_rate` and get the exact percentage without opening a dozen browser tabs.
- Scale compliance checks across all EU markets. Use `get_rate_list` to pull every possible VAT rate into your workflow, letting your agent compare them instantly.
- Build location-aware billing. Pass an IP address to determine the correct tax rates automatically, making your platform genuinely global.

## How It Works

The bottom line is: you tell your agent what tax compliance problem you have, and it runs the necessary check using these tools.

1. Subscribe to this server on Vinkius and input your unique Vatlayer Access Key.
2. Pass the necessary parameters (like a VAT number, country code, or base amount) directly from your AI client's chat interface.
3. The agent invokes the correct tool (`validate_vat`, `get_rate`, etc.) which returns structured data—the validation result, rate percentage, or final price.

## Frequently Asked Questions

**How do I check if a VAT number is valid using validate_vat?**
You pass the EU VAT number directly to `validate_vat`. It returns a structured object confirming its validity and giving you the official company name and address.

**Do I need to use get_rate or calculate_price for my checkout?**
You should always run `calculate_price` at checkout. While `get_rate` gives you the percentage, `calculate_price` uses that rate to give you the final, total price amount.

**What if I need VAT rates for more than one country?**
Use the `get_rate_list` tool. This pulls a full dataset of every available tax rate across all EU member states in one call, which is perfect for bulk auditing.

**Does Vatlayer handle IP-based localization?**
Yes. You can pass custom IP addresses or client locations to the server, and it automatically determines the applicable VAT rates needed for your calculation.

**If I try to use `validate_vat` with a number outside the EU scope, what happens?**
The tool validates against official EU formats and databases. If the VAT number doesn't match an EU member state or is invalidly formatted, it returns a failure status or specific error code. This prevents non-compliant data from entering your billing records.

**How do I set up the server before running tools like `calculate_price`?**
You must subscribe to the Vinkius server and provide your unique Vatlayer Access Key. Your AI agent uses this key for every call, ensuring secure access to real-time tax data.

**Can I use `get_rate` and then pass that result directly into `calculate_price`?**
Yes, you can chain these actions. First, run `get_rate` using the country code to retrieve the current VAT percentage. Then, feed that precise rate value into `calculate_price` for an accurate total.

**What is the fastest way to get tax data for every EU country?**
Use the dedicated `get_rate_list` tool. This fetches a comprehensive set of VAT rates across all member states in one request, eliminating the need to call `get_rate` repeatedly for each nation.

**How can I check if a specific EU VAT number is valid and active?**
Use the `validate_vat` tool by providing the VAT number (e.g., LU26375245). The agent will return the validation status along with company name and address details.

**Can I get a complete list of VAT rates for all EU member states at once?**
Yes, simply run the `get_rate_list` tool. It will fetch the full set of VAT rates for all 28 EU member states in a single response.

**How do I calculate a VAT-compliant price for a specific country?**
Use the `calculate_price` tool. Provide the base amount and the 2-letter country code. You can also specify a product type (like 'medical') to apply reduced rates if applicable.