{"id":51576141,"url":"https://github.com/matematicsolutions/br-eli-mcp","last_synced_at":"2026-07-11T00:31:53.686Z","repository":{"id":369719681,"uuid":"1290945798","full_name":"matematicsolutions/br-eli-mcp","owner":"matematicsolutions","description":"MCP connector for Brazilian federal bills (Camara dos Deputados) - open data, verifiable citations, no keys required","archived":false,"fork":false,"pushed_at":"2026-07-06T16:38:45.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-06T17:08:06.567Z","etag":null,"topics":["ai-agent","brazil","legal","legaltech","legislation","mcp","mcp-server","model-context-protocol"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matematicsolutions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-06T11:14:25.000Z","updated_at":"2026-07-06T16:38:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/matematicsolutions/br-eli-mcp","commit_stats":null,"previous_names":["matematicsolutions/br-eli-mcp"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/matematicsolutions/br-eli-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matematicsolutions%2Fbr-eli-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matematicsolutions%2Fbr-eli-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matematicsolutions%2Fbr-eli-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matematicsolutions%2Fbr-eli-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matematicsolutions","download_url":"https://codeload.github.com/matematicsolutions/br-eli-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matematicsolutions%2Fbr-eli-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35347554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-10T02:00:06.465Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agent","brazil","legal","legaltech","legislation","mcp","mcp-server","model-context-protocol"],"created_at":"2026-07-11T00:31:49.520Z","updated_at":"2026-07-11T00:31:53.675Z","avatar_url":"https://github.com/matematicsolutions.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# br-eli-mcp\n\n\u003c!-- mcp-name: io.github.matematicsolutions/br-eli-mcp --\u003e\n\nMCP server for eight keyless, no-registration Brazilian open-data APIs:\n\n1. **Camara dos Deputados** (`dadosabertos.camara.leg.br`) - the federal legislative\n   *process*: bills (proposicoes) as they move through committees and floor votes.\n2. **Congresso Nacional Dados Abertos Legislativos** (`legis.senado.leg.br/dadosabertos`) -\n   the real LexML URN Lex resolver for enacted Normas Juridicas (laws, decrees,\n   constitutional amendments): identification, Diario Oficial da Uniao publication\n   provenance, amendment history, STF unconstitutionality notes.\n3. **normas.leg.br** - the full-text companion to (2): real article-by-article text of\n   enacted legislation, addressed by the same URN Lex.\n4. **DataJud CNJ** (`api-publica.datajud.cnj.jus.br`) - court DOCKET metadata (not\n   ruling text) across STJ/TST/TSE/TRFs/TJs/TRTs/TREs and military courts.\n5. **STJ Open Data Portal** (`dadosabertos.web.stj.jus.br`) - real acordao (ruling)\n   full text + ementa (headnote) from the Superior Tribunal de Justica, Brazil's\n   second-highest court. Coverage starts May 2022.\n6. **CARF** (`acordaos.economia.gov.br`) - real acordao (tax ruling) full text from\n   Brazil's federal tax appeals board, by exact docket/decision number.\n7. **TST** (`jurisprudencia-backend2.tst.jus.br`) - real ruling full text (inteiro\n   teor) + ementa from the Tribunal Superior do Trabalho, Brazil's labor supreme\n   court: free-text search and exact CNJ-process-number lookup (3,751,594 acordaos,\n   8,483,448 documents across all types - verified live 2026-07-07).\n8. **TCU** (`pesquisa.apps.tcu.gov.br`) - real acordao full text (deliberation,\n   rapporteur's report, vote) from the Tribunal de Contas da Uniao, the Federal\n   Court of Accounts - public-procurement jurisprudence (525,620 acordaos -\n   verified live 2026-07-07).\n\n## What this is (and isn't)\n\n`br_get_norma` resolves a `urn:lex:br:...` against the Senado's own API gateway\n(public, no key or registration) and returns identification, publication provenance,\nand amendment history. `br_get_norma_index` + `br_get_norma_texto` resolve the same\nURN against `normas.leg.br`'s structured Legislation tree for the real text of one\narticle - not a summary. See [DISCOVERY.md](DISCOVERY.md) for how both endpoints were\nfound: v0.1.0 tested the wrong host for identification and wrongly reported it as\nunconfirmed; v0.2.0 fixed that but still lacked full text; v0.3.0 found the\nfull-text API on the same domain as the human-readable citation page.\n\nThis connector does not scrape Planalto (planalto.gov.br) HTML - no confirmed\nmechanical rule maps a URN Lex to a Planalto URL for every act type, and fabricating\none would risk the citation-hallucination failure mode this fleet exists to prevent.\nRe-verified live 2026-07-07: `legislacao.presidencia.gov.br` (the REFLEGIS portal\nthe manifest names) does not return a plain HTTP response to a keyless client at\nall - the connection is accepted but the request times out with zero bytes\nreceived, consistent with a bot-challenge/WAF in front of it, not a structured API.\nA minority of act types (mostly decrees) have no inline text in `normas.leg.br`\neither; for those, see [DISCOVERY.md](DISCOVERY.md).\n\nFor case law, DataJud (docket metadata only, redistribution restricted by CNJ\nResolution 446/2022), the STJ Open Data Portal (real acordao text, May 2022+),\nCARF (real tax-ruling text, exact lookup only), TST (real ruling text - free-text\nsearch and exact CNJ-process-number lookup, both confirmed live 2026-07-07 after\na browser network trace of the real frontend revealed the request fields the\nearlier reverse-engineering missed) and TCU (real acordao/relatorio/voto text)\nare wired in below. TRF4/TRF5 were probed and rejected - their hosts never accept\na connection from outside Brazil (`geo_restricted`) - and RFB's sijut2consulta is\na scrape-class HTML app with no JSON backend. See [DISCOVERY.md](DISCOVERY.md)\nfor the exact probes run and each confirmed request/response contract.\n\n## Tools\n\n| Tool | Purpose |\n|---|---|\n| `br_search_proposicoes` | List bills by type (`PL`, `PLP`, `PEC`, ...) and year |\n| `br_get_proposicao` | Full detail + current status for one bill by id |\n| `br_get_norma` | Resolve an enacted Norma Juridica by URN Lex - identification, DOU provenance, amendment history, STF notes |\n| `br_get_norma_index` | List the addressable structure of a Norma (parts, books, titles, chapters, sections, articles) |\n| `br_get_norma_texto` | Fetch the real text of one article (dispositivo) of a Norma |\n| `br_search_processos` | Search court dockets (metadata only) in one tribunal's DataJud CNJ index |\n| `br_get_processo` | Fetch one court docket by exact CNJ unified process number |\n| `br_search_case_stj` | Search STJ acordaos (real ruling text) by process number or free text |\n| `br_get_case_stj` | Fetch one STJ acordao by exact process number - ementa + ruling body text |\n| `br_get_case_carf` | Fetch one CARF tax acordao by exact docket or decision number - ementa + ruling body text |\n| `br_search_case_tst` | Search TST labor-court rulings by free text (real ruling text; 3.75M acordaos) |\n| `br_get_case_tst` | Fetch one TST ruling by exact CNJ unified process number - ementa + inteiro teor |\n| `br_search_case_tcu` | Search TCU (Federal Court of Accounts) acordaos by free text (525K acordaos) |\n| `br_get_case_tcu` | Fetch one TCU acordao by (numero, ano, colegiado) - deliberation + report + vote text |\n\nBill type codes (`sigla_tipo`), for reference:\n\n| Code | Portuguese | English |\n|---|---|---|\n| `PL` | Projeto de Lei | ordinary bill |\n| `PLP` | Projeto de Lei Complementar | complementary-law bill (implements a constitutional provision) |\n| `PEC` | Proposta de Emenda a Constituicao | constitutional amendment proposal |\n\nEvery response carries `lex_uri`, `human_readable_citation` and `source_url`.\nFor `br_search_proposicoes`/`br_get_proposicao`, `lex_uri` is Camara's own stable\nAPI URI (not a URN Lex - a bill isn't enacted law yet). For `br_get_norma`,\n`lex_uri` is the real `urn:lex:br:...` you queried with, e.g.\n`\"urn:lex:br:federal:lei:2002-01-10;10406\"` (Codigo Civil). For `br_get_norma_texto`,\n`lex_uri` is that URN plus the article suffix, e.g. `\"...;10406!art5\"`.\n\n## Install\n\n```bash\npip install br-eli-mcp\n```\n\n## Configuration\n\n| Env var | Default |\n|---|---|\n| `BR_ELI_CACHE_DIR` | `~/.matematic/cache/br-eli` |\n| `BR_ELI_AUDIT_DIR` | `~/.matematic/audit` |\n| `BR_ELI_BASE_URL` | `https://dadosabertos.camara.leg.br/api/v2` |\n| `BR_ELI_NORMA_BASE_URL` | `https://legis.senado.leg.br/dadosabertos` |\n| `BR_ELI_TEXT_BASE_URL` | `https://normas.leg.br/api/public` |\n| `BR_ELI_DATAJUD_BASE_URL` | `https://api-publica.datajud.cnj.jus.br` |\n| `BR_ELI_STJ_BASE_URL` | `https://dadosabertos.web.stj.jus.br` |\n| `BR_ELI_CARF_BASE_URL` | `https://acordaos.economia.gov.br/solr/acordaos2/select` |\n| `BR_ELI_TST_BASE_URL` | `https://jurisprudencia-backend2.tst.jus.br` |\n| `BR_ELI_TCU_BASE_URL` | `https://pesquisa.apps.tcu.gov.br/rest/publico/base/acordao-completo` |\n\n## License\n\nApache-2.0 (code). The Camara dos Deputados open-data API is open data\nrequiring attribution - see [SOURCES.md](SOURCES.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatematicsolutions%2Fbr-eli-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatematicsolutions%2Fbr-eli-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatematicsolutions%2Fbr-eli-mcp/lists"}