# NF-e Access Key Validator MCP for AI Agents AI Agent Connect

> NF-e Access Key Validator checks the structural integrity and tax compliance of Brazilian Electronic Invoice (NF-e) access keys. It verifies the 44-digit sequences, extracts business metadata like CNPJ and State Codes, and audits components against official tax authority standards.

## Overview
- **Category:** finance
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_IRwsYmnDubhWF6CADb8mHPMbLhjrqO48Mkm0iChQ/ai-agent-connect
- **Tags:** nfe, brazil, tax, invoice, validation

## Description

Dealing with Brazilian NF-e keys is a headache if you're doing it manually. You have to ensure the 44-digit sequence isn't just a random string of numbers but actually follows the Modulo 11 algorithm. This Connector takes that off your plate. You can feed it a key and have your agent immediately tell you if it's structurally sound. If it is, the Connector can then pull out the specific details you actually care about, like the CNPJ, State Code, and the invoice number. It doesn't just stop at data extraction; it also checks if those components actually follow the rules set by the tax authorities. It's a huge time saver for anyone handling high-volume Brazilian tax data. Because Vinkius hosts this Connector, you can plug it into your existing workflow and stop worrying about whether a key is junk or valid. It turns a multi-step manual verification process into a single request.

## Tools

### extract_key_metadata
Breaks a valid key into readable parts like CNPJ, State Code, and Model. This is useful for quickly populating databases.

### validate_business_compliance
Checks if the extracted components meet specific tax authority standards. It helps ensure your records are legally sound.

### verify_key_structure
Confirms the 44-digit sequence is mathematically correct using the Modulo 11 algorithm. It filters out junk data immediately.

## Prompt Examples

**Prompt:** 
```
Is this NF-e key valid: 3523100000000000015555001000000001?
```

**Response:** 
```
Yes, the access key is structurally valid. It passed the **Modulo 11 checksum** and meets the required 44-digit length.
```

**Prompt:** 
```
Extract info from this key: 3523100000000000015555001000000001
```

**Response:** 
```
Here is the metadata for that key:

| Component | Value |
| :--- | :--- |
| **State Code** | 35 |
| **CNPJ** | 23100000000000 |
| **Model** | 55 |
| **Series** | 001 |
| **Number** | 000000001 |
| **Emission Type** | 1 |
```

**Prompt:** 
```
Check if this key follows tax standards: 3523100000000000015555001000000001
```

**Response:** 
```
The key is **fully compliant**. All components, including the State Code and business identifiers, match the official tax authority standards.
```

## Capabilities

### Validate key math
Check if a 44-digit sequence is mathematically correct using the Modulo 11 algorithm.

### Extract business IDs
Pull the CNPJ and State Code directly from a valid invoice key.

### Get invoice details
Retrieve the specific invoice number, series, and emission type from the key.

### Audit tax compliance
Verify if the components within a key meet official tax authority standards.

### Filter invalid keys
Identify and discard keys that do not meet the required length or structural rules.

## Use Cases

### Batch auditing of tax receipts
An accountant has a list of 500 keys and needs to know which ones are valid for a tax return without clicking each one.

### Automated vendor data entry
A logistics manager uses an agent to pull CNPJ numbers from a batch of vendor keys to update a shipping database.

### Regional compliance checks
A tax auditor wants to see if a specific key's components match the required regional codes for a specific state.

### E-commerce invoice reconciliation
An online retailer verifies that incoming invoices from different states are compliant and contain correct business IDs.

## Benefits

- Stop wasting time on manual calculations with verify_key_structure.
- Get instant access to CNPJ and State Codes using extract_key_metadata.
- Ensure your records meet official standards with validate_business_compliance.
- Eliminate typos and manual entry errors during high-volume data processing.
- Quickly identify and discard junk or invalid invoice keys before they hit your system.
- Automate the extraction of invoice numbers and series for faster reconciliation.

## How It Works

The bottom line is you get instant, accurate validation of Brazilian tax keys without manual calculation.

1. Provide a 44-digit Brazilian NF-e access key to your agent.
2. The Connector runs a mathematical checksum and checks the sequence length.
3. You get a structured breakdown of the business metadata and a compliance status.

## Frequently Asked Questions

**Can the NF-e Access Key Validator handle Brazilian tax keys?**
Yes, it is designed specifically for the 44-digit Brazilian NF-e keys. It handles the math and the data extraction for you automatically.

**How does the NF-e Access Key Validator check for errors?**
It uses the Modulo 11 algorithm to verify the mathematical integrity of the key. It also checks the length to make sure it's a valid sequence.

**Can I use the NF-e Access Key Validator to get a company's CNPJ?**
Yes, once the key is validated, the Connector can pull out the CNPJ and other business details like the State Code and invoice number.

**Does the NF-e Access Key Validator check for regional compliance?**
It does. The tool audits the components of the key against official tax authority standards to ensure they are correct for the region.

**Is the NF-e Access Key Validator good for high-volume auditing?**
It's ideal for that. Because it's an Connector, your agent can process hundreds of keys in a loop without you having to do any manual clicking.

**What does `verify_key_structure` do?**
It checks if the 44-digit sequence is purely numeric, exactly 44 digits long, and passes the Modulo 11 checksum verification.

**How can I see the issuer's details?**
Use the `extract_key_metadata` tool. It will parse the key and return the CNPJ, State Code, and other relevant metadata.

**Does this tool check for tax compliance?**
Yes, the `validate_business_compliance` tool audits components like Model and Emission Type against official regulatory catalogs.