Skip to main content
Glama

mcp-isap

Installation

Run straight from GitHub (no npm package needed)

npx -y github:pwasniowski/mcp-isap

npx clones the repository, installs dependencies and builds dist/ (via the prepare script) on first run, then starts the stdio server. Requires Node.js 20+ and git.

Claude Desktop

Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\) and restart Claude Desktop:

{
  "mcpServers": {
    "isap": {
      "command": "npx",
      "args": ["-y", "github:pwasniowski/mcp-isap"]
    }
  }
}

Any other MCP client (stdio) uses the same command / args. When the npm package @legal-link/mcp-isap is published, npx -y @legal-link/mcp-isap works as well.

(Building from source - below.)

MCP License: MIT Node

MCP server for Polish legislation - Dziennik Ustaw (Journal of Laws, DU) + Monitor Polski (MP) via the official Sejm ELI API (api.sejm.gov.pl/eli).

Related MCP server: mcp-isap

Why

mcp-saos (general courts) + mcp-nsa (administrative) + mcp-eu-sparql (EU) cover the case-law side. mcp-isap adds legislation - statutes, regulations, official announcements, international agreements. This closes the triad:

STATUTE + CASE LAW + EU LAW
   ↓         ↓          ↓
  ISAP    SAOS+NSA   EUR-Lex
   ↓         ↓          ↓
        law firm asks about GDPR
        → 4 connectors in parallel
        → 4 citation sections in the panel

Coverage: 96,000+ acts from 1918 to today. Full ELI support (European Legislation Identifier).

Tools

  • search_acts(title?, year?, publisher?, type?, in_force?, date_from?, date_to?, sort?, exclude_amendments?, limit?, offset?) - search by title fragment / year / publisher / act type / in-force status / promulgation date range. publisher: DU (Dziennik Ustaw) or MP (Monitor Polski). With a title, results are ranked (sort: "relevance", the default): the base act whose subject is the searched phrase first (e.g. o podatku od towarów i usług -> DU/2004/535), then its consolidated-text announcements (newest first), then other acts, amendments last. exclude_amendments: true drops amending acts ("o zmianie...", "zmieniające..."); sort: "newest" keeps the Sejm ELI order. Paginate with offset.

  • get_act(eli) - act details by ELI (DU/2018/1000). Returns title, type, status, entry into force, keywords, links to HTML/PDF text and the ISAP page, the newest consolidated text of a base act, and - for a consolidated-text announcement - amendments published after it.

  • get_act_text(eli, page?, search_text?, occurrence?, latest_consolidated?, source?) - the act's plain text, paginated at 5000 characters per page. Source: HTML when Sejm ELI has it, otherwise the text layer of the official PDF (consolidated texts such as DU/2026/1263 are PDF-only); structuredContent.text_format says which. Iterate page while structuredContent.pagination.has_more is true, or pass search_text (e.g. "Art. 86.") to get the fragment around a hit in one call (case-sensitive match first, so Art. 86. hits the article heading rather than a cross-reference; occurrence picks further hits). structuredContent.text_version says whether this is a consolidated text or the wording as promulgated - for a base act Sejm ELI serves the original wording, which is NOT the law in force. Pass latest_consolidated: true to jump to the newest consolidated text automatically; amended_after_consolidated_eli lists amendments that the consolidated text does not include yet. Only when neither HTML nor a readable PDF exists does the tool return text_unavailable_use_pdf.

Example - current wording of VAT art. 86:

search_acts(title="o podatku od towarów i usług")            -> DU/2004/535 first
get_act_text(eli="DU/2004/535", search_text="Art. 86.", latest_consolidated=true)
                                                              -> text of DU/2026/1263 (PDF)

Every response includes structuredContent.citations with fields: title, url (ISAP UI), eli, display_address (Dz.U. 2018 poz. 1000), publisher, year, document_type, status, in_force, promulgation.

Patron reads this field automatically and renders it in the UI panel as the section "Polish legal acts (Dz.U. / M.P. - Sejm ELI)".

Stack

  • Node 20+ (built-in fetch)

  • @modelcontextprotocol/sdk

  • unpdf (MIT; bundles Mozilla pdf.js, Apache-2.0) - pure-JS PDF text extraction

  • Stdio transport

  • 500 ms throttle between requests (2 req/s)

  • No scraping - pure REST JSON API

Build + run

npm install
npm run build
node dist/index.js

Wiring into Patron

In patron/backend/mcp-servers.json:

{
  "name": "isap",
  "transport": "stdio",
  "command": "node",
  "args": ["C:/Users/<YOUR-USER>/mcp-isap/dist/index.js"],
  "enabled": true
}

Smoke test

echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"s","version":"0"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_act","arguments":{"eli":"DU/2018/1000"}}}' \
  | node dist/index.js

