leis-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LEIS_MCP_HOME | No | Directory where leis-mcp stores its data. Defaults to ~/.cache/leis-mcp. | ~/.cache/leis-mcp |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Acesso à legislação brasileira do repositório público ctresb/leis (Markdown convertido de fontes oficiais).
Antes de responder perguntas jurídicas, localize a norma (buscar_norma) e leia o dispositivo exato
(ler_artigo). Cite o texto literalmente, informe o link fonte e repasse os avisos.
Antes de citar, confira vigencia (o que o acervo diz da norma), redacao (texto compilado ou original e
data da captura), dispositivo.situacao e, para normas federais, vigencia_online (normas.leg.br e Senado,
com as redações e alterações do dispositivo). Nenhuma fonte afirma vigência por omissão:
sem_revogacao_registrada e nao_informada NÃO significam que a norma está vigente; diga isso ao usuário.
O texto é conversão automática e não substitui o Diário Oficial.
Apelidos aceitos: CF/constituição, ADCT, CC/código civil, CPC, CP/código penal, CPP, CLT, CDC,
lei do inquilinato, lei dos juizados, CTN, ECA, LGPD e outros (recurso leis://apelidos).
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| buscar_normaA | Localiza uma norma e devolve metadados do cabeçalho (título, ementa, data), |
| ler_artigoA | Devolve o texto exato de um artigo (ou parágrafo, inciso, alínea), com o caput como contexto, link da fonte, |
| buscar_textoA | Busca um termo dentro de uma norma, ou nas normas já em cache local, indicando o artigo de cada ocorrência. |
| listar_normasA | Navega pelo acervo: sem filtros devolve contagens por esfera; com esfera, por tipo; com tipo, por ano; com ano, lista as normas. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| apelidos | Apelidos de leis aceitos pelas ferramentas. |
TDQS
Scored across 4 tools
Each tool targets a distinct step in the legal-research workflow: locate a norm (buscar_norma), retrieve an exact article (ler_artigo), search within text (buscar_texto), and browse hierarchy (listar_normas). The only mild overlap is between buscar_norma and buscar_texto, but descriptions clearly separate metadata lookup from term-in-text search. An agent should pick correctly, though the shared 'buscar' verb forces attention to the noun.
All four tools follow a clean Portuguese verb_noun snake_case pattern: buscar_norma, ler_artigo, buscar_texto, listar_normas. No camelCase or case mixing; the two 'buscar_*' names differ by noun, which is acceptable since the verb genuinely matches the action.
Four tools is a small but defensible surface for a read-only legal corpus: one metadata locator, one article reader, one text searcher, one navigator, with no redundant entries. It is on the thin side — a single-access tool without a full-norm fetch or citation-format helper keeps it minimal, though nothing feels padded.
The surface covers the core research loop: browse the acervo, locate the norm, search for a term, read the exact article with vigência/redação and amendment history. Minor gaps exist — no tool to fetch a whole norm at once (must go article by article) and no cross-norm topic search or citation export — but these are workable around the provided tools.