Skip to content
MCP server
Registry

BrasilAPI (CNPJ, CEP, validation, holidays) MCP Server

Brazilian public data via BrasilAPI: CNPJ and partners, CEP, CNPJ/CPF validation, holidays

BrasilAPI (CNPJ, CEP, validation, holidays) scores 66 (Good), licensed MIT and written in TypeScript. It installs as a local process. It declares 5 tools. Filed under Uncategorized. GitHub shows 0 stars. Package registries report about 79 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by renatocttiMITTypeScript0 stars
Trust score
66Good
Trust score 66 of 100, Good

Good trust

66 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 66 comes from

22 + 20 + 0 + 10 + 4 + 10 = 66. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity0 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 0 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "renatoctti-brasilapi-mcp": {      "command": "npx",      "args": [        "-y",        "@renatoctti/brasilapi-mcp@0.1.0"      ]    }  }}

Environment variables

This server does not declare environment variables.

Tools5Tool docs quality grade C

All capabilities
  • National holidays of a year, with weekdays.

  • Street, neighborhood, city, state, IBGE code and coordinates for a CEP.

  • Legal name, registration status, main activity, address, size, tax regime and partners (QSA) of a company. Accepts CNPJ with or without punctuation, numeric or alphanumeric.

  • Checks format and check digits, numeric and alphanumeric CNPJ.

  • Checks format and check digits of a CPF. Nothing is stored or sent.

About

brasilapi-mcp

An MCP server that gives AI assistants Brazilian public data through BrasilAPI: company registry lookups by CNPJ (including partners), addresses by CEP, offline CNPJ/CPF validation and national holidays.

It was built from experience with company due-diligence (KYC) workflows, where an agent has to check that a company exists, is active and who its partners are, and must not trust a number that fails its check digits. It is an independent project and is not affiliated with BrasilAPI or the Receita Federal.

Tools

ToolWhat it doesNetwork
lookup_cnpjLegal name, registration status, main activity, address, size, tax regime and partners (QSA) of a company. Accepts CNPJ with or without punctuation, numeric or alphanumeric.BrasilAPI
validate_cnpjChecks format and check digits, numeric and alphanumeric CNPJ.none
validate_cpfChecks format and check digits of a CPF. Nothing is stored or sent.none
lookup_cepStreet, neighborhood, city, state, IBGE code and coordinates for a CEP.BrasilAPI
list_holidaysNational holidays of a year, with weekdays.BrasilAPI

lookup_cnpj rejects a number with wrong check digits before making any request, so a typo costs nothing and never reaches the API. Partner CPFs come masked by the registry (***123456**); the server does not unmask or store anything.

Example, lookup_cnpj with include_partners: false:

{
  "cnpj": "00000000000191",
  "razaoSocial": "BANCO DO BRASIL SA",
  "situacaoCadastral": { "descricao": "ATIVA", "desde": "2005-11-03", "motivo": "SEM MOTIVO" },
  "tipo": "MATRIZ",
  "naturezaJuridica": "Sociedade de Economia Mista",
  "cnaePrincipal": { "codigo": 6422100, "descricao": "Bancos múltiplos, com carteira comercial" },
  "endereco": { "municipio": "BRASILIA", "uf": "DF", "cep": "70040912", "...": "..." },
  "totalSocios": 41
}

Install

Requires Node 20 or newer.

Claude Code:

claude mcp add brasilapi -- npx -y @renatoctti/brasilapi-mcp

Claude Desktop, Cursor and other clients that read an mcpServers block:

{
  "mcpServers": {
    "brasilapi": {
      "command": "npx",
      "args": ["-y", "@renatoctti/brasilapi-mcp"]
    }
  }
}

From source:

git clone https://github.com/renatoctti/brasilapi-mcp
cd brasilapi-mcp
npm install
npm run build
node dist/src/index.js   # speaks MCP over stdio

Notes

  • Data source. BrasilAPI is a free community service that aggregates public data. It has rate limits, and the server reports a 429 in plain words instead of retrying. Each request has a 10 second timeout.
  • Identification. BrasilAPI sits behind a firewall that refuses requests from anonymous default HTTP agents, so every request carries User-Agent: brasilapi-mcp/<version> (+repo url).
  • Alphanumeric CNPJ. Since 2026 the Receita Federal issues CNPJs with letters. The validator follows the published check-digit rule (the value of a character is its ASCII code minus 48). Whether a lookup finds the company depends on BrasilAPI having it.
  • Freshness. Registry data can be days behind the Receita Federal. Treat it as a first check, not as a certificate.
  • No state. The server keeps nothing between calls and writes no logs of the numbers you ask about; the only output on stderr is a start-up line.

Development

npm test        # builds, then runs the unit and protocol tests (no network)
npm run smoke   # starts the built server over stdio and calls every tool on the real API

The tests cover the check-digit rules (numeric and alphanumeric CNPJ, CPF), the reshaping of each answer, the error paths (not found, rate limit, unreachable) and the server itself through an in-memory MCP client, with a fake fetch standing in for BrasilAPI.

License

MIT

Frequently asked questions

What is BrasilAPI (CNPJ, CEP, validation, holidays) MCP Server?

Brazilian public data via BrasilAPI: CNPJ and partners, CEP, CNPJ/CPF validation, holidays

How do I install BrasilAPI (CNPJ, CEP, validation, holidays) MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. BrasilAPI (CNPJ, CEP, validation, holidays) MCP Server runs locally from the npm package @renatoctti/brasilapi-mcp with the command npx -y @renatoctti/brasilapi-mcp@0.1.0.

Is BrasilAPI (CNPJ, CEP, validation, holidays) MCP Server free and open source?

Yes. BrasilAPI (CNPJ, CEP, validation, holidays) MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does BrasilAPI (CNPJ, CEP, validation, holidays) MCP Server support remote (HTTP) connections?

No remote endpoint is listed for BrasilAPI (CNPJ, CEP, validation, holidays) MCP Server. It runs locally on your machine over stdio, started by your MCP client.

What tools does BrasilAPI (CNPJ, CEP, validation, holidays) MCP Server provide?

BrasilAPI (CNPJ, CEP, validation, holidays) MCP Server provides 5 tools, including list_holidays, lookup_cep, lookup_cnpj, and validate_cnpj. See the full tool list for descriptions and parameters.

How is BrasilAPI (CNPJ, CEP, validation, holidays) MCP Server's trust score calculated?

BrasilAPI (CNPJ, CEP, validation, holidays) MCP Server scores 66 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server