Skip to main content
Glama

Brazil CNPJ company registry

Server Details

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

If you are the author of this connector, you can claim ownership by verifying the domain or GitHub account it belongs to. Claimed connector authors can inspect health checks, view analytics, and manage their listing.
Status
Healthy
Last Tested
Transport
Streamable HTTP · MCP 2025-11-25
URL
Repository
bnovarini/cnpj-mcp
GitHub Stars
0

TDQS

Score is being calculated.

Available Tools

8 tools
companies_at_addressInspect

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
ufNo
cepNo
limitNo
numeroNo
offsetNo
situacaoNoativa
municipioNo
logradouro_containsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes
count_companiesInspect

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), 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.

ParametersJSON Schema
NameRequiredDescriptionDefault
ufNo
cepNo
meiNo
cnaeNo
unitNoestabelecimentos
limitNo
orderNocount_desc
porteNo
metricNocount
simplesNo
group_byNo
situacaoNo
closed_toNo
municipioNo
opened_toNo
cnae_secaoNo
capital_maxNo
capital_minNo
closed_fromNo
matriz_onlyNo
opened_fromNo
partner_nameNo
name_containsNo
municipio_codigoNo
include_secondaryNo
natureza_juridicaNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes
dataset_infoInspect

What data is loaded: source, snapshot month, row counts, field meanings and caveats. Call first if unsure what the tools cover.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

get_companyInspect

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
cnpjYes
list_partnersInspect

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
cnpjYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes
lookup_codesInspect

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
kindYes
textYes
limitNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes
search_companiesInspect

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), 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). 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.

ParametersJSON Schema
NameRequiredDescriptionDefault
ufNo
cepNo
meiNo
cnaeNo
limitNo
porteNo
offsetNo
simplesNo
order_byNodata_inicio_atividade
situacaoNo
closed_toNo
municipioNo
opened_toNo
cnae_secaoNo
capital_maxNo
capital_minNo
closed_fromNo
matriz_onlyNo
opened_fromNo
partner_nameNo
name_containsNo
include_contactsNo
municipio_codigoNo
include_secondaryNo
min_contact_scoreNo
natureza_juridicaNo
search_partnersInspect

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. 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.

ParametersJSON Schema
NameRequiredDescriptionDefault
ufNo
nameYes
limitNo
offsetNo
containsNo
cpf_middleNo

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updates
    • Changedsearch_companies2 fields changed
      • changedInput schema / properties / min_contact_score / anyOf
        Previous value: -[
        -  {
        -    "type": "integer"
        -  },
        -  {
        -    "type": "null"
        -  }
        -]New value: +[
        +  {
        +    "type": "integer"
        +  },
        +  {
        +    "type": "string"
        +  },
        +  {
        +    "type": "null"
        +  }
        +]
      • changedOutput schema / (root)
        Previous value: -{
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "additionalProperties": true,
        -        "type": "object"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "search_companiesOutput",
        -  "type": "object"
        -}New value: +null
    • Changedsearch_partners1 field changed
      • changedOutput schema / (root)
        Previous value: -{
        -  "properties": {
        -    "result": {
        -      "items": {
        -        "additionalProperties": true,
        -        "type": "object"
        -      },
        -      "title": "Result",
        -      "type": "array"
        -    }
        -  },
        -  "required": [
        -    "result"
        -  ],
        -  "title": "search_partnersOutput",
        -  "type": "object"
        -}New value: +null
  2. 8 tool updates
    • First observedcompanies_at_address
    • First observedcount_companies
    • First observeddataset_info
    • First observedget_company
    • First observedlist_partners
    • First observedlookup_codes
    • First observedsearch_companies
    • First observedsearch_partners

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    B
    maintenance
    Enables querying Brazil's official CNPJ company registry data, counting and listing establishments by municipality, state, CNAE activity, size, or status, with caveats about official dump limitations such as non-IBGE municipality codes and secondary activities.
    4
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server for querying Brazilian CNPJ company data, including partner graphs, address/contact joins, CNAE statistics, and national/annual overviews.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Brazilian company-registry lookup via Receita Federal, allowing AI agents to query CNPJ data.
    21 npm
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    An MCP server for querying data on 27 million Brazilian companies from the Federal Revenue, enabling searches by CNPJ, company name, location, and industry. It supports advanced features like partner discovery, sector benchmarking, and similarity analysis.
    16
    17 npm
    MIT
Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.