Skip to main content
Glama
pipeworx-io

mcp-legislation-uk

by pipeworx-io

legislation-uk

UK legislation from 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).

Part of Pipeworx — an MCP gateway connecting AI agents to 1476+ live data sources.

Covers 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).

Tools

Tool

What it returns

search_legislation

Search by title words (and optional year) → matching Acts/instruments with full-text URLs

get_legislation

Metadata for one Act/instrument by type + year + number: title, status, extent, enactment date, full-text URL

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

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

Versions (the trap)

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

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

Related MCP server: lawyer-mcp

Auth

None. legislation.gov.uk is keyless and free.

Data sources

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

Quick Start

Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):

{
  "mcpServers": {
    "legislation-uk": {
      "url": "https://gateway.pipeworx.io/legislation-uk/mcp"
    }
  }
}

What this endpoint actually serves

tools/list at https://gateway.pipeworx.io/legislation-uk/mcp returns the tools in the table above plus the shared Pipeworx meta-toolsask_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:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://gateway.pipeworx.io/mcp"
    }
  }
}

Both URLs reach the same gateway and the same 1476+ data sources. The only difference is which pack's tools are listed directly; ask_pipeworx reaches all of them from either one.

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 Legislation Uk data" })

The gateway picks the right tool and fills the arguments automatically.

More

License

MIT

Tool Schema Changelog

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

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
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

  • A
    license
    Not graded
    quality
    B
    maintenance
    An MCP server that gives AI assistants access to UK Parliament data. Query MPs, Lords, bills, votes, committees, debates, and more through AI assistants like Claude Desktop and VS Code Copilot.
    4
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    MCP server for Legalize.dev, enabling AI to query and understand legal frameworks across countries via a structured legislation API.
    13
    1
    -
  • A
    license
    Not graded
    quality
    A
    maintenance
    A research MCP server for UK geospatial and statistical data, enabling AI assistants to query Ordnance Survey and ONS datasets.
    3
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for US workplace-safety standards (OSHA 29 CFR parts 1900–1990). Enables querying safety regulations via natural language through the Pipeworx gateway.
    13
    MIT

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/pipeworx-io/mcp-legislation-uk'

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