br-eli-mcp
This server provides access to Brazilian open legal data APIs — covering federal legislation, court dockets, and judicial rulings — without API keys or registration.
Legislative Tools
Search federal bills: List Brazilian federal bills (PL, PLP, PEC, etc.) by type and year from the Câmara dos Deputados.
Get bill details: Fetch full detail and current legislative status for a specific bill by its numeric ID.
Resolve enacted laws: Look up an enacted Norma Jurídica by its
urn:lex:br:URN — returns identification, Diário Oficial publication provenance, amendment history, and STF unconstitutionality notes.Browse law structure: List the addressable structure (parts, titles, chapters, articles, etc.) of a Norma Jurídica by URN Lex.
Read law article text: Fetch the full text of a specific article or structural element of a law by URN Lex and article suffix.
Court Docket Tools (DataJud CNJ — metadata only)
Search court dockets: Search procedural metadata (class, subjects, judging body, timeline) across STJ, TST, TSE, TRFs, TJs, TRTs, TREs, and military courts — does not include ruling text.
Get a specific docket: Fetch one court docket by its exact CNJ unified process number.
Case Law / Ruling Text Tools
STJ rulings: Search and fetch Superior Tribunal de Justiça acordãos with real ementa + decisão text (coverage: May 2022+).
CARF tax rulings: Fetch one CARF (federal tax appeals board) acordão by exact docket or decision number — exact lookup only, no free-text search.
TST labor rulings: Free-text search (AND semantics, exact phrase) across 3.75 million TST rulings, or fetch one by CNJ process number — returns ementa and full inteiro teor.
TCU audit rulings: Free-text search (with field-scoped query syntax) across 525,000+ TCU acordãos on public procurement/spending, or fetch one by number/year/chamber — returns deliberation text, rapporteur's report, and vote.
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., "@br-eli-mcp get details on PL 2597/2024"
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.
br-eli-mcp
MCP server for eight keyless, no-registration Brazilian open-data APIs:
Camara dos Deputados (
dadosabertos.camara.leg.br) - the federal legislative process: bills (proposicoes) as they move through committees and floor votes.Congresso Nacional Dados Abertos Legislativos (
legis.senado.leg.br/dadosabertos) - the real LexML URN Lex resolver for enacted Normas Juridicas (laws, decrees, constitutional amendments): identification, Diario Oficial da Uniao publication provenance, amendment history, STF unconstitutionality notes.normas.leg.br - the full-text companion to (2): real article-by-article text of enacted legislation, addressed by the same URN Lex.
DataJud CNJ (
api-publica.datajud.cnj.jus.br) - court DOCKET metadata (not ruling text) across STJ/TST/TSE/TRFs/TJs/TRTs/TREs and military courts.STJ Open Data Portal (
dadosabertos.web.stj.jus.br) - real acordao (ruling) full text + ementa (headnote) from the Superior Tribunal de Justica, Brazil's second-highest court. Coverage starts May 2022.CARF (
acordaos.economia.gov.br) - real acordao (tax ruling) full text from Brazil's federal tax appeals board, by exact docket/decision number.TST (
jurisprudencia-backend2.tst.jus.br) - real ruling full text (inteiro teor) + ementa from the Tribunal Superior do Trabalho, Brazil's labor supreme court: free-text search and exact CNJ-process-number lookup (3,751,594 acordaos, 8,483,448 documents across all types - verified live 2026-07-07).TCU (
pesquisa.apps.tcu.gov.br) - real acordao full text (deliberation, rapporteur's report, vote) from the Tribunal de Contas da Uniao, the Federal Court of Accounts - public-procurement jurisprudence (525,620 acordaos - verified live 2026-07-07).
What this is (and isn't)
br_get_norma resolves a urn:lex:br:... against the Senado's own API gateway
(public, no key or registration) and returns identification, publication provenance,
and amendment history. br_get_norma_index + br_get_norma_texto resolve the same
URN against normas.leg.br's structured Legislation tree for the real text of one
article - not a summary. See DISCOVERY.md for how both endpoints were
found: v0.1.0 tested the wrong host for identification and wrongly reported it as
unconfirmed; v0.2.0 fixed that but still lacked full text; v0.3.0 found the
full-text API on the same domain as the human-readable citation page.
This connector does not scrape Planalto (planalto.gov.br) HTML - no confirmed
mechanical rule maps a URN Lex to a Planalto URL for every act type, and fabricating
one would risk the citation-hallucination failure mode this fleet exists to prevent.
Re-verified live 2026-07-07: legislacao.presidencia.gov.br (the REFLEGIS portal
the manifest names) does not return a plain HTTP response to a keyless client at
all - the connection is accepted but the request times out with zero bytes
received, consistent with a bot-challenge/WAF in front of it, not a structured API.
A minority of act types (mostly decrees) have no inline text in normas.leg.br
either; for those, see DISCOVERY.md.
For case law, DataJud (docket metadata only, redistribution restricted by CNJ
Resolution 446/2022), the STJ Open Data Portal (real acordao text, May 2022+),
CARF (real tax-ruling text, exact lookup only), TST (real ruling text - free-text
search and exact CNJ-process-number lookup, both confirmed live 2026-07-07 after
a browser network trace of the real frontend revealed the request fields the
earlier reverse-engineering missed) and TCU (real acordao/relatorio/voto text)
are wired in below. TRF4/TRF5 were probed and rejected - their hosts never accept
a connection from outside Brazil (geo_restricted) - and RFB's sijut2consulta is
a scrape-class HTML app with no JSON backend. See DISCOVERY.md
for the exact probes run and each confirmed request/response contract.
Related MCP server: senado-br-mcp
Tools
Tool | Purpose |
| List bills by type ( |
| Full detail + current status for one bill by id |
| Resolve an enacted Norma Juridica by URN Lex - identification, DOU provenance, amendment history, STF notes |
| List the addressable structure of a Norma (parts, books, titles, chapters, sections, articles) |
| Fetch the real text of one article (dispositivo) of a Norma |
| Search court dockets (metadata only) in one tribunal's DataJud CNJ index |
| Fetch one court docket by exact CNJ unified process number |
| Search STJ acordaos (real ruling text) by process number or free text |
| Fetch one STJ acordao by exact process number - ementa + ruling body text |
| Fetch one CARF tax acordao by exact docket or decision number - ementa + ruling body text |
| Search TST labor-court rulings by free text (real ruling text; 3.75M acordaos) |
| Fetch one TST ruling by exact CNJ unified process number - ementa + inteiro teor |
| Search TCU (Federal Court of Accounts) acordaos by free text (525K acordaos) |
| Fetch one TCU acordao by (numero, ano, colegiado) - deliberation + report + vote text |
| Declare what this connector covers, when each family was captured, and - explicitly - what it does NOT cover. Every gap carries a fallback. |
Bill type codes (sigla_tipo), for reference:
Code | Portuguese | English |
| Projeto de Lei | ordinary bill |
| Projeto de Lei Complementar | complementary-law bill (implements a constitutional provision) |
| Proposta de Emenda a Constituicao | constitutional amendment proposal |
Every response carries lex_uri, human_readable_citation and source_url.
For br_search_proposicoes/br_get_proposicao, lex_uri is Camara's own stable
API URI (not a URN Lex - a bill isn't enacted law yet). For br_get_norma,
lex_uri is the real urn:lex:br:... you queried with, e.g.
"urn:lex:br:federal:lei:2002-01-10;10406" (Codigo Civil). For br_get_norma_texto,
lex_uri is that URN plus the article suffix, e.g. "...;10406!art5".
Install
As a Claude plugin (Claude Code or the desktop app, needs uv):
/plugin marketplace add matematicsolutions/br-eli-mcp
/plugin install br-eli-mcp@br-eli-mcpAs a plain Python package:
pip install br-eli-mcpWindows 11 with Smart App Control
Smart App Control blocks unsigned executables, which covers uvx.exe, pip.exe
and the br-eli-mcp.exe launcher that pip writes at install time. The python.exe and
py.exe from the python.org installer are signed by the Python Software
Foundation, so running the module through the interpreter works:
python -m pip install br-eli-mcp
python -m br_eli_mcppip.exe is blocked for the same reason, so install with python -m pip, not
pip install. If python is not on PATH, use the Windows launcher: py -3 -m br_eli_mcp.
{ "mcpServers": { "br-eli-mcp": { "command": "python", "args": ["-m", "br_eli_mcp"] } } }Do not turn Smart App Control off to work around this - it cannot be re-enabled without reinstalling Windows.
Configuration
Env var | Default |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Data
The server runs on your machine. Each tool call sends your query to the official Brazilian public API it names above (Camara, Senado, normas.leg.br, DataJud CNJ, STJ, TST, TCU or CARF); nothing goes to MateMatic. Your query and the results also pass through whatever model you use, the same way as any other message.
Once, on first use, the standalone server also fetches a small configuration file
(br-runtime.json.gz, updated source addresses) from this repository's GitHub Releases.
That request carries no query content; GitHub's download counter for the file is the only
usage signal we see. BR_ELI_RUNTIME_URL="" turns it off, and the Claude plugin ships
with it off.
Two things are written locally, in your home directory:
a response cache (
~/.matematic/cache/br-eli), so a repeated lookup does not hit the source again. Court rulings are public records and can name the parties.an audit log (
~/.matematic/audit/br-eli-mcp.jsonl), one line per tool call: the tool name, a SHA-256 hash of the input (not the input itself), result size, time and status.
Delete either folder at any time; BR_ELI_CACHE_DIR and BR_ELI_AUDIT_DIR move them.
License
Apache-2.0 (code). The Camara dos Deputados open-data API is open data requiring attribution - see SOURCES.md.
Available Tools
15 toolsbr_coverageARead-onlyIdempotent
Declare what this connector covers, how it is sourced, and what it does NOT cover.
Call this before telling a user that the law "does not contain" something, and whenever a search comes back empty: the absence may be a gap in this connector rather than in the law. Every gap carries a fallback saying where to look instead.
Returns:
Coverage with families, an as-of note, and a non-empty list of known gaps.
Inputs: no named parameters. Returns: What this connector covers, how it is sourced, and what it does not cover.
br_get_case_carfARead-onlyIdempotent
Fetch one CARF (tax appeals) acordao by exact docket or decision number.
Exactly one of numero_processo / numero_decisao must be given - this
is an exact lookup, not a search. There is no free-text search tool for
CARF because its full-text index is not reliably populated upstream
(confirmed empty on live probing for common Portuguese terms).
Inputs: numero_decisao, numero_processo. Returns: object
br_get_case_stjARead-onlyIdempotent
Fetch one STJ acordao by its exact numeroProcesso, with real ruling text.
Inputs: orgao (required), numero_processo (required). Returns: object
br_get_case_tcuARead-onlyIdempotent
Fetch one TCU acordao with the real ruling text: acordao_texto
(deliberation), relatorio (rapporteur's report) and voto (vote).
A TCU acordao is uniquely identified by (numero, ano, colegiado) - the
same numero/ano recurs across the Plenario and the two Camaras. When
colegiado is omitted and more than one acordao matches, this errors
and lists the matching bodies instead of guessing.
Inputs: ano (required), numero (required), colegiado. Returns: object
br_get_case_tstARead-onlyIdempotent
Fetch one TST ruling by its exact CNJ unified process number - real
ruling text (ementa + inteiro_teor).
Inputs: numero_processo (required), tipo. Returns: object
br_get_normaARead-onlyIdempotent
Resolve a Brazilian Norma Juridica (enacted law/decree/amendment) by its URN Lex.
Identification + Diario Oficial da Uniao publication provenance + amendment history + any STF unconstitutionality notes - NOT the full compiled article text (no confirmed URL rule to Planalto; see DISCOVERY.md).
Inputs: urn (required). Returns: object
br_get_norma_indexARead-onlyIdempotent
List the addressable structure of a Norma Juridica: parts, books, titles, chapters, sections, and articles, in document order.
Use this to find the dispositivo suffix for the article you need (e.g.
"art5"), then pass it to br_get_norma_texto - do not guess a suffix.
Inputs: urn (required). Returns: object
br_get_norma_textoARead-onlyIdempotent
Fetch the real text of one dispositivo (article, or a titulo/capitulo header) of a Norma Juridica.
An article's text includes its caput and every paragraph/inciso/alinea beneath it, concatenated in document order - not a summary.
Inputs: urn (required), dispositivo (required). Returns: object
br_get_processoARead-onlyIdempotent
Fetch one court docket by its exact CNJ unified process number.
Inputs: tribunal (required), numero_processo (required). Returns: object
br_get_proposicaoARead-onlyIdempotent
Fetch full detail (including current status) for one bill by its numeric id.
Inputs: id (required). Returns: object
br_search_case_stjARead-onlyIdempotent
Search STJ (Superior Tribunal de Justica) acordaos - real ruling text.
Unlike br_search_processos (DataJud, metadata only), this returns the
actual ementa (headnote) and decisao (ruling body prose) from the
STJ Open Data Portal. Scans the most recent monthly bulk files for one
orgao julgador (chamber/section) - a miss means "not in the scanned
window", not "does not exist". Coverage starts May 2022.
Inputs: orgao (required), query (required), limit. Returns: object
br_search_case_tcuARead-onlyIdempotent
Search TCU (Federal Court of Accounts) acordaos - public-procurement and public-spending jurisprudence.
Returns summaries (sumario) plus the index's own total. Use
br_get_case_tcu for the full ruling text of one acordao. The query
supports the portal's own field-scoped syntax in addition to plain
words, e.g. NUMACORDAO:1771 ANOACORDAO:2026.
Inputs: query (required), limit. Returns: object
br_search_case_tstARead-onlyIdempotent
Search TST (labor supreme court) rulings by free text - real ruling text.
The query goes into the TST frontend's own "contendo as palavras" (AND)
field - quote an expression for an exact-phrase match, e.g.
"adicional de insalubridade". Returns the index's own total plus a
page of records carrying the real ementa and inteiro_teor prose.
Inputs: query (required), tipo, limit. Returns: object
br_search_processosARead-onlyIdempotent
Search court dockets (procedural metadata, NOT ruling text) in one tribunal's DataJud CNJ index.
DataJud carries classe/assuntos/orgaoJulgador and the full procedural
timeline (movimentos) for each docket - it does not carry the prose
text of a ruling/acordao/ementa. STF is not covered (see server docstring).
Inputs: query (required), tribunal (required), limit. Returns: object
br_search_proposicoesARead-onlyIdempotent
List Brazilian federal bills (proposicoes) of a given type and year.
Inputs: ano (required), sigla_tipo (required), itens. 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
Each tool targets a distinct court or legal resource, with clear search/get pairs separated by entity type. Even similar tools like br_search_processos and br_search_case_stj are explicitly disambiguated as metadata-only versus full ruling text.
The br_search_* and br_get_* verb_noun pattern is consistently applied across courts, processes, proposicoes, and normas. The only real deviation is br_coverage, which is a noun-only command rather than a verb-led action.
15 tools is well-scoped for a Brazilian legal research connector spanning multiple courts and legislative sources. Each tool has a distinct responsibility, and the count matches the breadth of the domain without redundancy.
Core search-and-retrieve workflows are covered for TCU, STJ, TST, DataJud processos, proposicoes, and normas. CARF has no free-text search and STF jurisprudence is absent, but the explicit br_coverage tool documents these gaps and provides fallbacks, so agents are not left with silent dead ends.
Maintenance
Related MCP Connectors
MCP server for Brazilian Federal Senate open data (legislative, administrative, e-Cidadania).
An MCP server that provides congressional transcripts
Access U.S. congressional data (bills, votes, members, committees) via MCP.
Brazilian legal stack in one MCP: lawsuits, court publications, case law, tenders, certificates.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that provides access to the Brazilian Chamber of Deputies open data API. It enables users to search for deputies, track their expenses, and query legislative information such as bills and API endpoints.61MIT
- AlicenseBqualityFmaintenanceMCP server for Brazilian Federal Senate open data (legislators, bills, votes, committees)33MIT
- AlicenseAqualityAmaintenanceMCP server for Brazilian Federal Senate open data — 90 tools covering the legislative process, Senate administration, and citizen participation. Hosted on Cloudflare Workers (Streamable HTTP), no authentication required. Tool names and responses are in Portuguese (pt-BR), matching the official Senate data.69163 npm7MIT
- AlicenseAqualityBmaintenanceMCP server for the Congress.gov API that tracks US federal legislative process, providing tools to search bills and get bill details.1131 PyPI1Apache 2.0