Skip to main content
Glama

mcp-isap

Installation (one command)

Published on npm + MCP Registry (io.github.matematicsolutions/mcp-isap). Run without cloning:

npx -y @matematicsolutions/mcp-isap

MCP client configuration (stdio):

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

(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-nsa

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?, limit?) - search by title fragment / year / publisher / act type / in-force status. publisher: DU (Dziennik Ustaw) or MP (Monitor Polski).

  • 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.

  • get_act_text(eli, page?, search_text?) - the act's plain text (no HTML tags), paginated at 5000 characters per page. Iterate page while structuredContent.pagination.has_more is true, or pass search_text (e.g. "Art. 118.") to get the fragment around the first hit in one call. structuredContent.text_version says whether this is a consolidated text or the wording as promulgated - Sejm ELI serves the original wording for base acts, so for the law in force fetch the newest consolidated-text announcement listed in consolidated_text_eli. Acts published only as PDF return the text_unavailable_use_pdf error with links, never prose standing in for the provision.

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 18+ (built-in fetch)

  • @modelcontextprotocol/sdk

  • 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.

This server is one of five MCP connectors covering Polish jurisdiction + EU law, used by Patron (AGPL-3.0) and any other MCP-aware legal AI agent.

  • mcp-isap (this repo) - Polish legislation (Dz.U. + M.P. via Sejm ELI)

  • mcp-saos - common courts, SN, TK, KIO

  • mcp-nsa - NSA + 16 WSA administrative courts

  • mcp-krs - Polish company registry (KRS)

  • mcp-eu-sparql - EU law + CJEU (EUR-Lex)

All five MCP servers share the same 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.

ParametersJSON Schema
NameRequiredDescriptionDefault
eliYesIdentyfikator ELI w formacie PUBLISHER/YEAR/POSITION, np. 'DU/2018/1000'.

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint, idempotentHint, etc. Description adds valuable behavioral context: what metadata is returned (title, type, status, dates, keywords, links to HTML/PDF/ISAP). No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences, no redundancy. Every word adds value: states action, gives example, lists returned data.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given simplicity (1 param, no output schema, annotations present), description is fully adequate. Explains purpose, input format, and return content comprehensively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Single parameter 'eli' has 100% schema coverage. Description adds an example and format specification ('PUBLISHER/YEAR/POSITION') beyond the schema, clarifying the expected input.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description uses specific verb 'Pobiera' and resource 'aktu', provides an example ELI identifier, and lists returned metadata (title, type, status, dates, keywords, links). Clearly distinguishes from siblings 'get_act_text' and 'search_acts'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clearly indicates usage when an ELI identifier is known. Does not explicitly state when not to use or mention alternatives, but the context is clear and the sibling tools provide implicit differentiation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_act_textA
Read-onlyIdempotent

Pobiera tekst aktu w formacie HTML (jesli dostepny). Zwraca pierwsze 5000 znakow czystego tekstu (bez tagow) plus link do pelnego HTML/PDF. Uzywaj po get_act zeby ocenic czy akt jest tym, czego szuka uzytkownik.

ParametersJSON Schema
NameRequiredDescriptionDefault
eliYesELI aktu, np. 'DU/2018/1000'.

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations are already strong (readOnlyHint, idempotentHint, destructiveHint). The description adds that it returns first 5000 chars of plain text and a link, which is helpful behavioral context. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences efficiently convey purpose and usage guidelines without waste. Front-loaded with the primary action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple retrieval tool with one parameter, complete annotations, and no output schema, the description fully covers what is returned and when to use it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with a clear description for the single 'eli' parameter. The description does not add additional meaning beyond the schema, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves the text of an act in HTML format, returning first 5000 characters of plain text plus a link to full HTML/PDF. It also specifies usage after get_act, distinguishing it from sibling tools get_act and search_acts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs to use after get_act to evaluate if the act is what the user searches for, providing clear context for when and why to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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. Bledy: upstream_error.

ParametersJSON Schema
NameRequiredDescriptionDefault
typeNoTyp aktu (po polsku, dokladnie jak w bazie).
yearNoRok publikacji aktu.
limitNoMaks liczba wynikow (1-50). Domyslnie 10.
titleNoFragment tytulu (po polsku, z odmiana - np. 'ochronie' znajdzie 'ustawa o ochronie...').
in_forceNotrue = tylko obowiazujace akty. Pomin zeby objac wszystkie.
publisherNoDU = Dziennik Ustaw (ustawy, rozporzadzenia), MP = Monitor Polski (uchwaly Sejmu, postanowienia Prezydenta, obwieszczenia).

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate readOnlyHint=true, openWorldHint=true, idempotentHint=true, and destructiveHint=false. The description adds that errors return 'upstream_error', which provides behavioral context beyond annotations. No contradictions between description and annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, with key information front-loaded. It covers purpose, source, coverage, and filters in a few sentences. However, it could be better structured (e.g., bullet points) for quick scanning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 6 parameters and no output schema, the description covers the tool's purpose, source, coverage, and filters. However, it does not describe the return format (e.g., list of acts with fields), which is important for a search tool. Missing information on pagination or default limit behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with each parameter described in the schema. The description lists filters but does not add significant meaning beyond the schema. For high coverage, a baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the verb 'Wyszukiwanie' (search) and the resource 'aktow prawa polskiego' (Polish legal acts). It specifies the source (Sejm ELI API) and coverage (96,000+ acts since 1918), and lists filters. It distinguishes from siblings 'get_act' and 'get_act_text' which are retrieval tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions filters but does not provide explicit guidance on when to use this tool versus alternatives or when not to use it. Usage context is implied through filter descriptions but no exclusions or prerequisites are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv1.1.1
    • First observedget_act
    • First observedget_act_text
    • First observedsearch_acts

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a distinct purpose: get_act retrieves metadata by ID, get_act_text gets content, and search_acts performs filtered search. No overlap or ambiguity.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern in snake_case (get_act, get_act_text, search_acts), making it predictable.

Tool Count4/5

Three tools is minimal but appropriate for a focused read-only legal lookup service. Could potentially include more, but the count is reasonable.

Completeness4/5

Covers the core workflow: search, get metadata, get text. Minor gaps like batch operations or version history, but sufficient for the stated purpose.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/matematicsolutions/mcp-isap'

If you have feedback or need assistance with the MCP directory API, please join our Discord server