Br Eli Mcp

io.github.matematicsolutions由 GitHub 帳號 matematicsolutions 發布v0.8.3更新於 Nov 3, 2026

MCP server for Brazilian federal law: legislation, DataJud, STJ, CARF, TST, TCU citations.

概覽

AI 產生的概覽

免金鑰的巴西聯邦法律 MCP 伺服器:查詢法案、現行法律條文,以及 DataJud、STJ、CARF、TST、TCU 的裁判文書。

可以做什麼
  • 依類型與年份檢索聯邦法案(proposições),並查看單一法案的詳細內容與目前狀態
  • 依 URN Lex 解析已生效法律:識別資訊、官方公布來源、修正沿革與 STF 違憲說明
  • 列出法律的可尋址結構,並取得單一條文的真實全文
  • 在某法院的 DataJud 索引中檢索案件卷宗中介資料,並依 CNJ 統一案號取得單一卷宗
  • 檢索並取得 STJ、TST、TCU、CARF 的裁判全文與摘要
  • 說明此連接器涵蓋哪些來源與時間範圍,以及明確不涵蓋的內容
適用情境
適合需要以真實引證而非憑記憶或臆造來回答巴西聯邦立法或判例問題的情境,例如確認法案進度、引用某條法律條文,或查找勞動、稅務、審計採購方面的裁判。
執行需求
以本機 Python 套件執行(pip install br-eli-mcp,或使用 uvx);Claude 外掛方式需要 uv。無需 API 金鑰或註冊。需要連線至所列巴西政府官方 API 的網路。可選環境變數用於設定快取、稽核日誌與基礎 URL 位置。
安裝前請注意
工具呼叫會將查詢傳送至所列巴西公共 API,並經過你使用的模型。會在家目錄下寫入本機回應快取與稽核日誌(工具名稱、輸入雜湊、結果大小、時間、狀態);快取的裁判文書可能包含當事人姓名。獨立伺服器首次使用時會從 GitHub Releases 取得小型設定檔,可用 BR_ELI_RUNTIME_URL 關閉。在啟用 Smart App Control 的 Windows 11 上,應透過 python 執行模組,而非被封鎖的啟動器。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Br Eli Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

br-eli-mcp

MCP server for eight keyless, no-registration Brazilian open-data APIs:

  1. Camara dos Deputados (dadosabertos.camara.leg.br) - the federal legislative process: bills (proposicoes) as they move through committees and floor votes.
  2. 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.
  3. normas.leg.br - the full-text companion to (2): real article-by-article text of enacted legislation, addressed by the same URN Lex.
  4. 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.
  5. 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.
  6. CARF (acordaos.economia.gov.br) - real acordao (tax ruling) full text from Brazil's federal tax appeals board, by exact docket/decision number.
  7. 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).
  8. 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.

Tools

ToolPurpose
br_search_proposicoesList bills by type (PL, PLP, PEC, ...) and year
br_get_proposicaoFull detail + current status for one bill by id
br_get_normaResolve an enacted Norma Juridica by URN Lex - identification, DOU provenance, amendment history, STF notes
br_get_norma_indexList the addressable structure of a Norma (parts, books, titles, chapters, sections, articles)
br_get_norma_textoFetch the real text of one article (dispositivo) of a Norma
br_search_processosSearch court dockets (metadata only) in one tribunal's DataJud CNJ index
br_get_processoFetch one court docket by exact CNJ unified process number
br_search_case_stjSearch STJ acordaos (real ruling text) by process number or free text
br_get_case_stjFetch one STJ acordao by exact process number - ementa + ruling body text
br_get_case_carfFetch one CARF tax acordao by exact docket or decision number - ementa + ruling body text
br_search_case_tstSearch TST labor-court rulings by free text (real ruling text; 3.75M acordaos)
br_get_case_tstFetch one TST ruling by exact CNJ unified process number - ementa + inteiro teor
br_search_case_tcuSearch TCU (Federal Court of Accounts) acordaos by free text (525K acordaos)
br_get_case_tcuFetch one TCU acordao by (numero, ano, colegiado) - deliberation + report + vote text
br_coverageDeclare 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:

CodePortugueseEnglish
PLProjeto de Leiordinary bill
PLPProjeto de Lei Complementarcomplementary-law bill (implements a constitutional provision)
PECProposta de Emenda a Constituicaoconstitutional 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-mcp

As a plain Python package:

bash
pip install br-eli-mcp

Windows 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:

bash
python -m pip install br-eli-mcppython -m br_eli_mcp

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

json
{ "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 varDefault
BR_ELI_CACHE_DIR~/.matematic/cache/br-eli
BR_ELI_AUDIT_DIR~/.matematic/audit
BR_ELI_BASE_URLhttps://dadosabertos.camara.leg.br/api/v2
BR_ELI_NORMA_BASE_URLhttps://legis.senado.leg.br/dadosabertos
BR_ELI_TEXT_BASE_URLhttps://normas.leg.br/api/public
BR_ELI_DATAJUD_BASE_URLhttps://api-publica.datajud.cnj.jus.br
BR_ELI_STJ_BASE_URLhttps://dadosabertos.web.stj.jus.br
BR_ELI_CARF_BASE_URLhttps://acordaos.economia.gov.br/solr/acordaos2/select
BR_ELI_TST_BASE_URLhttps://jurisprudencia-backend2.tst.jus.br
BR_ELI_TCU_BASE_URLhttps://pesquisa.apps.tcu.gov.br/rest/publico/base/acordao-completo

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.

來源:README.md,提交 1ac3f63

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.8.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分