leis-mcp

An MCP server that finds and quotes the exact text of over 1.2 million Brazilian legal norms with a link to the official source

  • 66 ★ on the repository
  • Last commit
MCP server

Extended access

Why this level

  • The server fetches the index and norm texts from the network and writes a cache to disk
  • Converted texts may contain errors and cannot be relied on as an official publication
All reasons and checks

mazulo/leis-mcp

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add mcp/leis-mcp

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The server fetches the index and norm texts from the network and writes a cache to disk
  • Converted texts may contain errors and cannot be relied on as an official publication

This is third-party code. Review the repository files before installing.

What it does

The server gives Claude Code, Claude Desktop, Cursor, VS Code, Codex and other MCP clients access to Brazilian legislation from the public `ctresb/leis` repository. Instead of paraphrasing from memory, the agent finds the norm, reads the exact provision and quotes the precise text with a link to the official source (`normas.leg.br`, LexML) and the path in the archive. There are four tools: `buscar_norma` finds a norm from references such as `8.245`, `8245/1991` or `Lei 8.245/91` and returns title, date and repeal flag, `ler_artigo` returns an article, paragraph, item and sub-item with context and a ready citation (`art. 23, III`), `buscar_texto` searches a word or fragment ignoring case and accents, and `listar_normas` navigates by level: sphere, type, state or body, year. The `leis://apelidos` resource lists over 40 short names, including `CLT`, `CDC`, `LGPD`, `CPC` and `lei do inquilinato`. The SQLite index downloads once (about 100 MB) and refreshes weekly, while texts are fetched on demand with a hash check. The server is read-only and the source repository is never changed. Every answer carries warnings about repeal, non-consolidated text and automatic conversion.

Who it is for. Lawyers, students and legal-service developers working with Brazilian law who want the assistant to quote a norm word for word.

Good fit when

  • An exact citation of a law article is needed, for example `art. 23, III` of the Tenancy Law 8.245/1991, with the precise text
  • A norm must be found by a short name such as `LGPD`, `CDC` or `CLT`
  • Checking a question requires knowing whether a norm is repealed or lacks a consolidated version
  • A listing of norms by state, municipality or regulator and year is needed

Not a fit when

  • Legal advice or an opinion is needed: the server only returns norm texts
  • An official publication is required: converted text does not replace the Diário Oficial
  • The law of another country or case law is needed: the archive holds Brazilian norms only

Example request

Is a tenant obliged to return the property in the condition received? Quote the norm from Tenancy Law 8.245/1991

MCP

Transport
stdio
Authentication
not required

Limitations

The text is converted automatically from official sources and may contain conversion or OCR errors, so every answer includes a warning and a `fonte` link. `buscar_texto` without the `norma` parameter searches only norms already downloaded, and downloading all 1.2 million norms is not feasible, so `uvx leis-mcp warm` widens the cache. Repeal status comes from the header and notes in the text without independent verification. Metadata of state and municipal norms is derived heuristically from the file name. Content comes from `raw.githubusercontent.com`, which may rate-limit requests. `uv` is required and `ripgrep` is recommended. Tool names and answers are in Portuguese.

How to disable. Run `claude mcp remove leis` or remove the entry from the client MCP configuration. The cache and index can be deleted with the server data folder.

FAQ

How do I connect leis-mcp to Claude Code?

Run `uvx leis-mcp index` to download the index, then `claude mcp add leis -- uvx leis-mcp serve`. `uv` is required and `ripgrep` is recommended.

Is there a way to install without a terminal?

Yes, for Claude Desktop download the `leis-mcp.mcpb` file from the releases and open it: Claude Desktop shows an install screen and sets up Python.

Where do the norm texts come from?

From the public `ctresb/leis` repository, which converts official sources to Markdown. The server only reads it, and every answer includes a `fonte` link to the official text.

Does the server work offline?

Partly: whatever is already in the cache is available offline. The index and new texts are downloaded on first use.

Can I search the whole archive at once?

`buscar_texto` without `norma` searches only cached norms. To widen the search, run `uvx leis-mcp warm`, which preloads about 40 norms by short name. There is no semantic search.

Discussion

No questions or reviews yet.

An MCP server for Brazil's open data: economy, laws, public procurement, courts, elections, environment and more

MCP serverExtended access1.9KRepository stars

Legal Data Hunter MCP server: search of case law, legislation and doctrine from more than 110 countries

MCP serverMinimal access421Repository stars
Official

An MCP server for Brazilian public procurement with PNCP and company registry data, no key or signup.

MCP serverMinimal access80Repository stars

MCP server and CLI that find Brazilian companies by CNAE code and region in a local copy of Receita Federal open data.

MCP serverExtended access133Repository stars
Official

An MCP server gives agents search and answers over local documents using hybrid retrieval, reranking and section links.

MCP serverExtended access663Repository stars

An MCP server for searching and downloading academic papers from arXiv, PubMed, bioRxiv, Semantic Scholar and other open sources

MCP serverExtended access3.1KRepository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
leis-mcp (this card)nonot required66
Korean Law MCPnoAPI key2,866the same class of task for Korean law, whereas this covers Brazilian norms with official links and repeal warnings
Russian Law MCP Servernonot required9a server for Russian law, whereas this is an archive of Brazilian legal acts in Portuguese

README in short

The Portuguese README covers the server purpose, quick start, a tool table with a sample response, the list of short names, clients, internals and limitations. It ends with credits for the archive.

README badge

Report a problem