MCP Brazil Public Data
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Brazil Public Data Look up company data for CNPJ 00000000000191"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.

MCP Brazil Public Data
A modern Model Context Protocol server for Brazilian public data, backed by BrasilAPI — no API key required. Exposes 15 tools and 2 guided prompts covering companies (CNPJ), postal codes (CEP), banking, economy, geography, and more.
Inspired by the project alanpcf/brasil-data-mcp, but adding Streamable-HTTP transport.
Requirements
Python 3.10+
uv (or Docker, for the containerized setup)
Related MCP server: brasilapi-mcp
Installation
uv venv
uv pip install -e ".[dev]"Running
The server supports two transports, selected via the MCP_TRANSPORT environment variable (see Configuration).
STDIO
The server speaks MCP over stdio by default (the transport used by most MCP clients such as Claude Desktop and Claude Code):
source .venv/bin/activate
mcp-brazil-public-dataStreamable HTTP
To serve over streamable HTTP instead:
source .venv/bin/activate
MCP_TRANSPORT=http mcp-brazil-public-dataThe HTTP endpoint is then available at http://0.0.0.0:8080/mcp/.
Docker
Build the image and run it in HTTP mode (the image defaults to HTTP on port 8080):
docker build -t mcp-brazil-public-data .
docker run --rm -p 8080:8080 mcp-brazil-public-dataOverride any setting at runtime with -e, e.g. a different port:
docker run --rm -p 9000:9000 -e MCP_PORT=9000 mcp-brazil-public-dataConfiguration
Variable | Default | Description |
|
| Transport to use: |
|
| Host/interface to bind when using HTTP. Use |
|
| Port to listen on when using HTTP. |
Available Tools
Companies & Finance
Tool | Description | Source |
| Company registration data (legal name, status, partners, CNAE) | Federal Revenue |
| CVM-authorized brokerage firm by CNPJ | CVM |
| List of ~250 registered banks | BACEN |
| Bank data by COMPE code | BACEN |
Location & Geography
Tool | Description | Source |
| Full address from a postal code (CEP) | Correios/ViaCEP |
| State and cities served by an area code (DDD) | — |
| 27 states (UFs) with IBGE codes | IBGE |
| Municipalities of a state with IBGE codes | IBGE |
Economy
Tool | Description | Source |
| Current economic indices (SELIC, CDI, IPCA) | BACEN |
| Current value of an index by symbol | BACEN |
| Foreign currencies available for quotes | BACEN |
| PTAX quote of a currency on a date | BACEN |
Reference
Tool | Description | Source |
| National holidays for a year | — |
| Book metadata by ISBN | CBL/Google Books |
| Status of a | Registro.br |
Guided Prompts
Prompt | Description |
| Looks up a CNPJ and produces a structured company analysis |
| Combines current economic rates with the year's holidays |
Development
Testing
Run the test suite with:
pytestLicense
Available Tools
15 toolscheck_br_domainA
Check the status of a .br domain at Registro.br.
Returns the status (available, registered, etc.), suggestions and, for registered domains, the creation, expiration and last-processed dates.
Inputs: domain (required). Returns: object
get_bankA
Get a bank's data by its COMPE code.
Returns ISPB, name, full name and bank code.
Inputs: code (required). Returns: object
get_exchange_rateA
Get the buy/sell exchange rate of a currency on a specific date.
Returns the Central Bank's PTAX rates (buy/sell) for the given date. Note: quotes are only available on business days.
Inputs: date (required), currency (required). Returns: object
get_rateB
Get the current value of an economic rate/index by its symbol.
Returns the name and the current value of the indicator.
Inputs: symbol (required). Returns: object
list_banksA
List all banks registered in Brazil (~250 institutions).
Each item includes the COMPE code (code), ISPB, name and full name.
Useful to discover a bank's code before calling get_bank.
Inputs: no named parameters. Returns: result
list_currenciesA
List the foreign currencies available for quotes (USD, EUR and others).
Each item includes the symbol, name and type of the currency. Use the
returned symbol with get_exchange_rate.
Inputs: no named parameters. Returns: result
list_holidaysA
List the Brazilian national holidays for a given year.
Returns each holiday with its date (YYYY-MM-DD), name and type (national, movable, etc.). Does not include state or municipal holidays.
Inputs: year (required). Returns: result
list_municipalitiesA
List the municipalities of a state with their IBGE codes.
Returns the name and IBGE code of each municipality in the given state.
Inputs: uf (required). Returns: result
list_ratesA
List all available economic rates and indices with their current values.
Includes indicators such as SELIC, CDI and IPCA. Each item has the symbol
(nome) and the value (valor). Source: BACEN via BrasilAPI.
Inputs: no named parameters. Returns: result
list_statesA
List the 27 Brazilian federative units (states) with their IBGE codes.
Each item includes the id (IBGE code), abbreviation (UF), name and region.
Inputs: no named parameters. Returns: result
lookup_brokerA
Look up a CVM-authorized brokerage firm by its CNPJ.
Returns trade name, legal name, status, address and contacts registered with the CVM (Brazilian Securities and Exchange Commission).
Inputs: cnpj (required). Returns: object
lookup_cepA
Look up the full address for a Brazilian postal code (CEP).
Returns street, neighborhood, city, state (UF) and, when available, geographic coordinates. Uses BrasilAPI's CEP v2 endpoint, which aggregates multiple providers (Correios, ViaCEP and others).
Inputs: cep (required). Returns: object
lookup_cnpjA
Look up the registration data of a Brazilian company by its CNPJ.
Returns legal name, trade name, registration status, legal nature, CNAE (primary and secondary activities), address, partners (QSA) and share capital. Source: Brazilian Federal Revenue via BrasilAPI.
Inputs: cnpj (required). Returns: object
lookup_dddA
Look up the state and cities served by a Brazilian area code (DDD).
Returns the state (UF) and the list of municipalities covered by the code.
Inputs: ddd (required). Returns: object
lookup_isbnA
Look up a book's metadata by its ISBN.
Returns title, authors, publisher, year, synopsis and dimensions when available, aggregating providers such as CBL, Mercado Editorial and Google Books.
Inputs: isbn (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Most tools are distinct (CNPJ, CEP, DDD, ISBN, bank, broker, domain are clearly separate). However, list_rates/get_rate and list_currencies/get_exchange_rate are legitimate duos, but list_banks/get_bank alongside list_rates/get_rate create a repetitive pattern where the list/get pairing could cause an agent to pick the wrong 'get' for a given symbol/code. list_states and list_municipalities are related but distinct enough.
The set follows a mostly consistent pattern: list_X for enumeration (list_states, list_banks, list_holidays, list_rates, list_currencies, list_municipalities), lookup_X for single-record lookups by identifier (lookup_cnpj, lookup_cep, lookup_ddd, lookup_isbn, lookup_broker), and get_X for fetching specific values (get_bank, get_rate, get_exchange_rate). The mixing of 'lookup' and 'get' for similar operations is the only inconsistency, though both are clear.
15 tools is slightly on the higher side but reasonable for a broad 'public data' server covering multiple domains (geography, companies, finance, telecom, books, domains). Each tool targets a distinct data source, so none feel redundant. Could arguably be trimmed, but the scope justifies the count.
The server covers a broad but shallow set of disjoint domains. Within each domain there are clear gaps: holidays has no state/municipal holidays (noted in description), banks has list+get but no search-by-name, rates/currencies are read-only with no historical range beyond specific date for exchange. The domain is inherently a heterogeneous reference service, so completeness is hard to define, but several common lookups (e.g., CNPJ search by name, CEP range) are absent.
Maintenance
Related MCP Connectors
Brazil CNPJ, CEP, Selic/IPCA/PTAX, holidays, banks/ISPB for agents. Pay per call in USDC (x402).
IBGE: geography, census, economy and health from the official APIs, with provenance. 23 tools.
Brazil CNPJ KYB dossier, IBGE CEP lookup, CPF/CNPJ validator & PIX EMVCo CRC16 via x402 Base USDC.
Brazilian company data & sanctions screening for AI agents. Certified. Pay-per-call x402.
Related MCP Servers
- AlicenseAqualityDmaintenanceExposes the BrasilAPI as MCP tools, enabling AI agents to query Brazilian public data such as CEP, CNPJ, DDD, IBGE, banks, PIX, FIPE, NCM, exchange rates, taxes, weather, CVM information, holidays, ISBN, domains, stock tickers, and TUSS.41Apache 2.0
- AlicenseAqualityCmaintenanceEnables LLM clients to query public Brazilian data through tools for CEP addresses, CNPJ registrations, banks, FIPE vehicle prices, national holidays, and DDD area codes, with no API key required.8MIT
- AlicenseAqualityCmaintenanceExposes Brazilian public data — postal codes (CEP), company registrations (CNPJ), CPF/CNPJ validation, banks, national holidays, municipalities, and DDD area codes — as MCP tools and resources, backed by BrasilAPI, ViaCEP, and IBGE with caching, fallback, and rate limiting. Any MCP client such as Claude Desktop or Claude Code can query and validate this reference and registration data through natural language or programmatic calls.1MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to query Brazilian public data through BrasilAPI, including company registry details and partners by CNPJ, addresses by CEP, and national holidays. It also performs offline CNPJ/CPF validation before any network request and does not store queried numbers.560 npmMIT