Skip to main content
Glama

uk-legislation-mcp-server

Server Details

Search and read UK legislation at any date, resolve citations, list amendments, track changes.

If you are the author of this connector, you can claim ownership by verifying the domain or GitHub account it belongs to. Claimed connector authors can inspect health checks, view analytics, and manage their listing.
Status
Healthy
Last Tested
Transport
Streamable HTTP · MCP 2025-11-25
URL
Repository
cyanheads/uk-legislation-mcp-server
GitHub Stars
1
Server Listing
uk-legislation-mcp-server

TDQS

Score is being calculated.

Available Tools

6 tools
uklaw_get_amendmentsList amendments to or by legislation
Read-onlyIdempotent
Inspect

List the effects — amendments, repeals, revocations, commencements, modifications — recorded against an item (direction affected) or made by an item (direction affecting), from legislation.gov.uk's changes feeds. Filter by the other item (counterpart), by applied status (unapplied = the outstanding work on the revised text), and by provision. item may be partial (ukpga/2018 = all effects on 2018 Acts). Each effect names both sides with provision links, in-force dates, and why it is not applied. For the applied history of one provision in prose, read its annotations with uklaw_get_document.

ParametersJSON Schema
NameRequiredDescriptionDefault
itemYesItem path or legislation.gov.uk URI (ukpga/2018/12), or a partial path: a type (uksi) or type and year (ukpga/2018). Get a full path from uklaw_lookup_citation or uklaw_search_legislation. A pre-1963 Act takes its calendar year (ukpga/1925/20, not ukpga/Geo5/15-16/20); its effects name the regnal path, and two sessions in one year can share a number. Drafts (ukdsi, sdsi, nidsr) are not in the changes feeds.
limitNoEffects per page, or with provision the most matches returned (1–100, default 20).
cursorNonext_cursor from the previous call, passed with the other inputs unchanged; omit for the first page.
statusNounapplied: effects not yet applied to the revised text; applied: already applied; all: both.all
directionNoaffected: changes made to item. affecting: changes item makes to other legislation.affected
provisionNoKeep only effects touching this provision of item (path or shorthand, e.g. section/45 or s. 45), including effects on the whole item. Needs a full item path. legislation.gov.uk cannot filter by provision, so each call scans up to 1,500 effects; continue with next_cursor.
counterpartNoRestrict to effects involving this other item (full or partial item path, without a provision, e.g. uksi/2019/419 or uksi/2026) — the amending item for direction affected, the amended item for affecting. A pre-1963 Act takes its calendar year, not its regnal path; drafts are not in the changes feeds.

Output Schema

ParametersJSON Schema
NameRequiredDescription
capNoThe limit applied.
scanNoCoverage of this call; present only when filtering by provision.
errorNoPresent when the call failed. Absent on success.
queryNoThe query as normalized.
shownNoEffects returned.
totalNoTotal effects legislation.gov.uk holds for this query (before any provision filter).
noticeNoGuidance when nothing matched or the list continues.
effectsNoEffects on this page, most recently modified first; empty when none matched.
has_moreNoTrue when more effects remain — call again with next_cursor.
truncatedNoTrue when the list was capped at limit.
attributionNoAttribution lines the returned content requires (OGL always; EU and Westlaw credits when applicable).
next_cursorNoPass as cursor to continue; present only when has_more is true.
uklaw_get_documentRead UK legislation text
Read-onlyIdempotent
Inspect

Read one item or one provision of UK legislation from legislation.gov.uk — as it stands now (revised), as enacted/made, or as it stood on a date — in Markdown, with its editorial status, annotations (the applied amendment history), the unapplied effects touching it, the versions available, and attribution. Provision-level reads are the main path; an item-level read returns the whole text only for small items and otherwise an outline of provision paths to read next. With match_text (item level), returns the provisions whose text matches. Revised text is an editorial consolidation that can lag: read editorial.caveat and unapplied_effects before relying on it, and use uklaw_get_amendments for every recorded effect on an item, applied or not.

