🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@ansvar/polish-law-mcp

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ansvar/polish-law-mcp

Complete Polish law database — 8,943 Acts (Ustawy), 161,705 provisions from the Sejm ELI API covering all parliamentary legislation published in Dziennik Ustaw (1918-2026) with Polish full-text search and EU cross-references

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

Polish Law MCP Server

The Sejm alternative for the AI age.

npm License CI MCP Registry OpenSSF Scorecard Database Provisions

Query 8,943 Polish laws -- from the RODO implementing provisions and Kodeks karny to the KSC, Kodeks spolek handlowych, and more -- directly from Claude, Cursor, or any MCP-compatible client.

If you're building legal tech, compliance tools, or doing Polish legal research, this is your verified reference database.

Built by Ansvar Systems -- Stockholm, Sweden

Why This Exists

Polish legal research is scattered across ISAP (Internetowy System Aktow Prawnych), the Dziennik Ustaw, and commercial platforms. Whether you're:

  • A lawyer validating citations in a brief or contract under Polish law
  • A compliance officer checking RODO/GDPR implementing provisions or KSC obligations
  • A legal tech developer building tools on Polish legislation
  • A researcher tracing legislative history through the Dziennik Ustaw

...you shouldn't need dozens of browser tabs and manual PDF cross-referencing. Ask Claude. Get the exact provision. With context.

This MCP server makes Polish law searchable, cross-referenceable, and AI-readable.

Example Queries

Once connected, just ask naturally:

  • "Co mowi RODO o zgodzie na przetwarzanie danych?"
  • "Znajdz przepisy o ochronie danych osobowych w polskim prawie"
  • "What does the KSC say about incident reporting?"
  • "Find cybercrime provisions in the Kodeks karny (Art. 267-269b)"
  • "Is the Kodeks spolek handlowych still in force?"
  • "What EU directives does the DPA 2018 implement?"
  • "Validate this legal citation"
  • "Build a legal stance on data breach notification requirements in Poland"

Deployment Tier

MEDIUM -- dual tier, free database bundled in npm package.

TierPlatformDatabaseContent
FreeVercel (Hobby) / npm (stdio)Core legislation (~100-180 MB)Key laws (DPA 2018, KSC, Kodeks karny cybercrime, KSH, e-Services Act, Telecommunications Law), FTS search, EU cross-references
ProfessionalAzure Container Apps / Docker / LocalFull database (~500 MB - 900 MB)+ All ustawy and rozporzadzenia, UODO decisions and guidance, Supreme Court/Constitutional Tribunal summaries, NIS2 transposition materials

The full database is larger due to the comprehensive scope of Polish legislation and supplementary regulatory materials. The free tier contains all key data protection, cybersecurity, cybercrime, commercial, and e-services legislation from ISAP.

Data Sources

SourceAuthorityMethodUpdate FrequencyLicenseCoverage
ISAPKancelaria Sejmu RP (Chancellery of the Sejm)HTML Scrape / APIWeeklyGovernment Open Data (public domain per Art. 4 Copyright Act)All Polish legislation published in Dziennik Ustaw and Monitor Polski

Full provenance metadata: sources.yml

Quick Start

Use Remotely (No Install Needed)

Connect directly to the hosted version -- zero dependencies, nothing to install.

Endpoint: https://polish-law-mcp.vercel.app/mcp

ClientHow to Connect
Claude.aiSettings > Connectors > Add Integration > paste URL
Claude Codeclaude mcp add polish-law --transport http https://polish-law-mcp.vercel.app/mcp
Claude DesktopAdd to config (see below)
GitHub CopilotAdd to VS Code settings (see below)

Claude Desktop -- add to claude_desktop_config.json:

{
  "mcpServers": {
    "polish-law": {
      "type": "url",
      "url": "https://polish-law-mcp.vercel.app/mcp"
    }
  }
}

GitHub Copilot -- add to VS Code settings.json:

{
  "github.copilot.chat.mcp.servers": {
    "polish-law": {
      "type": "http",
      "url": "https://polish-law-mcp.vercel.app/mcp"
    }
  }
}

Use Locally (npm)

npx @ansvar/polish-law-mcp

Claude Desktop -- add to claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "polish-law": {
      "command": "npx",
      "args": ["-y", "@ansvar/polish-law-mcp"]
    }
  }
}

Cursor / VS Code:

{
  "mcp.servers": {
    "polish-law": {
      "command": "npx",
      "args": ["-y", "@ansvar/polish-law-mcp"]
    }
  }
}

Tools

ToolDescriptionFree TierProfessional
get_provisionRetrieve a specific article from a Polish law or codeYesYes
search_legislationFull-text search across all Polish legislation (Polish)YesYes
list_lawsList all available laws with metadataYesYes
get_law_structureGet table of contents / structure of a law or codeYesYes
get_provision_eu_basisCross-reference Polish law to EU directives/regulationsYesYes
search_rozporzadzeniaSearch rozporzadzenia (regulations) and executive instrumentsNo (upgrade)Yes
get_uodo_guidanceRetrieve UODO decisions and guidanceNo (upgrade)Yes

Key Legislation Covered

