{
  "markdown": "# Polish Law MCP Server\n\n<!-- ANSVAR-CTA-BEGIN -->\n> **The Polish law corpus is now served through the Ansvar Gateway.** Connect your AI assistant (Claude, Copilot, Cursor, custom MCP client) to `https://gateway.ansvar.eu/mcp` — one OAuth connection, free tier available, covering this corpus plus EU regulations, national law across 28 audited jurisdictions, and CVE/security intelligence, every result with a verbatim source citation. Start at https://ansvar.eu/docs/quickstart\n\n### Connect\n\n**Claude Code** (one line):\n\n```bash\nclaude mcp add ansvar --transport http https://gateway.ansvar.eu/mcp\n```\n\n**Claude Desktop / Cursor** — add to `claude_desktop_config.json` (or `mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"ansvar\": {\n      \"type\": \"url\",\n      \"url\": \"https://gateway.ansvar.eu/mcp\"\n    }\n  }\n}\n```\n\n**Claude.ai** — Settings → Connectors → Add custom connector → paste `https://gateway.ansvar.eu/mcp`\n\nFirst request opens an OAuth signup flow (setup details: [ansvar.eu/docs/quickstart](https://ansvar.eu/docs/quickstart)). After signup, your client is bound to your account; tier (free / premium / team / company) determines fan-out, quota, and which downstream MCPs are reachable.\n\n---\n\n## Self-host this MCP\n\nYou can also clone this repo and build the corpus yourself. The schema,\nfetcher, and tool implementations all live here. What is not in the repo is\nthe pre-built database — TDM and standards-licensing constraints on the\nupstream sources mean we host the corpus on Ansvar infrastructure rather\nthan redistribute it as a public artifact.\n\nBuild your own: run this repo's ingestion script (entry-point varies per\nrepo — typically `scripts/ingest.sh`, `npm run ingest`, or `make ingest`;\ncheck the repo root).\n<!-- ANSVAR-CTA-END -->\n\n\n**The ISAP (Internetowy System Aktów Prawnych) alternative for the AI age.**\n\n[![MCP Registry](https://img.shields.io/badge/MCP-Registry-blue)](https://registry.modelcontextprotocol.io)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![GitHub stars](https://img.shields.io/github/stars/Ansvar-Systems/polish-law-mcp?style=social)](https://github.com/Ansvar-Systems/polish-law-mcp)\n[![CI](https://github.com/Ansvar-Systems/polish-law-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/Ansvar-Systems/polish-law-mcp/actions/workflows/ci.yml)\n[![Daily Data Check](https://github.com/Ansvar-Systems/polish-law-mcp/actions/workflows/check-updates.yml/badge.svg)](https://github.com/Ansvar-Systems/polish-law-mcp/actions/workflows/check-updates.yml)\n[![Database](https://img.shields.io/badge/database-pre--built-green)](docs/EU_INTEGRATION_GUIDE.md)\n[![Provisions](https://img.shields.io/badge/provisions-161%2C705-blue)](docs/EU_INTEGRATION_GUIDE.md)\n\nQuery **8,943 Polish statutes** -- from Ustawa o ochronie danych osobowych (UODO/RODO) and Kodeks karny to Kodeks cywilny, Kodeks spółek handlowych, Kodeks pracy, and more -- directly from Claude, Cursor, or any MCP-compatible client.\n\nIf you're building legal tech, compliance tools, or doing Polish legal research, this is your verified reference database.\n\nBuilt by [Ansvar Systems](https://ansvar.eu) -- Stockholm, Sweden\n\n---\n\n## Why This Exists\n\nPolish legal research means navigating ISAP (Sejm), the Dziennik Ustaw, and EUR-Lex, then manually reconciling between national statutes and EU directives. Whether you're:\n- A **lawyer** validating citations in a brief or contract\n- A **compliance officer** checking UODO (RODO) obligations or KSC requirements\n- A **legal tech developer** building tools on Polish law\n- A **researcher** tracing legislative provisions published in Dziennik Ustaw from 1918 to 2026\n\n...you shouldn't need dozens of browser tabs and manual cross-referencing. Ask Claude. Get the exact provision. With context.\n\nThis MCP server makes Polish law **searchable, cross-referenceable, and AI-readable**.\n\n---\n\n## Example Queries\n\nOnce connected, just ask naturally:\n\n- *\"Co mówi art. 5 Ustawy o ochronie danych osobowych (UODO) o zasadach przetwarzania danych?\"*\n- *\"Wyszukaj 'ochrona danych osobowych' w polskim prawie (UODO/RODO)\"*\n- *\"Jakie przepisy Kodeksu karnego dotyczą przestępstw komputerowych?\"*\n- *\"Znajdź artykuły o wypowiedzeniu umowy o pracę w Kodeksie pracy\"*\n- *\"What EU directives does the Polish Ustawa o krajowym systemie cyberbezpieczeństwa (KSC) implement?\"*\n- *\"Which Polish laws implement the NIS2 Directive?\"*\n- *\"Sprawdź, czy Ustawa Dz.U. 2018 poz. 1000 jest nadal w mocy\"*\n- *\"Wyszukaj 'odpowiedzialność cywilna' w Kodeksie cywilnym\"*\n- *\"Compare NIS2 incident reporting requirements with the Polish KSC transposition\"*\n- *\"Znajdź orzeczenia sądowe dotyczące RODO z 2023 roku (premium)\"*\n\n---\n\n## What's Included\n\n| Category | Count | Details |\n|----------|-------|---------|\n| **Statutes (Ustawy)** | 8,943 acts | Dziennik Ustaw publications 1918-2026 from Sejm ELI API |\n| **Provisions** | 161,705 articles | Full-text searchable with FTS5 |\n| **Case Law** | 23,043 decisions | Premium tier -- judicial decisions |\n| **Preparatory Works** | 43,312 documents | Premium tier -- druki sejmowe, rządowe projekty ustaw |\n| **Agency Guidance** | 10 documents | Premium tier -- UODO guidance |\n| **Database Size** | ~332 MB | Optimized SQLite, portable |\n| **Daily Updates** | Automated | Freshness checks against Sejm ELI API |\n\n**Verified data only** -- every citation is validated against official sources (api.sejm.gov.pl, isap.sejm.gov.pl). Zero LLM-generated content.\n\n---\n\n## See It In Action\n\n### Why This Works\n\n**Verbatim Source Text (No LLM Processing):**\n- All statute text is ingested from the Sejm ELI API (api.sejm.gov.pl) covering all Dziennik Ustaw publications\n- Provisions are returned **unchanged** from SQLite FTS5 database rows\n- Zero LLM summarization or paraphrasing -- the database contains regulation text, not AI interpretations\n\n**Smart Context Management:**\n- Search returns ranked provisions with BM25 scoring (safe for context)\n- Provision retrieval gives exact text by Dz.U. year/position + article number\n- Cross-references help navigate without loading everything at once\n\n**Technical Architecture:**\n```\nSejm ELI API (api.sejm.gov.pl) --> Parse --> SQLite --> FTS5 snippet() --> MCP response\n                                     ^                        ^\n                              Provision parser         Verbatim database query\n```\n\n### Traditional Research vs. This MCP\n\n| Traditional Approach | This MCP Server |\n|---------------------|-----------------|\n| Search ISAP by act name | Search by plain Polish: *\"ochrona danych osobowych\"* |\n| Navigate multi-chapter acts manually | Get the exact provision with context |\n| Manual cross-referencing between acts | `build_legal_stance` aggregates across sources |\n| \"Czy ta ustawa jest w mocy?\" -> check manually | `check_currency` tool -> answer in seconds |\n| Find EU basis -> dig through EUR-Lex | `get_eu_basis` -> linked EU directives instantly |\n| Check ISAP, Dziennik Ustaw, EUR-Lex separately | Daily automated freshness checks |\n| No API, no integration | MCP protocol -> AI-native |\n\n**Traditional:** Search ISAP -> Download PDF -> Ctrl+F -> Cross-reference with RODO -> Check EUR-Lex -> Repeat\n\n**This MCP:** *\"Jakie unijne przepisy stanowią podstawę art. 22 UODO o zautomatyzowanym podejmowaniu decyzji?\"* -> Done.\n\n---\n\n## Available Tools (13)\n\n### Core Legal Research Tools (8)\n\n| Tool | Description |\n|------|-------------|\n| `search_legislation` | FTS5 full-text search across 161,705 provisions with BM25 ranking |\n| `get_provision` | Retrieve specific provision by Dz.U. identifier + article number |\n| `validate_citation` | Validate citation against database (zero-hallucination check) |\n| `build_legal_stance` | Aggregate citations from statutes, case law, preparatory works |\n| `format_citation` | Format citations per Polish conventions (full/short/pinpoint) |\n| `check_currency` | Check if statute is in force, amended, or repealed |\n| `list_sources` | List all available statutes with metadata and data provenance |\n| `about` | Server info, capabilities, dataset statistics, and coverage summary |\n\n### EU Law Integration Tools (5)\n\n| Tool | Description |\n|------|-------------|\n| `get_eu_basis` | Get EU directives/regulations underlying a Polish statute |\n| `get_polish_implementations` | Find Polish laws implementing a specific EU act |\n| `search_eu_implementations` | Search EU documents with Polish implementation counts |\n| `get_provision_eu_basis` | Get EU law references for a specific provision |\n| `validate_eu_compliance` | Check implementation status against EU directives |\n\n---\n\n## EU Law Integration\n\nPoland is a full EU member state (accession 2004). Polish law has systematic EU cross-references across data protection, cybersecurity, financial regulation, and labour law.\n\n| Metric | Value |\n|--------|-------|\n| **EU Integration** | Full EU member (accession 2004) |\n| **GDPR Implementation** | UODO -- Ustawa o ochronie danych osobowych (2018, UODO oversight) |\n| **NIS2 Transposition** | Ustawa o krajowym systemie cyberbezpieczeństwa (KSC, update pending) |\n| **AI Act** | Direct application (EU regulation, no transposition needed) |\n| **EUR-Lex Integration** | Automated metadata fetching |\n\n### Key EU Acts with Polish Implementations\n\n1. **GDPR** (2016/679) -- UODO (Ustawa z dnia 10 maja 2018 r. o ochronie danych osobowych)\n2. **NIS2 Directive** (2022/2555) -- Ustawa o KSC (amendment in progress as of 2026)\n3. **eIDAS Regulation** (910/2014) -- Ustawa o usługach zaufania (2016)\n4. **AI Act** (2024/1689) -- Direct application\n5. **DORA** (2022/2554) -- Direct application in financial sector\n\nSee [EU_INTEGRATION_GUIDE.md](docs/EU_INTEGRATION_GUIDE.md) for detailed documentation and [EU_USAGE_EXAMPLES.md](docs/EU_USAGE_EXAMPLES.md) for practical examples.\n\n---\n\n## Data Sources & Freshness\n\nAll content is sourced from authoritative Polish legal databases:\n\n- **[Sejm ELI API](https://api.sejm.gov.pl/)** -- Official Polish Parliament legislative database (European Legislation Identifier)\n- **[ISAP](https://isap.sejm.gov.pl/)** -- Internetowy System Aktów Prawnych\n- **[EUR-Lex](https://eur-lex.europa.eu/)** -- Official EU law database (metadata only)\n\n### Data Provenance\n\n| Field | Value |\n|-------|-------|\n| **Authority** | Kancelaria Sejmu RP (Polish Parliament Chancellery) |\n| **Retrieval method** | Sejm ELI REST API (api.sejm.gov.pl) |\n| **Languages** | Polish (official language of law) |\n| **License** | Public domain (Sejm ELI open data) |\n| **Coverage** | 8,943 acts published in Dziennik Ustaw (1918-2026) |\n| **Last ingested** | 2026-02-25 |\n\n### Automated Freshness Checks (Daily)\n\nA [daily GitHub Actions workflow](.github/workflows/check-updates.yml) monitors all data sources:\n\n| Source | Check | Method |\n|--------|-------|--------|\n| **Statute amendments** | Sejm ELI API date comparison | All 8,943 acts checked |\n| **New statutes** | Dziennik Ustaw publications (90-day window) | Diffed against database |\n| **Preparatory works** | Sejm druki API (30-day window) | New texts detected |\n| **EU reference staleness** | Git commit timestamps | Flagged if >90 days old |\n\n---\n\n## Security\n\nThis project uses multiple layers of automated security scanning:\n\n| Scanner | What It Does | Schedule |\n|---------|-------------|----------|\n| **CodeQL** | Static analysis for security vulnerabilities | Weekly + PRs |\n| **Semgrep** | SAST scanning (OWASP top 10, secrets, TypeScript) | Every push |\n| **Gitleaks** | Secret detection across git history | Every push |\n| **Trivy** | CVE scanning on filesystem and npm dependencies | Daily |\n| **Docker Security** | Container image scanning + SBOM generation | Daily |\n| **Socket.dev** | Supply chain attack detection | PRs |\n| **OSSF Scorecard** | OpenSSF best practices scoring | Weekly |\n| **Dependabot** | Automated dependency updates | Weekly |\n\nSee [SECURITY.md](SECURITY.md) for the full policy and vulnerability reporting.\n\n---\n\n## Important Disclaimers\n\n### Legal Advice\n\n> **THIS TOOL IS NOT LEGAL ADVICE**\n>\n> Statute text is sourced from official Sejm ELI API (Dziennik Ustaw) publications. However:\n> - This is a **research tool**, not a substitute for professional legal counsel\n> - **Court case coverage is limited** (premium tier) -- do not rely solely on this for case law research\n> - **Verify critical citations** against primary sources for court filings\n> - **EU cross-references** are extracted from Polish statute text, not EUR-Lex full text\n> - **Regulatory guidance** (UODO decisions) has limited coverage in the free tier\n\n**Before using professionally, read:** [DISCLAIMER.md](DISCLAIMER.md) | [PRIVACY.md](PRIVACY.md)\n\n### Client Confidentiality\n\nQueries go through the Claude API. For privileged or confidential matters, use on-premise deployment. For guidance on professional obligations, consult the Naczelna Rada Adwokacka (Polish Bar Council). See [PRIVACY.md](PRIVACY.md) for compliance guidance.\n\n---\n\n## Documentation\n\n- **[EU Integration Guide](docs/EU_INTEGRATION_GUIDE.md)** -- Detailed EU cross-reference documentation\n- **[EU Usage Examples](docs/EU_USAGE_EXAMPLES.md)** -- Practical EU lookup examples\n- **[Security Policy](SECURITY.md)** -- Vulnerability reporting and scanning details\n- **[Disclaimer](DISCLAIMER.md)** -- Legal disclaimers and professional use notices\n- **[Privacy](PRIVACY.md)** -- Client confidentiality and data handling\n\n---\n\n## Development\n\n### Setup\n\n```bash\ngit clone https://github.com/Ansvar-Systems/polish-law-mcp\ncd polish-law-mcp\nnpm install\nnpm run build\nnpm test\n```\n\n### Running Locally\n\n```bash\nnpm run dev                                       # Start MCP server\nnpx @anthropic/mcp-inspector node dist/index.js   # Test with MCP Inspector\n```\n\n### Data Management\n\n```bash\nnpm run ingest                    # Ingest statutes from Sejm ELI API\nnpm run build:db                  # Rebuild SQLite database\nnpm run drift:detect              # Run drift detection against anchors\nnpm run check-updates             # Check for amendments and new statutes\nnpm run census                    # Generate coverage census report\n```\n\n### Performance\n\n- **Search Speed:** <100ms for most FTS5 queries\n- **Database Size:** ~332 MB (efficient, portable)\n- **Reliability:** 100% ingestion success rate across 8,943 acts\n\n---\n\n## More Ansvar MCPs\n\nFull fleet coverage at [ansvar.eu/coverage](https://ansvar.eu/coverage).\n## Contributing\n\nContributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\nPriority areas:\n- Court case law expansion (Sąd Najwyższy, Naczelny Sąd Administracyjny)\n- UODO decisions and guidance ingestion\n- Historical statute versions and amendment tracking\n- EU implementation gap analysis for NIS2 KSC update\n\n---\n\n## Roadmap\n\n- [x] Core statute database with FTS5 search\n- [x] Full corpus ingestion (8,943 acts, 161,705 provisions) from Dziennik Ustaw 1918-2026\n- [x] EU law integration tools\n- [x] Vercel Streamable HTTP deployment\n\n- [x] Premium case law (23,043 decisions)\n- [x] Premium preparatory works (43,312 documents)\n- [x] Premium agency guidance (10 UODO documents)\n- [ ] Sąd Najwyższy full case law coverage\n- [ ] UODO guidance documents expansion\n- [ ] Historical statute versions (amendment tracking)\n- [ ] NIS2 KSC amendment tracking\n\n---\n\n## Citation\n\nIf you use this MCP server in academic research:\n\n```bibtex\n@software{polish_law_mcp_2026,\n  author = {Ansvar Systems AB},\n  title = {Polish Law MCP Server: Production-Grade Legal Research Tool},\n  year = {2026},\n  url = {https://github.com/Ansvar-Systems/polish-law-mcp},\n  note = {8,943 Polish acts with 161,705 provisions from Dziennik Ustaw (1918-2026) and EU law cross-references}\n}\n```\n\n---\n\n## License\n\nApache License 2.0. See [LICENSE](./LICENSE) for details.\n\n### Data Licenses\n\nAnsvar attribution code: **`PL-Statutory-PD`**. Basis: `Ustawa o prawie\nautorskim` Art. 4 — Polish statutory-PD carve-out for legislative and\nadministrative acts.\n\n- **Statutes & Legislation:** Kancelaria Sejmu RP — ISAP. Public domain\n  under Art. 4 of the Polish Copyright Act, covering ustawy,\n  rozporządzenia, obwieszczenia, and other legislative/administrative\n  acts.\n- **EU Metadata:** EUR-Lex (EU public-domain notice).\n\n### Coverage scope (narrow carve-out)\n\nArt. 4 of the Polish Copyright Act is **NARROW** — it does not\nenumerate court decisions.\n\n- **IN-SCOPE under Art. 4:** statutes (`ustawy`), drafts, regulations\n  (`rozporządzenia`), administrative acts, official notices.\n- **OUT-OF-SCOPE under Art. 4:** court decisions. These require a\n  separate basis:\n  - Civil judgments: K.p.c. Art. 9 (Code of Civil Procedure).\n  - Criminal judgments: K.p.k. Art. 100 (Code of Criminal Procedure).\n- **Why this matters:** This MCP ships the statute tier from ISAP under\n  Art. 4. A case-law tier would require a separate licensing\n  declaration.\n\nSee `docs/audits/2026-05-17-eu-copyright-statutory-works-batch-4-LV-LT-PL.md`\nin the Ansvar architecture-documentation repo for the verbatim Art. 4\ntext and the coverage analysis.\n\n---\n\n## About Ansvar Systems\n\nWe build AI-accelerated compliance and legal research tools for the European market. This MCP server started as our internal reference tool for Polish law -- turns out everyone building for the Polish and EU markets has the same research frustrations.\n\nSo we're open-sourcing it. Navigating 8,943 acts in the Dziennik Ustaw shouldn't require a law degree.\n\n**[ansvar.eu](https://ansvar.eu)** -- Stockholm, Sweden\n\n---\n\n<p align=\"center\">\n  <sub>Built with care in Stockholm, Sweden</sub>\n</p>\n",
  "bytes": 17561,
  "sha": "e1ac7ab45415a2a2c49a9a69974af056a461020ea09ee2392ad83349e04b74bb",
  "repo_slug": "ansvar-systems/polish-law-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_eu_ansvar_polish_law_mcp_403d43c0/readme"
}