ParametersJSON Schema
NameRequiredDescriptionDefault
itemYesItem path {type}/{year}/{number} — ukpga/2018/12, uksi/2019/419, eur/2016/679, ukpga/Eliz2/3-4/19 — or any legislation.gov.uk URI (a URI carrying a provision, version, or /welsh is split into those parts; a version or /welsh in the URI applies unless the version or language input is set). Get it from uklaw_lookup_citation or uklaw_search_legislation.
versionNocurrent (the latest revised text, or the original text for an item never revised), enacted (made, adopted and created are synonyms — the original text), or a date YYYY-MM-DD for the text as it stood then. Omitted: the version in an item URI, else current. A future date returns the latest version, and a date on or after the made or enactment date of an item never revised returns its original text, with a notice; version.applied reports the version served.
languageNoen, or cy for the Welsh text of Welsh legislation (asc, anaw, mwa, wsi). Omitted: cy when an item URI ends in /welsh, else en. English is returned, with a notice, when no Welsh text exists.
provisionNoProvision path — section/45/2/f, regulation/5, article/28/3, schedule/2/paragraph/3, part/3/chapter/2, introduction — or citation shorthand (s. 45(2)(f), reg. 5, art. 28(3), Sch. 2 para. 3), normalized before the request. Omit to read the item; an item-level outline lists the paths.
match_textNoItem level only (omit provision): return the outline of provisions whose text contains this term, e.g. "processor" — 100 entries per call; outline_offset reaches the rest.
outline_offsetNoWhere a returned outline starts: 0 lists entries 1–100, 100 the next 100. Applies only when kind is outline (ignored when text is returned); a notice names the next offset while entries remain.

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemNoThe item read.
kindNofull: text returned; outline: a list of provisions to read instead; pdf_only: the item is held as PDF only (see links.pdf).
textNoThe text as Markdown, present when kind is full; amendments are wrapped as [F1 …] keyed to annotations. A provision with no smaller child provisions that renders over 40,000 characters, counting its annotations, is cut to 40,000, and a notice gives its full size and the links to the full text.
errorNoPresent when the call failed. Absent on success.
linksNoLinks to the document.
noticeNoNotices: Welsh fallback, original text served for a dated read, an omitted provision window, the unapplied effects an item outline leaves out, truncated lists, an outline window with the outline_offset that continues it, an oversized provision with no smaller child provisions returned whole or cut (its full size, and the links to the full text), and how to continue.
outlineNoProvisions to read next, present when kind is outline: up to 100 entries from outline_offset; empty when outline_offset is past the end.
versionNoVersion requested and served.
languageNoLanguage actually served (en or cy).
editorialNoEditorial status — read before relying on revised text.
provisionNoThe provision read — present for provision-level reads.
annotationsNoAnnotations referenced by the text, present when kind is full — the applied amendment history of the version served. When the text is cut, only those the kept text references.
attributionNoAttribution lines the returned content requires (OGL always; EU and Westlaw credits when applicable).
outline_noticeNoHow to read a provision from the outline, naming one to start with; past the outline’s end, its entry count.
unapplied_effectsNoRecorded effects not yet applied to the revised text that touch this provision (at item level, the item’s): the first 20, outstanding first, with a notice when more exist; empty when none. Absent on an item-level outline, where a notice gives the item’s count and uklaw_get_amendments lists them.
uklaw_list_referenceList legislation reference vocabulary
Read-onlyIdempotent
Inspect

Decode the vocabulary the other uklaw_* tools take and return: legislation type codes (ukpga, uksi, eur, …) with their labels, categories and enacted keywords; type groups; extents; version keywords; document status; annotation letters (F, C, I, M, E, P, X); effect record fields; provision path forms and shorthand; accepted citation formats; Publication Log vocabulary and read modes; data coverage; and the attribution lines. Offline — no request to legislation.gov.uk.

ParametersJSON Schema
NameRequiredDescriptionDefault
topicYesWhich table to return: types, type_groups, extents, versions, document_status, annotation_types, effects, provision_paths, citation_formats, publication_log, coverage, or attribution.

Output Schema

ParametersJSON Schema
NameRequiredDescription
errorNoPresent when the call failed. Absent on success.
topicNoThe topic returned.
entriesNoReference entries for the topic.
uklaw_lookup_citationResolve a legislation citation
Read-onlyIdempotent
Inspect

