Portugal Legal Research MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Portugal Legal Research MCP Server Find Supreme Court decisions on fixed-term employment contract termination"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Portugal Legal Research MCP Server (pt-legal-mcp)
Português | English Documentation
Servidor MCP de Legislação e Jurisprudência (pt-legal-mcp) — Português
Sobre este repositório
Este repositório disponibiliza um servidor Model Context Protocol (MCP) que liga o seu assistente de IA (Claude Desktop, Cursor, Windsurf, VS Code / Copilot ou Antigravity) ao Diário da República (diariodarepublica.pt) e às bases de dados da DGSI (dgsi.pt: Tribunais de Comarca, TAF, 5 Tribunais da Relação, TCA, Supremo Tribunal de Justiça, STA e Tribunal Constitucional).
Instalação rápida (Seleção da aplicação de IA)
Transferir: Clique em
<> Code->Download ZIPe extraia a pasta no seu computador.Executar: Faça duplo clique em
Click_Here_To_Install_Windows.bat(Windows) ouClick_Here_To_Install_Mac.command(macOS).Selecionar cliente IA: Escolha as aplicações de IA que utiliza, clique em instalar e reinicie a aplicação selecionada.
Nota de segurança: O instalador funciona exclusivamente em modo de leitura e não acede aos seus ficheiros pessoais.
Hierarquia dos tribunais e fontes oficiais
Instância | Tribunais abrangidos |
1.ª Instância (Tribunais de Comarca e TAF) | 23 Tribunais Judiciais de Comarca & Tribunais Administrativos e Fiscais de Círculo (TAF) |
2.ª Instância (Tribunais da Relação e TCA) | 5 Tribunais da Relação (Lisboa, Porto, Coimbra, Évora, Guimarães) & 2 Tribunais Centrais Administrativos (TCA Sul & TCA Norte) |
STJ, STA e Tribunal Constitucional | Supremo Tribunal de Justiça (STJ), Supremo Tribunal Administrativo (STA) & Tribunal Constitucional (TC) |
Diário da República Eletrónico (diariodarepublica.pt): https://diariodarepublica.pt (
diariodarepublica.pt,pgdlisboa.pt,parlamento.pt)DGSI Bases Jurídico-Documentais (dgsi.pt — STJ, STA, 5 Tribunais da Relação & 2 TCA): http://www.dgsi.pt (
dgsi.pt,stj.pt,tribunalconstitucional.pt,stadministrativo.pt)
Related MCP server: be-legal-mcp
English Documentation
Model Context Protocol (MCP) server providing live, read-only access to Portugal (PT) legislation, official gazettes, multi-tier judicial decisions (First Instance, Regional/Cantonal/Appellate, and Supreme/Constitutional courts, including HTML and PDF full-text extraction), and statutory citation verification across all major AI clients (ChatGPT Desktop, OpenAI Codex CLI, Claude Desktop, Claude Code CLI, Cursor, Windsurf, VS Code / GitHub Copilot / Cline / Roo Code, Google Antigravity / Gemini CLI, Perplexity, and Continue.dev).
Interactive Desktop Setup (Select Your AI Assistant)
This package includes a graphical installer for legal practitioners and non-technical users that lets you select which AI application(s) you use:
Download: Click
<> Codeat the top right of this repository, selectDownload ZIP, and extract the folder to your computer.Run the Setup Utility:
Windows: Double-click
Click_Here_To_Install_Windows.batmacOS: Double-click
Click_Here_To_Install_Mac.command
Select Your AI Client(s) & Connect: Check the box(es) for the AI assistant(s) installed on your computer (ChatGPT Desktop & OpenAI Codex CLI, Claude Desktop & Claude Code CLI, Cursor, Windsurf, VS Code / GitHub Copilot / Cline / Roo Code, Google Antigravity / Gemini CLI, or Perplexity / Continue.dev), click Install to Selected AI Clients, and restart your selected AI application.
System Integrity Note: The setup utility operates strictly in read-only mode with respect to your personal files and documents. It installs an isolated Python runtime inside the extracted folder and registers the server entry only in the AI client configuration files you select.
Multi-Tier Judicial Hierarchy & Live Indexed National Archives
This server performs live queries across the full judicial hierarchy and official legal archives of Portugal, extracting full text from both HTML pages and official court/gazette PDF judgments:
Judicial Tier | Covered Courts & Tribunals |
Tier 1 — First Instance | 23 Tribunais Judiciais de Comarca & Tribunais Administrativos e Fiscais de Círculo (TAF) |
Tier 2 — Regional / Cantonal / Appellate | 5 Tribunais da Relação (Lisboa, Porto, Coimbra, Évora, Guimarães) & 2 Tribunais Centrais Administrativos (TCA Sul & TCA Norte) |
Tier 3 — Supreme & Constitutional | Supremo Tribunal de Justiça (STJ), Supremo Tribunal Administrativo (STA) & Tribunal Constitucional (TC) |
Official Portals & Live Indexed Domains
National Legislation & Official Gazette: Diário da República Eletrónico (diariodarepublica.pt) — https://diariodarepublica.pt
Indexed Legislation Domains:
diariodarepublica.pt,pgdlisboa.pt,parlamento.pt
Court Decisions & Jurisprudence Archives: DGSI Bases Jurídico-Documentais (dgsi.pt — STJ, STA, 5 Tribunais da Relação & 2 TCA) — http://www.dgsi.pt
Indexed Judicial & Open Case Law Domains:
dgsi.pt,stj.pt,tribunalconstitucional.pt,stadministrativo.pt
Available MCP Tools
Tool | Description |
| Searches enacted statutes, codes, decrees, and official gazette publications in Portugal. |
| Searches national jurisprudence and open judicial archives for Portugal. |
| Filters case law specifically by judicial instance ( |
| Returns the complete 3-tier court structure and supported regional court filters for Portugal. |
| Retrieves full statutory or judicial texts (both HTML and official |
| Validates statutory and case law citations against official registries. |
{
"mcpServers": {
"pt-legal-mcp": {
"command": "uvx",
"args": [
"--from",
"https://github.com/jurisatlas/pt-legal-mcp/archive/refs/heads/main.zip",
"pt-legal-mcp"
]
}
}
}Available Tools
6 toolsget_legal_document_markdownGet Legal Document MarkdownA
Retrieve full Markdown text of a legislation document or court judgment (HTML or PDF) from Portugal (PT) by its URL or official identifier.
Inputs: document_id_or_url (required), page. Returns: object
list_court_hierarchyList Court HierarchyA
Return the complete step-by-step multi-tier judicial hierarchy for Portugal (PT): Tier 1 (First Instance / Trial / Municipal / District Courts), Tier 2 (Regional / Cantonal / County / Appellate Courts), Tier 3 (Supreme / Cassation / Constitutional Courts), and all official court sub-portals.
Inputs: no named parameters. Returns: object
search_case_lawSearch Case LawB
Search Portugal (PT) court decisions and binding precedents via DGSI Bases Jurídico-Documentais (dgsi.pt) & Jurisprudência CSTJ/TC and open national judicial archives (Supported courts: Supremo Tribunal de Justiça (STJ), Tribunal Constitucional, Supremo Tribunal Administrativo (STA), Tribunais da Relação).
Inputs: query (required), court, limit. Returns: object
search_legislationSearch LegislationA
Search Portugal (PT) national legislation (statutes, acts, codes, regulations, official gazette) via Diário da República Eletrónico (diariodarepublica.pt) and live national legal archives.
Inputs: query (required), year, limit. Returns: object
search_tiered_court_decisionsSearch Tiered Court DecisionsB
Search court decisions in Portugal (PT) filtered by specific judicial tier or regional/cantonal/appellate court. Supports Tier 1 (first_instance), Tier 2 (appellate_regional — including Cantonal/Regional/County/Circuit courts), and Tier 3 (supreme_constitutional), or a specific sub-portal key from list_court_hierarchy.
Inputs: query (required), tier, limit, sub_court. Returns: object
verify_citationVerify CitationB
No-Hallucination Citation Verifier for Portugal (PT). Validates format and live existence of legal citations (e.g., 'ECLI:PT:STJ:2024:123.22.0T8LSB.L1.S1 or Diário da República') against official Portugal and ECLI/ELI registries to prevent AI-hallucinated citations.
Inputs: citation (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
The set has four clearly distinct tools (get_legal_document_markdown, verify_citation, search_legislation, list_court_hierarchy), but search_case_law and search_tiered_court_decisions both retrieve Portuguese court decisions and differ only in coverage/filtering, which is not obvious from the names. An agent asked to 'search court decisions' would need to read the descriptions carefully to pick correctly.
All six tools use a consistent snake_case verb_noun pattern (get_, search_, verify_, list_) with no mixed conventions. Names are predictable and self-describing.
Six tools is well-scoped for a read-only legal research server: retrieval, two search modes, citation verification, and hierarchy discovery. Each tool earns its place and nothing feels padded.
The surface covers the core research loop: discover the hierarchy, search legislation, search case law by source or tier, fetch full text, and verify citations. Minor gaps exist (e.g. no article-level or citation-based document lookup, no listing of available legislation filters), but agents can work around these via get_legal_document_markdown.
Maintenance
Related MCP Connectors
Resolve, search and verify legal citations against the official sources, with provenance.
Search and cite official European legislation and court decisions, by article. Read-only.
Acervo jurídico brasileiro: busca, Markdown, grafo de normas e precedentes, citação verificável.
Verify legal citations and search case law and legislation from your AI assistant.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables querying Portuguese legislation, including statutes, provisions, and EU law implementations, with tools for search, citation validation, and currency checks.67 npmApache 2.0
- AlicenseAqualityBmaintenanceEnables read-only search and retrieval of Belgian legislation and multi-tier court decisions, filtering case law by judicial instance, converting legal texts to Markdown, and verifying statutory and case-law citations against official registries.6MIT
- AlicenseAqualityBmaintenanceEnables read-only search of Spanish legislation and multi-tier case law from official registries, retrieval of full legal texts as Markdown, and verification of statutory and case-law citations.6MIT
- AlicenseAqualityBmaintenanceEnables read-only searching of Greek enacted legislation, official gazette publications, and case law across all three judicial tiers (first instance, appellate/regional, and supreme/constitutional), with full-text retrieval converted to clean Markdown. It also verifies statutory and case law citations against official national registries such as et.gr, areiospagos.gr, and adjustice.gr.6MIT