{
  "markdown": "# legislation-uk\n\nUK legislation from [legislation.gov.uk](https://www.legislation.gov.uk) — the official database of UK Acts and statutory instruments. Search for legislation, read its metadata, and read the actual text of an Act or of one section, in the version you choose (as amended, as enacted, or as it stood on a date).\n\nPart of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1476+ live data sources.\n\nCovers England, Wales, Scotland and Northern Ireland: `ukpga` (UK Public General Acts), `uksi` (UK Statutory Instruments), `asp` (Acts of the Scottish Parliament), `anaw`/`asc` (Wales), `nia` (Northern Ireland Acts), `ukla` (UK Local Acts).\n\n## Tools\n\n| Tool | What it returns |\n|------|-----------------|\n| `search_legislation` | Search by title words (and optional year) → matching Acts/instruments with full-text URLs |\n| `get_legislation` | Metadata for one Act/instrument by type + year + number: title, status, extent, enactment date, full-text URL |\n| `get_legislation_section` | The actual text of ONE section — e.g. section 5 of the Data Protection Act 2018 (`ukpga/2018/12`) — without paying for the whole statute |\n| `get_legislation_text` | The text of a whole Act/instrument, byte-bounded: large Acts are truncated with an explicit note pointing at the section-level tool |\n\n### Versions (the trap)\n\nUK legislation exists in point-in-time versions that differ in substance, not cosmetics: the text **as enacted** and the text **as amended** at a date. Section 5 of the Data Protection Act 2018 refers to \"the GDPR\" as enacted and \"the UK GDPR\" as it stands today. The text tools take a `version` argument — `\"current\"` (default), `\"enacted\"`, or a `YYYY-MM-DD` date — and **every response states which version it served** and the date that version took effect. Repealed/omitted words appear as runs of dots, exactly as legislation.gov.uk renders them.\n\nSection numbering also differs between versions: a section inserted by amendment does not exist in the enacted text, so a `section_not_found` for one version may still exist in another.\n\n## Auth\n\nNone. legislation.gov.uk is keyless and free.\n\n## Data sources\n\n- [legislation.gov.uk](https://www.legislation.gov.uk) — full text as CLML XML at `/{type}/{year}/{number}/data.xml`, section-level at `/{type}/{year}/{number}/section/{n}/data.xml`, versioned via `/enacted` or `/{date}` path segments; search via the Atom feed at `/{type}/data.feed`.\n\n## Quick Start\n\nAdd to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):\n\n```json\n{\n  \"mcpServers\": {\n    \"legislation-uk\": {\n      \"url\": \"https://gateway.pipeworx.io/legislation-uk/mcp\"\n    }\n  }\n}\n```\n\n### What this endpoint actually serves\n\n`tools/list` at `https://gateway.pipeworx.io/legislation-uk/mcp` returns the tools in the table\nabove **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,\n`discover_tools`, `search_within`, `remember`/`recall` and the rest of the\ngateway-wide set. So the tool count you see is larger than this table: a\nsingle-pack endpoint currently lists roughly 30 shared tools alongside the\npack's own. The connection's `initialize` response states its exact scope, and\nis the authoritative answer for a given day.\n\nThis is deliberate, not multiplexing by accident. The meta-tools are what let a\nscoped connection answer a question this pack does not cover — via\n`ask_pipeworx`, which routes across the whole catalog — without you adding a\nsecond MCP server. There is currently no way to mount a pack endpoint without\nthem; if the extra schemas cost you more context than the routing is worth,\nconnect to the full gateway once rather than to several pack endpoints.\n\nOr connect to the full Pipeworx gateway to get every pack's tools listed\ndirectly, instead of just this one's:\n\n```json\n{\n  \"mcpServers\": {\n    \"pipeworx\": {\n      \"url\": \"https://gateway.pipeworx.io/mcp\"\n    }\n  }\n}\n```\n\nBoth URLs reach the same gateway and the same 1476+ data sources. The\nonly difference is which pack's tools are listed **directly**; `ask_pipeworx`\nreaches all of them from either one.\n\n## Using with ask_pipeworx\n\nInstead of calling tools directly, you can ask questions in plain English —\nthis works on the pack endpoint above as well as on the full gateway:\n\n```\nask_pipeworx({ question: \"your question about Legislation Uk data\" })\n```\n\nThe gateway picks the right tool and fills the arguments automatically.\n\n## More\n\n- [Docs and guides](https://pipeworx.io/docs)\n- [pipeworx.io](https://pipeworx.io)\n\n## License\n\nMIT\n",
  "bytes": 4504,
  "sha": "34c099046edf87fbd5c6225b09f2f31e08a438c142d1503a21940a164b27e66e",
  "repo_slug": "pipeworx-io/mcp-legislation-uk",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_pipeworx_io_legislation_uk_c1a7a182/readme"
}