Resolve a citation or short title to the canonical legislation.gov.uk item and provision: "Data Protection Act 2018 s. 45", "2018 c. 12", "S.I. 2019/419", "S.S.I. 2020/123", "S.R. 2020/12", "2020 asp 13", "Regulation (EU) 2016/679 art. 28", a legislation.gov.uk URI, or a short title. Returns the item path to pass to uklaw_get_document, and when a provision is given, whether it exists in the current version. A miss or an ambiguous title is a result with found false plus guidance or candidates, not an error. To find legislation by topic or by partial title words rather than a known citation, use uklaw_search_legislation.

ParametersJSON Schema
NameRequiredDescriptionDefault
citationYesA citation ("2018 c. 12", "S.I. 2019/419 reg. 5", "Regulation (EU) 2016/679 art. 28"), a short title ("Data Protection Act 2018 s. 45(2)(f)"), or a legislation.gov.uk URI. uklaw_list_reference topic citation_formats lists the accepted forms.

Output Schema

ParametersJSON Schema
NameRequiredDescription
itemNoCanonical item path, e.g. ukpga/2018/12 — pass to uklaw_get_document; present when found.
typeNoCanonical type code (a Welsh SI cited as uksi comes back as wsi); present when found.
yearNoCalendar year of the item; absent when not known, e.g. a regnal-year item resolved from its path.
errorNoPresent when the call failed. Absent on success.
foundNoTrue when the citation resolved to exactly one item.
titleNoItem title; absent when it could not be fetched within the call.
id_uriNoCanonical identifier URI of the item; present when found.
numberNoItem number within the year; present when found.
parsedNoThe citation as the parser read it.
guidanceNoWhat to do next after a miss, ambiguity, or a check that could not run.
title_cyNoWelsh title, for bilingual items.
made_dateNoDate enacted or made (YYYY-MM-DD); absent when not fetched or not reported.
candidatesNoCandidate items (at most 20) when the citation is ambiguous.
type_labelNoHuman label of the type; present when found.
attributionNoAttribution lines the returned content requires (OGL always; EU and Westlaw credits when applicable).
document_uriNolegislation.gov.uk page for the item; present when found.
provision_uriNoIdentifier URI of that provision, alongside provision_path.
provision_pathNoProvision path the citation named, when it named one and the item was found.
provision_foundNoWhether the provision exists in the current version; absent when the check could not run.
uklaw_search_legislationSearch UK legislation
Read-onlyIdempotent
Inspect

Search the UK statute book on legislation.gov.uk by full text or title, or list legislation by type and year, filtered by geographical extent and point in time. Full-text search ranks by relevance; title searches and type/year listings run newest year first and carry type and year counts (facets) to narrow with. Each result gives the item path to pass to uklaw_get_document. For a known citation or short title, uklaw_lookup_citation is cheaper and exact.

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (1–10,000).
textNoFull-text query. Supports AND/OR, "quoted phrases", and stemming. Omit for a title search or a listing.
yearNoCalendar year (also for pre-1963 Acts numbered by regnal year). Not combinable with year_from/year_to.
as_ofNoPoint in time YYYY-MM-DD: only legislation as it stood on that date (items not yet enacted or made are excluded). Omit for current law. Cannot combine with extent.
limitNoResults per page (1–50).
titleNoWords that must all occur in the title. For a known short title or citation, uklaw_lookup_citation is exact.
typesNoType codes (ukpga, uksi, asp, eur, …) and/or groups (all, primary, secondary, eu-origin, draft). "all" covers UK and EU-origin legislation, excluding drafts, and absorbs any other value. uklaw_list_reference topic types lists the codes.
extentNoGeographical extent: england, wales, scotland, ni. An item matches when one of its provisions extends there. Cannot combine with as_of. legislation.gov.uk has not recorded provision-level extent for many recent items, so an empty result does not prove nothing extends there.
year_toNoLatest calendar year of a range; the other bound may be omitted.
year_fromNoEarliest calendar year of a range; the other bound may be omitted.
extent_matchNoUsed only with extent. applicable: a provision extends to any given extent; exact: a provision extends to exactly that set.applicable

Output Schema

