• VALID
  • INVALID
  • FORMAT
  • HUMAN

How to validate CNPJ numbers with your AI

Connect this MCP to your AI client once. After that, you can hand over any list of Brazilian business IDs for instant structural verification.

Ask AI about this page

Short answer

How can I check if CNPJ numbers are valid?

Your AI uses mathematical checksum algorithms to confirm if a CNPJ follows the correct structural format. It can process individual numbers or entire batches from your files. You'll get a clear breakdown of which IDs are valid and which are broken.

Where every result lands.

Validation outcomes

The AI sorts your data based on the checksum results.

VALID

Correct IDs

The AI identifies numbers that pass the checksum. These are ready for your database or CRM.

INVALID

Broken IDs

The AI flags numbers that fail the mathematical check. These are structurally impossible.

FORMAT

Formatting errors

The AI catches IDs that don't meet the required length or character type. It separates these from pure checksum failures.

HUMAN

Manual review

The AI flags suspicious entries that need a person to double-check the source data. You decide if these are typos or real errors.

The workflow

What your AI does when the data arrives.

The AI handles the math so you don't have to manually check digits.

  1. Format check

    The AI looks at a single ID to ensure it has the right number of digits and characters.

    validate_cnpj_format
  2. Batch processing

    The AI takes a large group of IDs from a file or text block and runs them through the validator.

    batch_validate_cnpjs
  3. Checksum calculation

    The AI performs the specific mathematical verification required for Brazilian business IDs.

    batch_validate_cnpjs
  4. Error reporting

    The AI summarizes which IDs passed and which failed, grouping them for your review.

    batch_validate_cnpjs

Try it

Copy these to start.

Use these prompts to trigger the validation process.

Starting points

Replace the bracketed text with your actual data source, like a CSV file or a list of numbers.

CNPJ Validator Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_h5b23zF0Z9FsG4JVtouuZu9rJr0WPyPK7WWuZJWt/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — CNPJ Validator capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "cnpj-validator-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_h5b23zF0Z9FsG4JVtouuZu9rJr0WPyPK7WWuZJWt/mcp"
    }
  }
}
Copy into chat04
  • Validate this CNPJ number: [insert number].

  • Check this list of CNPJs from my CSV file for structural validity.

  • Run a batch validation on these IDs: [paste list].

  • Tell me which CNPJs in this text block are invalid.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect CNPJ Validator once, then ask.

One click connects this MCP to your AI client. Your credentials stay encrypted, and you can start validating immediately.

Connect CNPJ Validator to your AI

FAQ

How the validator behaves

  • 01

    Does this check if the business is actually active?

    No. This only checks if the number is mathematically valid. It does not query government databases for registration status.

  • 02

    Can the AI fix a typo in a CNPJ?

    No. The AI identifies that a number is invalid, but it won't guess what the correct number should be. You have to fix those manually.

  • 03

    Can I upload a whole Excel file?

    Yes. You can provide the data from your files, and the AI will use batch processing to check them all.

  • 04

    Will the AI change my original files?

    No. The AI only reads the data you provide to perform the validation. It does not write back to or modify your local files.

  • 05

    Does it work for any Brazilian ID?

    This specific tool is built for CNPJ numbers. It is not designed for CPF or other identification formats.

  • 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