Skip to content

Brazil CNPJ company registry

by bnovarini · remote · no sign-in to list tools · v0.1.0 · published by GitHub user bnovarini

Brazil's open CNPJ registry: filter and count companies by sector, place, size, MEI, partners.

Changes · 2

8 tools: 2 change things and 6 only read.

Scanned Oct 21, 2026

1 check matched something in the tool definitions. No finding is not a safety guarantee. How the checks work.

claude mcp add --transport http cnpj https://cnpj-mcp.fly.dev/mcp

Findings

Matches of fixed checks, with the text they matched.

1 info
  • The description is 2,171 characters long, over the 2,000 this check looks for.

    Matched text

    description ends: "...all scans at most 2000 candidates and returns pagination.next_offset to continue."

    What this check looks for

Tools

Open a tool for its reasons and full description. Descriptions are the publisher's own words, shown as they are.

8 tools

Changes things 2Claude Code: ask
  • companies_at_addressEstablishments registered at one address, by CEP (8 digits), optionally narrowed by street text, number, municipio or uf.No findings

    Why it is in this group

    • Nothing in its name or description says what it does, so it is counted as a write.
    Description, as the server wrote it
    Establishments registered at one address, by CEP (8 digits), optionally narrowed by street text, number, municipio or uf. Use it to find companies sharing an address.
  • dataset_infoWhat data is loaded: source, snapshot month, row counts, field meanings and caveats.No findings

    Why it is in this group

    • Nothing in its name or description says what it does, so it is counted as a write.
    Description, as the server wrote it
    What data is loaded: source, snapshot month, row counts, field meanings and caveats. Call first if unsure what the tools cover.
