-
released this
2026-03-26 18:45:48 +00:00 | 0 commits to main since this releaseFixed
leg_get_sectionnow correctly extracts titles from API responses — Dublin Coredc:titleuses lowercase after namespace prefix removal, parser now checks both casesleg_get_sectionnow unwrapsPblockandP1group/P2group/P3groupcontainer elements that the real API uses to wrap section content inside<Body>DocumentMainTypelookup now navigates intoDocumentClassificationelement where the real API nests it, and extracts the short type code (e.g.ukpga) from the URI instead of relying on the long form value (e.g.UnitedKingdomPublicGeneralAct)extractStructuredText()now handlesUnorderedList,OrderedList,ListItem, andParaelements for legislation containing bullet-point lists (e.g. Equality Act 2010 s.4)parseContents()now handlesContentsPblockelements used in table of contents responses- Added
SecondaryMetadatafallback for parsing statutory instruments
Tests
- 176 tests passing (up from 162), 86.43% branch coverage
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
released this
2026-03-26 18:13:38 +00:00 | 2 commits to main since this releaseFixed
leg_get_sectionnow returns actual legislative prose text instead of just metadata and sourceUrl — the parser was not navigating the<Primary><Body>and<Secondary><Body>wrappers used by the real APIleg_get_sectionnow produces structured, readable text output preserving paragraph numbering and hierarchy (P1/P2/P3 nesting with indentation)leg_changes_affectingandleg_changes_bynow correctly parse effects from the real API, which wraps<Effect>elements inside a<content>element- Effects parser now handles the real API's attribute-based format (
AffectedURI,AffectingURI,AffectedTitle,AffectingTitleon the Effect element) - Inline markup content (
<Strong>,<Emphasis>, etc.) is no longer silently dropped during text extraction - Added P3 (sub-sub-paragraph) support to the XML parser array configuration
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
v1.0.0 - Initial Release Stable
released this
2026-03-26 17:46:36 +00:00 | 3 commits to main since this releaseInitial Release
13 MCP tools across 6 resource areas for searching, retrieving, and summarising UK legislation via the legislation.gov.uk API.
Tools
- Search:
leg_search,leg_search_advanced,leg_search_new - Legislation:
leg_get,leg_get_section,leg_get_version,leg_get_contents - Changes:
leg_changes_affecting,leg_changes_by - Metadata:
leg_status,leg_types - Publication Log:
leg_updates - SPARQL:
leg_sparql
Highlights
- Every response includes jurisdiction, enforcement status, and a source URL for verification
- Generates standard legal citations (e.g. "Equality Act 2010 (c.15)")
- Warns when there are unapplied amendments outstanding
- Point-in-time retrieval lets you see legislation as it stood on any date
- Server passes citation and referencing instructions to AI agents on connection
- 4 built-in workflow prompts for getting started, searching, checking status, and comparing versions
- No API key required
- 156 tests with 85%+ coverage
Install
npm install -g legislation-gov-uk-mcpDownloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- Search: