uk-legislation/uk-legislation

MCP Server

UK Legislation MCP Server - official legislation.gov.uk API

UK legislation MCP server over the official legislation.gov.uk API. Keyless; rate limit 3000 requests / 5 min / IP.

MCP Server

  • Package: legislation-gov-uk-mcp (community)
  • Transport: stdio
  • Command: npx -y legislation-gov-uk-mcp

Authentication

None — the legislation.gov.uk API is public.

Available Tools

ToolDescription
leg_search / leg_search_advanced / leg_search_newSearch legislation by title, text, type, year
leg_get / leg_get_section / leg_get_contentsFetch a document, section, or table of contents
leg_get_versionPoint-in-time version of a provision
leg_changes_affecting / leg_changes_byAmendment tracking in both directions
leg_status / leg_types / leg_updatesDocument status, legislation types, updates feed
leg_sparqlSPARQL endpoint queries

Configuration Example

toml
[[mcp.servers]]
name = "uk-law"
type = "stdio"
command = "npx"
args = ["-y", "[email protected]"]
timeout_seconds = 60
tools = []

Notes: Replaces the deprecated @ansvar/uk-law-mcp, which ships no database in any published version. Live API — needs network reach to legislation.gov.uk.