ParametersJSON Schema
NameRequiredDescription
capNoPage size that capped the list.
pageNoPage returned.
errorNoPresent when the call failed. Absent on success.
limitNoPage size applied.
scopeNoThe scope applied, defaults included.
shownNoResults on this page.
totalNoTotal matches; present only when legislation.gov.uk reports it (often absent on large result sets).
facetsNoType and year counts — title searches and listings only; absent on full-text searches and on a page past the last page.
noticeNoGuidance when nothing matched, or how to fetch the next page.
resultsNoMatching items on this page.
has_moreNoTrue when a further page exists (call again with page + 1).
truncatedNoTrue when more results exist beyond this page.
attributionNoAttribution lines the returned content requires (OGL always; EU and Westlaw credits when applicable).
uklaw_track_changesTrack legislation.gov.uk publications
Read-onlyIdempotent
Inspect

Read the legislation.gov.uk Publication Log for a date window of up to 31 days: new items, new revised versions, newly recorded effects, and withdrawals, newest first — the compliance-monitoring view of "what changed". Filter by content type, effect direction, category, an item or type/year, first-time items only, or event. With a full item path it reads that item's own log, usually in one call; otherwise it walks the window day by day, newest first, so a broad window may need several calls. A changes event carries no effect detail — uklaw_get_amendments with that item has it. Continue with next_cursor.

ParametersJSON Schema
NameRequiredDescriptionDefault
itemNoA full item path (ukpga/2018/12) or legislation.gov.uk URI reads that item's own log; a type (uksi) or type and year (uksi/2026) narrows the day walk. Get a full path from uklaw_lookup_citation or uklaw_search_legislation.
eventNoOnly published or only withdrawn events. Omit for both.
limitNoMost events returned by this call (1–80).
cursorNonext_cursor from the previous call, passed with the other inputs unchanged; omit to start from end_date.
categoryNoItem category: primary, secondary, or eu-origin. With content_type legislation or associated-documents only.
end_dateNoLast event date, YYYY-MM-DD; defaults to start_date. The window is at most 31 days.
new_onlyNotrue: only events for items appearing on legislation.gov.uk for the first time.
directionNoWith content_type changes only: effects recorded against (affected) or made by (affecting) the item.
start_dateYesFirst event date of the window, YYYY-MM-DD (UK local time).
content_typeNolegislation (documents published), changes (effects recorded), draft, or associated-documents. Omit for all.

Output Schema

ParametersJSON Schema
NameRequiredDescription
capNoThe limit applied.
daysNoDays touched by a day walk (empty in item-log mode).
modeNoday_walk: per-day pages; item_log: one item's undated log.
errorNoPresent when the call failed. Absent on success.
shownNoEvents returned.
eventsNoEvents, newest first.
noticeNoGuidance when the window is quiet or the list continues.
windowNoThe window read.
filtersNoFilters applied.
has_moreNoTrue when more events remain in the window — call again with next_cursor.
truncatedNoTrue when the list was capped at limit.
attributionNoAttribution lines the returned content requires (OGL always; EU and Westlaw credits when applicable).
next_cursorNoPass as cursor to continue; present only when has_more is true.
read_back_toNoItem-log mode: date (YYYY-MM-DD) of the oldest event this call read from the item's log, which is read newest first. While it is after end_date, the read has not reached the window yet. Absent in a day walk and when no event read carries a calendar date.
item_log_totalNoEvents in the item's whole log, all dates; present in item-log mode when reported.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updates
    • First observeduklaw_get_amendments
    • First observeduklaw_get_document
    • First observeduklaw_list_reference
    • First observeduklaw_lookup_citation
    • First observeduklaw_search_legislation
    • First observeduklaw_track_changes

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Enables searching and retrieval of UK legislation (Acts, Statutory Instruments) from legislation.gov.uk with persistent identifiers and verifiable citations.
    9
    65 PyPI
    Apache 2.0
  • A
    license
    A
    quality
    B
    maintenance
    Provides comprehensive tools for searching UK case law, legislation, parliamentary Hansard debates, and HMRC tax guidance. It features a specialized OSCOLA citation parser to extract and resolve legal references directly from text.
    35
    48 PyPI
    18
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to search and read consolidated legislation from multiple countries, retrieve exact law texts as of any historical date with citations and git commit SHAs, and create webhook or email subscriptions to track legal changes.
    2
    MIT
Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.