poland-law
by pipeworx-io
README.md
# @pipeworx/poland-law
Polish national legislation from the Sejm's legal-acts database: search
statutes, regulations and official notices published in the Dziennik Ustaw
(Journal of Laws) and Monitor Polski by title or subject keyword, then read an
act's record and its text, whole or one article at a time. Original Polish
text, with the gazette citation, in-force status and related acts.
Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 2015+ live data sources. This is an independent, unofficial integration — not affiliated with, endorsed by, or published by the upstream provider.
## Tools
- `pl_law_search(query?, keyword?, year?, type?, publisher?, in_force_only?, offset?)`
— find acts by Polish title words (for example `Kodeks pracy`), Sejm subject
keyword, year, act type (`Ustawa`, `Rozporzadzenie`, `Obwieszczenie`) or
gazette (`DU`, `MP`). Newest first. Returns id (`DU/1974/141`), title, type,
in-force flag, citation, announcement / promulgation / entry-into-force
dates and which texts exist. 10 per page; `next_offset` continues.
- `pl_law_get(id, article?, text_kind?, max_chars?, offset?)` — one act by id
or citation (`Dz.U. 1974 poz. 141`): record data, issuing bodies, amending
acts, consolidated-text notices, legal basis, and the text. `article`
returns one article (`10a`). Without it the text is capped at `max_chars`
and `offset` reads on.
## Auth
Keyless.
## Data sources
- Poland, Sejm Chancellery, legal-acts database (Dziennik Ustaw and Monitor
Polski) — act records, texts as published, and the Sejm's up-to-date
consolidated texts.
An act and the official notices that republish its consolidated text are
separate records; `consolidated_text_notices` lists the notices. When the Sejm
publishes an up-to-date consolidated text (`tekst ujednolicony`) it is the
default text and `text_kind` says `consolidated`; it is informational, not
authentic, and the gazette text prevails. Otherwise the text as published is
returned (`text_kind: published`), without later amendments. Consolidated
texts are read from PDF: superscripts in article numbers (Art. 30^2) read as
plain digits, so an article with a superscript number cannot be addressed
there, and tables may be flattened. `data_as_of` is the date of the live read.
Read live on each call; nothing is copied. A search or lookup that finds
nothing returns `empty_reason`, not an empty success. EU law is not in this
pack (see the EUR-Lex pack); public procurement is in the Poland tenders pack.
## Quick Start
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
```json
{
"mcpServers": {
"poland-law": {
"url": "https://gateway.pipeworx.io/poland-law/mcp"
}
}
}
```
### What this endpoint actually serves
`tools/list` at `https://gateway.pipeworx.io/poland-law/mcp` returns the tools in the table
above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
`discover_tools`, `search_within`, `remember`/`recall` and the rest of the
gateway-wide set. So the tool count you see is larger than this table: a
single-pack endpoint currently lists roughly 30 shared tools alongside the
pack's own. The connection's `initialize` response states its exact scope, and
is the authoritative answer for a given day.
This is deliberate, not multiplexing by accident. The meta-tools are what let a
scoped connection answer a question this pack does not cover — via
`ask_pipeworx`, which routes across the whole catalog — without you adding a
second MCP server. There is currently no way to mount a pack endpoint without
them; if the extra schemas cost you more context than the routing is worth,
connect to the full gateway once rather than to several pack endpoints.
Or connect to the full Pipeworx gateway to get every pack's tools listed
directly, instead of just this one's:
```json
{
"mcpServers": {
"pipeworx": {
"url": "https://gateway.pipeworx.io/mcp"
}
}
}
```
Both URLs reach the same gateway and the same 2015+ data sources. The
only difference is which pack's tools are listed **directly**; `ask_pipeworx`
reaches all of them from either one.
## No MCP client? Call it over HTTP
```bash
curl -X POST https://gateway.pipeworx.io/v1/tools/pl_law_search \
-H 'Content-Type: application/json' \
-d '{"query":"Kodeks pracy","type":"Obwieszczenie","in_force_only":true}'
```
No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/pl_law_search`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.
## Run it from npm
`@pipeworx/mcp-poland-law` is a local stdio bridge to the Pipeworx gateway: your MCP client
starts it with `npx`, and it forwards every call to the same
`https://gateway.pipeworx.io/poland-law/mcp` endpoint shown above. It needs network access;
there is no offline mode.
```json
{
"mcpServers": {
"poland-law": {
"command": "npx",
"args": ["-y", "@pipeworx/mcp-poland-law"]
}
}
}
```
Without a key it calls anonymously, capped at 50 calls a day. A free account
raises that to 200 a day: get a key at https://pipeworx.io/signup and add
`"env": { "PIPEWORX_API_KEY": "<your key>" }` to the server entry.
The key is sent as a Bearer token, the same way a hosted connection sends it,
so calls are metered and billed exactly as they are there.
It lists **only** this pack's tools by default. Set `PIPEWORX_META_TOOLS=1` to
also list `ask_pipeworx` and the other gateway-wide tools.
Behind an HTTPS proxy: Node's built-in `fetch` does not read `HTTPS_PROXY` by
default. Newer Node releases honour it when `NODE_USE_ENV_PROXY=1` is set; check
your Node version's documentation.
## Using with ask_pipeworx
Instead of calling tools directly, you can ask questions in plain English —
this works on the pack endpoint above as well as on the full gateway:
```
ask_pipeworx({ question: "your question about Poland Law data" })
```
The gateway picks the right tool and fills the arguments automatically.
## More
- [Docs and guides](https://pipeworx.io/docs)
- [pipeworx.io](https://pipeworx.io)
## License
MIT
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues