# CPF/CNPJ Batch Processor MCP for AI Agents AI Agent Connect

> CPF/CNPJ Batch Processor handles bulk Brazilian identification numbers. It validates, formats, and cleans lists of CPF and CNPJ records so you don't have to deal with messy, inconsistent data. It's built for anyone moving large amounts of Brazilian customer or business data into a database or CRM.

## Overview
- **Category:** utility
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_lFNyu8UlZFkhP0wRgSvyc2AGW6mslkNnLO6XUQ8S/ai-agent-connect
- **Tags:** brazil, cpf, cnpj, batch, formatter, validator

## Description

Handling Brazilian identification numbers is usually a mess. You're often stuck with a mix of raw digits, numbers with weird spacing, and some that aren't actually valid. This Connector lets your agent take a messy list of CPFs and CNPJs and turn them into clean, usable data in one go. Instead of manually checking every single entry, you can ask your agent to scrub a whole file. It handles the heavy lifting of stripping out dashes and dots, applying the correct formatting masks, and checking for duplicates or invalid numbers. It turns a manual data entry nightmare into a single command. When you use this through the Vinkius catalog, you get a reliable way to ensure your Brazilian customer records are actually accurate before they hit your production database. It's about getting your data ready for work without the headache of manual cleanup.

## Tools

### clean_batch
Strips all non-numeric characters from a list of identifiers to prepare them for database storage.

### format_batch
Adds standard dots, dashes, and slashes to make raw Brazilian ID numbers human-readable.

### validate_batch
Checks a list of identifiers to see if they are mathematically valid or appear as duplicates.

## Prompt Examples

**Prompt:** 
```
I have this list of raw numbers: [12345678901, 98765432109]. Can you format them for me?
```

**Response:** 
```
I've formatted those Brazilian IDs for you:

* **123.456.789-01**
* **987.654.321-09**

They're now in the standard CPF format.
```

**Prompt:** 
```
Check these CNPJs for validity: ['00.000.000/0001-91', '12.345.678/0001-00']
```

**Response:** 
```
Here are the validation results for those CNPJs:

| CNPJ | Status |
| :--- | :--- |
| 00.000.000/0001-91 | **Valid** |
| 12.345.678/0001-00 | **Invalid** |

The second number failed the checksum validation.
```

**Prompt:** 
```
Clean this list so I can put it in my SQL table: ['123.456.789-01', '98.765.432-10']
```

**Response:** 
```
I've stripped the masks from those identifiers. Here are the raw digits for your database:

* **12345678901**
* **9876543210**
```

## Capabilities

### Strip non-numeric characters
Removes dots, dashes, and spaces from a list of IDs to prepare them for database insertion.

### Apply standard masks
Adds correct formatting like 00.000.000/0000-00 to raw Brazilian identification numbers.

### Verify identifier validity
Checks a batch of numbers to see if they are mathematically valid or duplicates.

### Clean raw strings
Converts inconsistent user input into standardized numeric strings.

### Prepare database records
Formats and cleans Brazilian IDs so they are ready for immediate import into your CRM.

## Use Cases

### Fixing a messy CSV export
A manager has a CSV of 1,000 customers with mixed formatting. They ask the agent to format everything to 00.000.000/0000-00.

### Pre-database scrubbing
A dev wants to upload new vendors. They ask the agent to clean the list to remove any dots or dashes before the SQL insert.

### KYC Batch Check
A compliance officer uploads a list of new leads. They ask the agent to validate the batch to see which IDs are actually valid.

### Duplicate Detection
A marketing person has a list of old leads. They ask the agent to check for duplicates to see how many unique customers they have.

## Benefits

- Stop manual data entry errors by using validate_batch to catch fake or mistyped numbers instantly.
- Save hours of cleanup time by using clean_batch to strip out inconsistent symbols from raw data exports.
- Ensure your CRM looks professional by using format_batch to apply uniform masks to all customer records.
- Prevent database errors by using clean_batch to remove everything except the digits before your agent saves the data.
- Identify duplicate customers faster by using validate_batch to flag recurring identifiers in a single list.

## How It Works

The bottom line is it turns messy Brazilian ID strings into production-ready data instantly.

1. Provide a list of raw CPF or CNPJ numbers to your agent.
2. Specify whether you want them cleaned, formatted, or validated.
3. Get a structured list of ready-to-use identifiers.

## Frequently Asked Questions

**Can the CPF/CNPJ Batch Processor handle thousands of records at once?**
Yes, it's designed for bulk processing. You can pass a large list of identifiers to the tool, and it will return the cleaned or validated results in a single operation.

**Does the CPF/CNPJ Batch Processor check if a Brazilian company is currently active?**
No, it validates the mathematical structure of the CNPJ. It ensures the number is a valid identifier, but it doesn't check real-time government registration status.

**How does the CPF/CNPJ Batch Processor handle messy data with extra spaces?**
It's great for that. You can use the cleaning tool to strip out spaces, dashes, and dots, leaving you with just the raw digits for your records.

**Can I use the CPF/CNPJ Batch Processor to fix my CRM's formatting?**
Absolutely. You can take a list of inconsistently formatted IDs and have the Connector apply a uniform mask so every entry looks the same.

**Does the CPF/CNPJ Batch Processor work for both individual and business IDs?**
Yes, it handles both CPF (individual) and CNPJ (business) identifiers. It recognizes the different lengths and patterns for both types.

**Will the CPF/CNPJ Batch Processor find duplicate IDs in my list?**
Yes, the validation tool can identify if you have the same identifier appearing multiple times in the batch you provide.

**How does the tool identify if a number is a CPF or CNPJ?**
The system detects the type based on the digit count: 11 digits are identified as CPF, and 1rab4 digits are identified as CNPJ.

**Can I use this to clean data for a database?**
Yes, by using the `clean_batch` tool, you can strip all dots, dashes, and slashes from your identifiers, leaving only the raw numeric digits.

**Does it detect duplicate numbers in a list?**
Yes, the `validate_batch` tool provides a summary that includes a count of any duplicates found within the provided batch.