Only reads 6Claude Code: allow
  • count_companiesCount companies or establishments, optionally grouped by one or two fields.No findings

    Why it is in this group

    • The name "count_companies" says "count": a word for reading.
    Description, as the server wrote it
    Count companies or establishments, optionally grouped by one or two fields. Filters (all optional, combined with AND): cnae (CNAE code or prefix, e.g. '4711' or '47', list ok; add include_secondary to also match secondary activities), cnae_secao (letter A-U), uf, municipio (name as in Receita, accents ignored), municipio_codigo, situacao (ativa, baixada, suspensa, inapta, nula), matriz_only, porte (micro = ME, pequeno = EPP, demais, nao_informado), natureza_juridica (code prefix like '2062' or text like 'sociedade limitada'), capital_min/capital_max (BRL), opened_from/opened_to (data_inicio_atividade, YYYY-MM or YYYY-MM-DD), closed_from/closed_to (data da baixa), mei, simples (true/false), name_contains (razao social or nome fantasia; 3-256 characters and uf required), cep, partner_name (a partner's name contains this text). group_by options: uf, municipio, cnae_principal, cnae_divisao, cnae_secao, natureza_juridica, porte, situacao, ano_abertura, mes_abertura, ano_baixa, mes_baixa, mei, simples, matriz_filial, motivo_situacao. unit='estabelecimentos' (default) counts every CNPJ incl. filiais; unit='empresas' counts companies (matriz only). metric='sum_capital' sums declared capital social (BRL, companies only). Examples: MEIs opened per month in a state, active agro companies per municipality, closures by year.
  • get_companyOne company by CNPJ (14 digits, with or without punctuation; or the 8-digit root to get the matriz): registration, company data, Simples/MEI, address and contacts, secondary CNAEs,…Reads private dataNo findings

    Why it is in this group

    • The name "get_company" says "get": a word for reading.

    What it can reach

    • private-dataThe description's first sentence says "contact": it reads contacts.
    Description, as the server wrote it
    One company by CNPJ (14 digits, with or without punctuation; or the 8-digit root to get the matriz): registration, company data, Simples/MEI, address and contacts, secondary CNAEs, partners (with names), and how many establishments the company has.
  • list_partnersPartners (socios) of one company by CNPJ root or full CNPJ: names, type, role (qualificacao), entry date, age band.No findings

    Why it is in this group

    • The name "list_partners" says "list": a word for reading.
    Description, as the server wrote it
    Partners (socios) of one company by CNPJ root or full CNPJ: names, type, role (qualificacao), entry date, age band. CPFs are masked by Receita. faixa_etaria: 1 = 0-12, 2 = 13-20, 3 = 21-30, 4 = 31-40, 5 = 41-50, 6 = 51-60, 7 = 61-70, 8 = 71-80, 9 = over 80, 0 = not applicable.
  • lookup_codesLook up Receita's code tables by text or code.Reads private dataNo findings

    Why it is in this group

    • The name "lookup_codes" says "lookup": a word for reading.

    What it can reach

    • private-dataThe description's first sentence says "table": it reads databases.
    Description, as the server wrote it
    Look up Receita's code tables by text or code. kind: cnae (activity), natureza_juridica (legal form), municipio, motivo (reason for status), qualificacao (partner role), pais. Use it to find the CNAE code for a sector, or the municipio name Receita uses, before filtering.
  • search_companiesFind companies/establishments matching filters.1 finding

    Why it is in this group

    • The name "search_companies" says "search": a word for reading.

    Findings

    • Info

      The description is 2,171 characters long, over the 2,000 this check looks for.

      Matched text

      description ends: "...all scans at most 2000 candidates and returns pagination.next_offset to continue."

      What this check looks for
    Description, as the server wrote it
    Find companies/establishments matching filters. Filters (all optional, combined with AND): cnae (CNAE code or prefix, e.g. '4711' or '47', list ok; add include_secondary to also match secondary activities), cnae_secao (letter A-U), uf, municipio (name as in Receita, accents ignored), municipio_codigo, situacao (ativa, baixada, suspensa, inapta, nula), matriz_only, porte (micro = ME, pequeno = EPP, demais, nao_informado), natureza_juridica (code prefix like '2062' or text like 'sociedade limitada'), capital_min/capital_max (BRL), opened_from/opened_to (data_inicio_atividade, YYYY-MM or YYYY-MM-DD), closed_from/closed_to (data da baixa), mei, simples (true/false), name_contains (razao social or nome fantasia; 3-256 characters and uf required), cep, partner_name (a partner's name contains this text). Returns up to 100 rows per page, ordered by opening date (newest first) unless order_by is capital_social or razao_social. Use count_companies for 'how many' questions. Set include_contacts to add email, phones, full address and a registry_contact_quality block (0-100 score of how likely the REGISTERED email/phone from Receita is a real direct contact, with the signals behind it; it says nothing about the website) and, when the company's own website was crawled, a separate website_contacts block (WhatsApp, phones, emails, social profiles found on its public pages, each with source_url). A whatsapp_business block appears only when a WhatsApp Business account was found on one of the registered phones (display name, account type, name_match score, checked_at); phones are checked in the background after a query shows them, so a result can appear on a later call, and its absence says nothing about whether the number is on WhatsApp. min_contact_score keeps only companies whose REGISTERED contact (the email and phones on the Receita record, not the website) scores at or above it. Pass an integer 0-100, or a tier name: 'high' = 85, 'medium' = 50, 'low' = 0 (e.g. min_contact_score=50 or 'medium' for medium and high). The filter is applied after the page is read, so a call scans at most 2000 candidates and returns pagination.next_offset to continue.
  • search_partnersFind the companies a person or entity is a partner of, by name.No findings

    Why it is in this group

    • The name "search_partners" says "search": a word for reading.
    Description, as the server wrote it
    Find the companies a person or entity is a partner of, by name. Exact (accent-insensitive, case-insensitive) match on the partner name by default; set contains=true for a substring match (uf required). Optionally narrow with cpf_middle (the 6 digits Receita publishes, e.g. '240659') because the same name can belong to different people. Returns company name, status and role.

This is not a safety rating, and no finding is not a safety guarantee. The groups and findings come from fixed checks of the tool definitions the server returned on the date shown, not from its code or what it does when called. How the checks work.

Exfil surface

Which tools read private data, which read text someone else can write, and which can send data out. One of each is a path a prompt injection can use.

No private-data, untrusted-input, outbound path in this server alone: no tool is tagged untrusted-input or outbound.

Reads private data2
Reads files, mail, messages, databases, secrets, calendars or repositories.
Reads text others write0
Brings in text someone else can write: web pages, inbound email, messages, issues and comments.
Can send data out0
Can carry data to people or systems: it sends, posts or publishes, or takes a recipient, channel or URL.

Other servers in the same agent add their own tools to these paths. Audit your whole setup to see them together.

Install

Pinned to version 0.1.0. Values in angle brackets are yours to fill in.

claude mcp add --transport http cnpj https://cnpj-mcp.fly.dev/mcp

Run in a terminal.

Claude Code permissions

Allow the reads, ask before a change or a way out, deny the deletes. Paste into .claude/settings.json.

.claude/settings.json
{
  "permissions": {
    "allow": [
      "mcp__cnpj__search_companies",
      "mcp__cnpj__count_companies",
      "mcp__cnpj__get_company",
      "mcp__cnpj__list_partners",
      "mcp__cnpj__search_partners",
      "mcp__cnpj__lookup_codes"
    ],
    "ask": [
      "mcp__cnpj__dataset_info",
      "mcp__cnpj__companies_at_address"
    ],
    "deny": []
  }
}

Tools that only read are allowed, tools that change things ask first, tools that delete or cancel are denied. A read that can send data out (it takes a URL, say) asks first too. It assumes the server is installed as cnpj. Review it before you use it.

Capability tags behind 2 rules
  • mcp__cnpj__get_company private-data
  • mcp__cnpj__lookup_codes private-data