Skip to main content
Glama
Brazilian Law Research MCP Server

Brazilian Law Research MCP Server

by pdmtt

Brazilian Law Research MCP Server

🇧🇷 Leia em português

A MCP (Model Context Protocol) server for agent-driven research on Brazilian law using official sources.

Foreword

This server empowers models with scraping capacities, thus making research easier to anyone legitimately interested in Brazilian legal matters.

This facility comes with a price: the risk of overloading the official sources' servers if misused. Please be sure to keep the load on the sources to a reasonable amount.

Related MCP server: mcp-brasil

Requirements

  • git

  • uv (recommended) or Python >= 3.12

  • Google Chrome

How to use

  1. Clone the repository:

git clone https://github.com/pdmtt/brlaw_mcp_server.git
  1. Install the dependencies

uv run patchright install
  1. Setup your MCP client (e.g. Claude Desktop):

{
  "mcpServers": {
    "brlaw_mcp_server": {
      "command": "uv",
      "args": [
        "--directory",
        "/<path>/brlaw_mcp_server",
        "run",
        "serve"
      ]
    }
  }
}

Available Tools

  • StjLegalPrecedentsRequest: Research legal precedents made by the National High Court of Brazil (STJ) that meet the specified criteria.

  • TstLegalPrecedentsRequest: Research legal precedents made by the National High Labor Court of Brazil (TST) that meet the specified criteria.

  • StfLegalPrecedentsRequest: Research legal precedents made by the Supreme Court (STF) that meet the specified criteria.

Development

Tooling

The project uses:

  • Ruff for linting and formatting.

  • BasedPyright for type checking.

  • Pytest for testing.

Language

Resources, tools and prompts related stuff must be written in Portuguese, because this project aims to be used by non-dev folks, such as lawyers and law students.

Technical legal vocabulary is highly dependent on a country's legal tradition and translating it is no trivial task.

Development related stuff should stick to English as conventional, such as source code.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Available Tools

3 tools
StfLegalPrecedentsRequestC

Requisição dos precedentes judiciais do Supremo Tribunal Federal (STF) que satisfaçam os critérios passados.

O STF é o órgão máximo do Poder Judiciário brasileiro, e a ele compete, precipuamente, zelar pelo cumprimento da Constituição, conforme definido em seu art. 102. Por esse motivo, o STF é conhecido como o Guardião da Constituição Federal.

Entre suas principais atribuições está a de julgar a ação direta de inconstitucionalidade de lei ou ato normativo federal ou estadual, a ação declaratória de constitucionalidade de lei ou ato normativo federal, a arguição de descumprimento de preceito fundamental decorrente da própria Constituição e a extradição solicitada por Estado estrangeiro.

Na área penal, destaca-se a competência para julgar, nas infrações penais comuns, o presidente da República, o vice-presidente, os membros do Congresso Nacional, seus próprios ministros e o procurador-geral da República, entre outros.

Inputs: summary (required), page.

StjLegalPrecedentsRequestA

Requisição dos precedentes judiciais do Superior Tribunal de Justiça (STJ) que satisfaçam os critérios passados.

O STJ é a instância máxima da justiça brasileira no âmbito infraconstitucional. É a Corte responsável por uniformizar a interpretação da lei federal em todo o País.

Produz decisões que influenciam todos os aspectos da vida cotidiana dos cidadãos, a maioria envolvendo causas de competência da chamada Justiça Comum.

É de sua responsabilidade a solução definitiva de casos civis e criminais que não envolvam matéria constitucional, sob reserva do Supremo Tribunal Federal (STF), nem questões afetas ao âmbito específico da Justiça do Trabalho, da Justiça Eleitoral ou da Justiça Militar.

Cabe também ao STJ a apreciação de decisões judiciais emitidas no exterior, entre as quais cartas rogatórias, pedidos de homologação de decisões estrangeiras e ações em que há contestação de sentença proferida fora do país.

Inputs: summary (required), page.

TstLegalPrecedentsRequestB

Requisição dos precedentes judiciais do Tribunal Superior do Trabalho (TST) que satisfaçam os critérios passados.

O TST é o órgão de cúpula da Justiça do Trabalho. Tem a função precípua de uniformizar a jurisprudência trabalhista brasileira.

Inputs: summary (required), page.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool targets a distinct Brazilian superior court (STF, STJ, TST) with clear, non-overlapping purposes. The descriptions include specific court responsibilities, making it unambiguous which tool to use for each court.

    Naming Consistency5/5

    All tool names follow a consistent pattern: acronym of the court plus 'LegalPrecedentsRequest' (e.g., StfLegalPrecedentsRequest). The naming is predictable and uniform, aiding agent selection.

    Tool Count5/5

    Three tools is appropriate for querying legal precedents from three specific superior courts. The scope is narrow and well-defined, with no unnecessary tools.

    Completeness4/5

    The server covers the three main superior courts (STF, STJ, TST), which are essential for Brazilian law research. Minor missing courts (e.g., TSE, STM) could be considered gaps, but for a focused research tool, the coverage is adequate.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP Server for accessing 36 Brazilian public data sources and 1 agent, enabling AI agents to query government data on economy, legislation, transparency, judiciary, elections, environment, health, and more.
      6
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server that connects AI agents to 28 Brazilian public APIs, providing tools to query government data on economy, legislation, transparency, judiciary, elections, environment, health, and more.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      MCP server for token-efficient access to Open Finance Brasil rules, enabling coding agents to search and retrieve specific regulations, OpenAPI specs, and business rules through progressive disclosure.
      4
      32 npm
      MIT