- DATA
- VALIDATION
- ANALYSIS
- HUMAN
Short answer
How do I split a CNPJ into its parts?
Your AI uses the analyze_cnpj_structure tool to isolate the root, branch, and check digits from a single string. You get a structured set of values ready for your database or spreadsheet.
The results.
Where the data lands.
The AI processes the raw string and directs the results to these specific outcomes.
DATA
Structured components
The AI separates the root, branch, and digits. You receive these as distinct, usable values.
VALIDATION
Format check
The agent confirms if the string follows the standard CNPJ format. This prevents junk data from entering your workflow.
ANALYSIS
Pattern identification
Your AI identifies the specific branch and root numbers. This helps you group companies by their main headquarters.
HUMAN
Manual review
If the string is malformed or unreadable, the AI flags it. You decide how to handle these edge cases.
The workflow
What your AI does when a CNPJ arrives.
The AI handles the heavy lifting of string parsing so you don't have to write regex or manual logic.
Parse the string
The agent takes your raw input and identifies the numeric segments.
analyze_cnpj_structureIsolate the root
The AI extracts the first eight digits to identify the base company.
analyze_cnpj_structureIdentify the branch
The agent pulls the next four digits to find the specific branch or office.
analyze_cnpj_structureExtract check digits
The tool pulls the final two digits used for validation.
analyze_cnpj_structure
Try it
Copy these to start.
Use these prompts to trigger the breakdown immediately.
Starting points
Replace the bracketed text with your actual CNPJ numbers or file names.
CNPJ Validator Connector
You're all set. Choose your MCP client and follow the setup instructions.
https://edge.vinkius.com/vk_preview_h5b23zF0Z9FsG4JVtouuZu9rJr0WPyPK7WWuZJWt/mcpClaude Desktop
Follow the steps below to connect in seconds.
- 1In Claude Desktop, open Settings → Connectors.
- 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
- 3Click Add and start a new chat — CNPJ Validator capabilities are ready to use.
{
"mcpServers": {
"cnpj-validator-mcp": {
"url": "https://edge.vinkius.com/vk_preview_h5b23zF0Z9FsG4JVtouuZu9rJr0WPyPK7WWuZJWt/mcp"
}
}
}Break down this CNPJ into its root, branch, and check digits: [CNPJ NUMBER]
Analyze the CNPJ structure in this Google Sheet: [SHEET NAME]
Check if the CNPJ in this text file is valid and extract the parts: [FILE NAME]
I have a list of CNPJs in this CSV. Use the validator to pull the root numbers from all of them: [FILE NAME]
Claude
ChatGPT
Cursor
VS Code
Windsurf
Claude Code
JetBrains
Cline
Start here
Connect CNPJ Validator once, then ask.
Just click the link to connect the MCP to your client. Your credentials stay encrypted, and you can start parsing strings right away.
Connect CNPJ Validator to your AIFAQ
How the CNPJ Validator behaves.
- 01
Can the AI fix a typo in a CNPJ?
No. The AI identifies the structure and validates the format, but it won't guess what a missing digit should be.
- 02
Does the AI save my CNPJ data to a database?
No. The AI only processes the data you provide in the chat or files. It doesn't have permission to write to your external databases.
- 03
Can I use this with any AI client?
Yes, as long as the client supports the Model Context Protocol (MCP).
- 04
Will the AI tell me if a CNPJ is invalid?
Yes. The tool checks the structure and the check digits to confirm if the number is valid.
- 05
Can the AI change the original file I uploaded?
No. The AI reads the files to extract the CNPJ components, but it cannot modify your original documents.
More questions about CNPJ Validator? The Connector page answers them. See everything the CNPJ Validator Connector can do
Connect CNPJ Validator to Claude, Cursor, ChatGPT & more
