Get the FREE Ultimate OpenClaw Setup Guide →

brlaw_mcp_server

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

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio pdmtt-brlaw_mcp_server uv --directory /<path>/brlaw_mcp_server run serve

How to use

The Brazilian Law Research MCP Server provides tools to perform targeted legal research against official Brazilian sources. It exposes dedicated research prompts that fetch and summarize legal precedents from key Brazilian courts. The available tools include StjLegalPrecedentsRequest for precedents from the National High Court (STJ), TstLegalPrecedentsRequest for the National High Labor Court (TST), and StfLegalPrecedentsRequest for the Supreme Court (STF). To use the server, configure your MCP client to point to the server and start the dedicated serve command via UV as shown in the installation instructions. Once running, you can invoke each tool by providing criteria such as keywords, dates, and court-specific fields to retrieve and synthesize relevant precedents.

Note that the server is designed to scrape official sources with care to avoid overloading them. Use the tools judiciously and respect source limits. The content and prompts are prepared in Portuguese to suit non-developer users like lawyers and students, while development-related notes and commands are in English for maintainers.

How to install

Prerequisites:

  • git
  • uv (recommended) or Python >= 3.12
  • Google Chrome

Installation steps:

  1. Clone the repository: git clone https://github.com/pdmtt/brlaw_mcp_server.git cd brlaw_mcp_server

  2. Install dependencies (using UV): uv run patchright install

  3. Run the server locally (example using the directory path you cloned): uv --directory /path/to/brlaw_mcp_server run serve

  4. Configure your MCP client to connect to the server using the mcp_config example provided in the repository (see the README for the brlaw_mcp_server entry).

Prereq notes:

  • Ensure Google Chrome is installed for any rendering or headless browser activities used during scraping.
  • If you prefer Python-based setup, you may adapt commands accordingly, but the official guidance in this repo uses UV for execution.

Additional notes

Tips and tips:

  • Be mindful of the load on official sources; implement reasonable request rates and respect robots.txt and terms of use where applicable.
  • The prompts and user-facing language are in Portuguese to accommodate non-developer users in legal contexts; source code and tooling remain in English for maintainability.
  • If you encounter environment issues, verify that UV is correctly installed and that the directory path in the mcp_config matches your local setup.
  • For troubleshooting, check logs produced by the server during startup and operation; ensure your browser automation (via Chrome) is functioning as expected.
  • The server is intended for research tasks related to Brazilian law; adjust prompts to fit specific research criteria (keywords, courts, dates, and decision types).

Related MCP Servers

Sponsor this space

Reach thousands of developers