Should return the Personal Data Protection Act of 10 May 2018, status IN_FORCE, a link to ISAP and a structured citation.

Lineage

API contract derived from legal-data-hunter/sources/PL/DziennikUrzedowy (Python + REST, MIT). TS implementation from scratch - no source code imported.

License

MIT - see LICENSE. Originally created by MateMatic Solutions (matematicsolutions/mcp-isap); maintained at pwasniowski/mcp-isap.

Part of MateMatic

This connector queries its source live. It is one of the Polish and EU source connectors bundled in PATRON and works with any MCP client.

mcp-saos, mcp-nsa, mcp-isap, mcp-krs and mcp-eu-sparql share one structuredContent.citations contract: each tool returns an array of {title, url, snippet?, ...metadata} that legal agents can render directly in their citation panel.

See matematicsolutions/.github for the full org profile.

Available Tools

3 tools
get_actA
Read-onlyIdempotent

Pobiera szczegoly aktu po identyfikatorze ELI (np. 'DU/2018/1000' dla Ustawy o ochronie danych osobowych z 2018 r.). Zwraca pelne metadane: tytul, typ, status obowiazywania, wejscie w zycie, slowa kluczowe, linki do tekstu HTML/PDF i strony ISAP.

Inputs: eli (required).

get_act_textA
Read-onlyIdempotent

Pobiera tekst aktu, stronami po 5000 znakow czystego tekstu. Zrodlo: HTML z Sejm ELI, a gdy akt ma tylko PDF (np. nowsze obwieszczenia z tekstem jednolitym) - tekst wyodrebniony z PDF (structuredContent.text_format). Odpowiedz konczy sie licznikiem [paginacja] strona N z M, a structuredContent.pagination ma page/total_pages/has_more - iteruj page az has_more=false. Zeby trafic w konkretny przepis bez przewijania, podaj search_text (np. 'Art. 86.') - tool zwroci fragment wokol tej frazy. UWAGA: dla aktu bazowego tekst to tekst OGLOSZONY (brzmienie pierwotne), nie stan obowiazujacy - structuredContent.text_version to rozroznia. Po brzmienie aktualne podaj latest_consolidated: true (tool przejdzie do najnowszego tekstu jednolitego) albo ELI obwieszczenia z consolidated_text_eli. Bledy: text_unavailable_use_pdf (nie udalo sie odczytac tekstu ani z HTML, ani z PDF), not_found (brak frazy albo aktu), invalid_eli.

Inputs: eli (required), page, source, occurrence, +2 more.

search_actsA
Read-onlyIdempotent

Wyszukiwanie aktow prawa polskiego (Dziennik Ustaw + Monitor Polski) przez oficjalne Sejm ELI API. Pokrycie: 96 000+ aktow od 1918. Filtry: fragment tytulu, rok, publisher (DU/MP), typ aktu, status obowiazywania, data ogloszenia. Przy wyszukiwaniu po tytule wyniki sa RANKOWANE: ustawa/akt bazowy na gorze, potem obwieszczenia z tekstem jednolitym, nowelizacje na koncu (albo wcale - exclude_amendments). Paginacja: offset. Bledy: upstream_error, invalid_args.

Inputs: sort, type, year, limit, +7 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 3 tools

    Disambiguation4/5

    The three tools map to distinct stages of a workflow: discovery (search_acts), metadata retrieval (get_act), and full-text retrieval (get_act_text). The only plausible confusion is between get_act and get_act_text, but the descriptions make the metadata-vs-content split explicit.

    Naming Consistency5/5

    All names follow a consistent snake_case verb_noun pattern (search_acts, get_act, get_act_text). The get_act / get_act_text pairing is a predictable refinement rather than a convention break.

    Tool Count4/5

    Three tools are a tight, well-justified surface for a read-only legal-acts reference server: one search, one metadata fetch, one text fetch. It is on the lean side, but each tool earns its place and there is no redundancy.

    Completeness4/5

    The read-only lifecycle is fully covered: search with rich filters and ranking, metadata by ELI, and paginated full text with in-text search plus a path to consolidated/latest versions. Minor gaps exist (no direct PDF download tool, no enumeration of act types/publishers or status values for building filters), but agents can work around these via search results.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI-powered legal research and analysis of Polish legal acts from the Sejm API. Provides comprehensive search, document retrieval, metadata analysis, and content access for legal documents from Dziennik Ustaw and Monitor Polski.
      13
      23
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables searching Polish parliamentary prints and retrieving the full legislative process history, including links to final legal acts, via the official Sejm API.
      3
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to query official Polish Sejm data and the ELI legal acts database for deputies, clubs, committees, votes, interpellations, bills, proceedings, transcripts, and legal acts, with source links.
      29
      69 npm
      2
      Apache 2.0