The lakebrasil MCP server

A hosted, remote MCP server that gives your AI agent Brazil's data, curated. It is lake-first: 24 curated queries over a lake of 15 tables (~44.7M rows) keyed by the IBGE 7-digit ibge_code answer most questions; when the agent needs "right now", the fontes_* tools reach 153 live operations on gov.br APIs.

Connect

The server speaks MCP over streamable HTTP. All it needs is its URL and your key in an Authorization: Bearer header. Create a free account, then:

Connect

export LAKEBRASIL_API_KEY=lb_live_...

claude mcp add --transport http lakebrasil https://lakebrasil-nonprod-1n3kwbyyi5.gateway.bedrock-agentcore.sa-east-1.amazonaws.com/mcp \
  --header "Authorization: Bearer $LAKEBRASIL_API_KEY"
  • Claude Code — run the command once; the server is available in every session.
  • Cursor — paste into ~/.cursor/mcp.json (or .cursor/mcp.json in a project).
  • Kiro — paste into .kiro/settings/mcp.json in your workspace (or ~/.kiro/settings/mcp.json for every workspace).
  • Claude Desktop — paste into claude_desktop_config.json. Desktop's config launches local processes, so mcp-remote bridges to the hosted server (needs Node.js). The header goes through an env var, with no space after Authorization:, because some clients don't escape spaces inside args.
  • Any other client with remote-server support — use the same URL and header.

Tools

Nine tools. Some clients show them with a server prefix (e.g. lakebrasil___municipio_perfil) — same tools. You don't pick tools yourself: ask a question and the agent follows the tool descriptions — search, describe, then execute.

Curated queries (the lake)

  • consultas_buscar(pergunta?)free

    First step for most questions: lists or searches the curated queries over the lake — municipality profile, series and rankings of ~700 indicators, foreign trade, companies by CNAE, spending, parliamentary amendments, the Chamber of Deputies, vehicle fleet, fuel stations, macro series, postal codes.

  • consultas_descrever(id)free

    One query's contract: JSON schema of its params, documented columns (with units), row and page limits, cost and an example. Called before consultas_executar.

  • consultas_executar(id, params?, cursor?)the query's cost / page

    Runs a curated query with validated params (a municipality is an ibge_code or "Name/UF"). Returns columns, rows, lineage (fonte) and a cursor for the next page.

Shortcuts for the most common queries

  • municipio_perfil(municipio)1 credit

    Shortcut: one municipality at a glance — population, GDP, HDI, health, education, public finance, sanitation, elected mayor.

  • indicador_serie(municipios, indicador_id, periodo_inicio?, periodo_fim?, cursor?)2 credits / page

    Shortcut: time series of one indicator (from indicadores_buscar) for 1–10 municipalities.

  • ranking(indicador_id, uf?, regiao?, periodo?, top?, ordem?)3 credits

    Shortcut: top N (≤ 100) municipalities by an indicator — Brazil-wide, in a state or a region; defaults to the latest period.

Live gov.br operations

  • fontes_buscar(pergunta, limite?)free

    Keyword search. Returns the lake queries that cover the topic first, then live operations (153 across ~55 gov.br sources).

  • fontes_descrever(operacao)free

    One live operation's contract: full description, JSON schema of its params, cost, cache TTL and caveats (LGPD, license, coverage).

  • fontes_consultar(operacao, params?)1 credit

    Runs a live gov.br operation with params validated against fontes_descrever's schema — straight to the source's own API.

The live operations wrap ~55 official sources:

FamilySources
Economy & marketsCentral Bank (Selic, IPCA, exchange rates, SGS series), IPEA, B3, CVM, BNDES, household survey (PNAD)
Politics & justiceChamber of Deputies, Senate, electoral court (TSE), Official Gazette, federal audit court (TCU), court statistics (DataJud)
Public spendingTransparency Portal, SICONFI, federal budget, Transferegov, parliamentary amendments, public procurement, FNDE
Social programsBolsa Família, BPC, Pé-de-Meia, Farmácia Popular
Health & educationOpenDataSUS, ANS, Anvisa, immunization, INEP, higher-education registry
Territory & referenceIBGE (incl. maps), municipalities, states, postal-code (CEP) and company (CNPJ) lookups
Energy, transport & environmentANEEL, ANP, ANTT, ANA, INPE, vehicle fleet, sanitation (SNIS/SINISA)

Example prompts

Try asking

Give me a profile of Santos/SP: population, GDP per capita, HDI, IDEB
and who was elected mayor in 2024.

Which 10 municipalities in São Paulo state have the most formal jobs
(RAIS)? Cite the source of each number.

Compare Recife and Fortaleza on Bolsa Família beneficiaries since 2023.

What's the current Selic rate, and how did it move over the last 12
months?

What the agent does with the first one — the tool call it makes (see the queries reference for every query's params, cost and a real result):

municipio_perfil

Give me a profile of Santos/SP: population, GDP per capita, HDI, IDEB
and who was elected mayor in 2024.
Ask your agentWhat it runs
"Give me a profile of Santos/SP"municipio_perfil
"Top 10 municipalities in São Paulo state by formal jobs"consultas_buscar → indicadores_buscar → ranking
"Compare Recife and Fortaleza on Bolsa Família since 2023"indicador_serie
"What did Santos export by year?"consultas_executar comex_municipio
"What's the Selic rate today?"fontes_buscar → fontes_consultar (Central Bank, live)

Credits and limits

Every new key starts with 50 free credits; each call then spends from the balance:

CallCredits
consultas_buscar, consultas_descrever, fontes_buscar, fontes_descreverfree
A query — consultas_executar, municipio_perfil, indicador_serie, ranking0–5 per page (see each)
fontes_consultar (a live operation)1

Each key also has a budget of 10,000 rows per day and 60 calls per minute. When the balance can't cover a call, the tool returns an insufficient-credits error. Check your balance in the console; see pricing for credit packs.

Was this page helpful?