Skip to main content
Glama
README.md
# Poland Legal Research MCP Server (`pl-legal-mcp`)

Model Context Protocol (MCP) server providing direct, read-only access to **Poland (PL)** legislation, multi-tier judicial decisions (First Instance, Regional/Cantonal/Appellate, and Supreme/Constitutional courts), and statutory citation verification for Claude Desktop, Cursor, and Antigravity.

---

## Quick Desktop Setup (No Command Line Required)

This package includes a graphical installer for legal practitioners who prefer not to use terminal commands or edit JSON configuration files manually.

1. **Download:** Click **`<> Code`** at the top right of this repository, select **`Download ZIP`**, and extract the folder to your computer.
2. **Run the Setup Utility:**
   - **Windows:** Double-click `Click_Here_To_Install_Windows.bat`
   - **macOS:** Double-click `Click_Here_To_Install_Mac.command`
3. **Connect:** Click **Install & Connect Automatically** in the setup window and restart Claude Desktop.

**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 environment inside the extracted folder and registers the server entry in your AI client configuration.

---

## Multi-Tier Judicial Hierarchy & Official Sources

This server indexes and queries decisions across the full judicial hierarchy of **Poland**, allowing practitioners to filter research by procedural stage:

| Judicial Tier | Covered Courts & Tribunals |
|:---|:---|
| **Tier 1 — First Instance** | Sądy Rejonowe (318 District Courts), Sądy Okręgowe (47 Regional Courts in 1st instance) & Wojewódzkie Sądy Administracyjne (16 WSA) |
| **Tier 2 — Regional / Cantonal / Appellate** | 11 Sądów Apelacyjnych (Warszawa, Kraków, Wrocław, Poznań, Gdańsk, Katowice, Łódź, Lublin, Białystok, Rzeszów, Szczecin) & Sądy Okręgowe (Appellate divisions) |
| **Tier 3 — Supreme & Constitutional** | Sąd Najwyższy (SN), Naczelny Sąd Administracyjny (NSA) & Trybunał Konstytucyjny (TK) |

### Primary Legal Portals

- **National Legislation Registry:** Sejm ELI Official REST API (api.sejm.gov.pl/eli) (`https://api.sejm.gov.pl/eli/acts/search`)
- **Multi-Tier Case Law Database:** SAOS Open API & Portal Orzeczeń Sądów Powszechnych (orzeczenia.ms.gov.pl — Rejonowe, Okręgowe & Apelacyjne) (`https://www.saos.org.pl/api/search/judgments`)
- **Supported Citation Format Example:** `I CSK 123/23 or Dz.U. 2024 poz. 100`

### Indexed Court & Regional Sub-Portals

| Sub-Portal Identifier (`sub_court`) | Official Endpoint / Registry |
|:---|:---|
| `saos_all_tiers` | `https://www.saos.org.pl/api/search/judgments` |
| `portal_orzeczen_common_courts` | `https://orzeczenia.ms.gov.pl` |
| `nsa_cbosa_admin_courts` | `https://orzeczenia.nsa.gov.pl` |

---

## Available MCP Tools

| Tool | Description |
|:---|:---|
| `search_legislation` | Searches enacted statutes, codes, decrees, and official gazette publications in Poland. |
| `search_case_law` | Searches national jurisprudence and European/ECLI-linked judgments for Poland. |
| `search_tiered_court_decisions` | Filters case law specifically by judicial instance (`first_instance`, `appellate_regional`, `supreme_constitutional`) or regional/cantonal court key (`sub_court`). |
| `list_court_hierarchy` | Returns the complete 3-tier court structure and registered sub-portal endpoints for Poland. |
| `get_legal_document_markdown` | Retrieves full statutory or judicial texts and converts them into clean Markdown. |
| `verify_citation` | Validates statutory and case law citations against official registries. |

---

<details>
<summary><b>Manual Configuration for Developers (Optional)</b></summary>

```json
{
  "mcpServers": {
    "pl-legal-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/jurisatlas/pl-legal-mcp",
        "pl-legal-mcp"
      ]
    }
  }
}
```
</details>