LawIdentifierDomainKey Topics
DPA 2018Ustawa o ochronie danych osobowych (Dz.U. 2018 poz. 1000)Data ProtectionGDPR/RODO implementing provisions, UODO structure and powers, administrative procedures, certification
KSCUstawa o krajowym systemie cyberbezpieczenstwa (Dz.U. 2018 poz. 1560)CybersecurityNational cybersecurity system, CSIRT teams, incident reporting, essential services operators, NIS implementation
Kodeks karny (cybercrime)Art. 267-269bCybercrimeUnauthorized access (267), data destruction (268), system sabotage (268a), critical system sabotage (269), hacking tools (269b)
KSHKodeks spolek handlowych (Dz.U. 2000 nr 94 poz. 1037)Company LawSp. z o.o. and S.A. companies, partnerships, corporate governance, shareholders' rights
e-Services ActUstawa o swiadczeniu uslug droga elektroniczna (Dz.U. 2002 nr 144 poz. 1204)e-CommerceElectronic service providers, hosting liability, commercial communications, consumer information
Telecommunications LawPrawo telekomunikacyjne (Dz.U. 2004 nr 171 poz. 1800)TelecommunicationsTelecom regulation, UKE authority, licensing, data retention, lawful interception

Database Estimates

ComponentFree TierFull (Professional)
Core codes and key laws~70-130 MB~70-130 MB
All ustawy and rozporzadzenia--~300-500 MB
UODO decisions and guidance--~50-100 MB
Case law summaries--~70-150 MB
Cross-references and metadata~5 MB~15 MB
Total~100-180 MB~500 MB - 900 MB

Delivery strategy: Free-tier DB bundled in npm package (Strategy A -- fits within Vercel 250 MB function limit). If final size exceeds 250 MB after ingestion, switch to Strategy B (runtime download from GitHub Releases).

Regulatory Context

  • Supervisory Authority: UODO (Urzad Ochrony Danych Osobowych - Personal Data Protection Office) with growing enforcement activity
  • RODO is the Polish name for GDPR (Rozporzadzenie o Ochronie Danych Osobowych); the DPA 2018 provides national implementing provisions
  • KSC established Poland's national cybersecurity system with three CSIRT teams: CSIRT NASK (private sector), CSIRT GOV (government), CSIRT MON (military)
  • NASK (Naukowa i Akademicka Siec Komputerowa) operates the national cybersecurity research center
  • Polish legal texts are explicitly excluded from copyright under Art. 4 of the Copyright Act, ensuring free reuse
  • Dziennik Ustaw (Journal of Laws) is the sole authoritative publication vehicle for Polish legislation
  • Poland is the EU's sixth largest economy and the largest in Central and Eastern Europe
  • NIS2 transposition is expected to expand KSC significantly with new entity categories and reporting obligations

Development

# Clone the repository
git clone https://github.com/Ansvar-Systems/polish-law-mcp.git
cd polish-law-mcp

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Run contract tests
npm run test:contract

# Build database (requires raw data in data/ directory)
npm run build:db

# Build free-tier database
npm run build:db:free

# Run drift detection
npm run drift:detect

# Full validation
npm run validate

Architecture

polish-law-mcp/
├── .github/
│   ├── workflows/
│   │   ├── ci.yml                    # Test + lint + security scan
│   │   ├── publish.yml               # npm publish on version tags
│   │   ├── check-source-updates.yml  # Data freshness monitoring
│   │   └── drift-detect.yml          # Upstream drift detection
│   ├── SECURITY.md
│   ├── SECURITY-SETUP.md
│   └── ISSUE_TEMPLATE/
│       └── data-error.md
├── data/
│   └── .gitkeep
├── fixtures/
│   ├── golden-tests.json             # 12 contract tests
│   ├── golden-hashes.json            # 6 drift detection anchors
│   └── README.md
├── scripts/
│   ├── build-db.ts
│   ├── build-db-free.ts
│   ├── download-free-db.sh
│   ├── ingest.ts
│   ├── drift-detect.ts
│   └── check-source-updates.ts
├── src/
│   ├── server.ts
│   ├── db.ts
│   └── tools/
│       ├── get-provision.ts
│       ├── search-legislation.ts
│       ├── list-laws.ts
│       ├── get-law-structure.ts
│       ├── get-provision-eu-basis.ts
│       ├── search-rozporzadzenia.ts
│       └── get-uodo-guidance.ts
├── __tests__/
│   ├── unit/
│   ├── contract/
│   │   └── golden.test.ts
│   └── integration/
├── sources.yml
├── server.json
├── package.json
├── tsconfig.json
├── vercel.json
├── CHANGELOG.md
├── LICENSE
└── README.md

Notes on Polish Data Protection Landscape

RODO (GDPR) and the DPA 2018 have distinctive Polish implementation features:

  • Poland's DPA 2018 focuses on UODO structure and procedures rather than substantive data protection rules (which come directly from GDPR/RODO)
  • UODO has been growing in enforcement activity, with increasing fine amounts
  • Poland maintains sector-specific data protection provisions in telecommunications and health legislation
  • Age of digital consent set at 16 (GDPR default)

KSC (National Cybersecurity System) is comprehensive:

  • Three-CSIRT model: CSIRT NASK (private sector), CSIRT GOV (government), CSIRT MON (military)
  • Essential services operators must implement security measures and report incidents
  • Digital service providers have separate obligations
  • NIS2 transposition will significantly expand the scope and requirements

Kodeks karny cybercrime provisions (Arts. 267-269b) cover:

  • Art. 267: Unauthorized access to information
  • Art. 268: Destruction or alteration of data
  • Art. 268a: Disruption of automated data processing
  • Art. 269: Sabotage of computer systems of particular importance
  • Art. 269b: Manufacturing or possession of hacking tools

Poland is the largest economy in Central and Eastern Europe and a key market for EU-wide compliance programs.

Security

Report vulnerabilities to security@ansvar.eu (48-hour acknowledgment SLA).

See SECURITY.md for full disclosure policy.

Maintained by: Ansvar Systems Engineering Contact: hello@ansvar.eu

Keywords

mcp

FAQs

Package last updated on 27 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts