← Back to search

io.github.matematicsolutions/gb-eli-mcp

matematicsolutions Scanned 18d ago

MCP server for UK legislation (legislation.gov.uk): persistent identifiers and verifiable citations.

C
66.1 / 100

Versions

0.1.0latest
first seen Jul 8, 2026
PermissionsTool SafetyAuthAnnotationsCode QualityStabilitySpecVuln HistoryAuthorTransparencyCommunity

Tools 9

gb_search
annotations: none low

Search UK legislation on legislation.gov.uk. Maps to the official Atom search feed (``/all/data.feed`` or ``/{doc_type}/data.feed``, optionally with ``?text=...&year=...&page=...``). Each item gets ``eli_uri``, ``human_readable_citation``, ``source_url`` (per Art. 4 CONSTITUTION). Args: query: ``SearchQuery`` - text, doc_type (e.g. 'ukpga', 'uksi', 'asp'), year, page. Returns: ``SearchResult`` with ``total_estimate`` and ``items: list[LegislationInfo]``.

query SearchQuery
gb_get_act
annotations: none low

Fetch UK legislation metadata from legislation.gov.uk by reference. Args: reference: a reference like ``"ukpga/2018/12"`` (Data Protection Act 2018), ``"uksi/2019/419"``, ``"asp/2015/1"``, or a full legislation.gov.uk URL. An optional point-in-time date suffix (``/2026-06-19``) selects a specific revised version. Returns: ``Legislation`` with ``eli_uri``, ``human_readable_citation``, ``source_url``.

reference str
gb_get_text
annotations: none low

Fetch the full text of UK legislation. Uses legislation.gov.uk's content-negotiation path suffix (``/data.{format}``) - ``xml`` (the site's own ``legislation.xsd`` schema), ``html``, ``akn`` (Akoma Ntoso), ``rdf``, ``pdf``, or ``csv``. Args: reference: reference of the act/instrument (work or point-in-time expression). format: one of ``"xml"``, ``"html"``, ``"akn"``, ``"rdf"``, ``"pdf"``, ``"csv"``. Returns: ``LegislationText`` with ``eli_uri``, ``human_readable_citation``, ``source_url``, ``content``.

format TextFormat reference str
gb_recent_legislation
annotations: none low

UK legislation published since ``since_iso`` (ISO 8601 date), newest-first. Maps to the Atom search feed sorted/filtered by publication year, optionally scoped to one ``doc_type``. legislation.gov.uk's public search feed does not support a generic ``dateFrom`` filter across all types, so this tool filters the requested year's feed by the ``published`` date client-side. Args: since_iso: a date in ISO 8601 (e.g. ``"2026-01-01"``). Only the year is used to select the feed to scan; items are then filtered to on/after this date. doc_type: restrict to one UK document-type code (e.g. ``"ukpga"``, ``"uksi"``). limit: max items to return (1..100). Returns: List of ``RecentChangeInfo`` enriched with the citation contract, newest-first.

limit int doc_type string since_iso str
gb_search_case_law
annotations: none low

Search UK case law on The National Archives' Find Case Law service. Maps to the public Atom feed at ``caselaw.nationalarchives.gov.uk/atom.xml`` (confirmed live 2026-07-06 - keyless, Open Justice Licence). A separate service from legislation.gov.uk: different host, different Atom dialect (``tna:`` namespace). Args: query: full-text search (matches judgment text in order, per upstream docs). court: court/tribunal code, e.g. ``"ewhc/admin"``, ``"ewca/civ"``, ``"uksc"``. Passed through to Find Case Law's own ``court`` query param. from_date: ISO 8601 date (YYYY-MM-DD), inclusive. Find Case Law's public API has no documented server-side date-range filter, so this is applied client-side against each result's ``date`` field after fetching. to_date: ISO 8601 date (YYYY-MM-DD), inclusive. Same client-side caveat. limit: max items to return (1..100). Returns: ``CaseLawSearchResult`` with ``total_estimate`` and ``items: list[CaseLawInfo]``.

court string limit int query string to_date string from_date string
gb_get_case
annotations: none low

Fetch a UK judgment from The National Archives' Find Case Law service. Args: reference: a neutral citation (e.g. ``"[2026] EWHC 1698 (Admin)"``), a Find Case Law URI/path (e.g. ``"ewhc/admin/2026/1698"`` or a full ``caselaw.nationalarchives.gov.uk`` URL), or an opaque ``"d-{uuid}"`` id. Neutral citations resolve directly to a URI only for pre-April-2025 documents (``/{court}/{year}/{number}``); for later documents (opaque id), use `gb_search_case_law` first to find the ``uri``. Returns: ``CaseLawDocument`` with ``human_readable_citation``, ``source_url``, and the Akoma Ntoso XML ``content`` (or a ``pdf_url`` fallback if XML is unavailable).

reference str
gb_search_govuk
annotations: none low

Search GOV.UK documents - tribunal decisions, HMRC manuals, CMA cases and more. Maps to the GOV.UK Search API (``www.gov.uk/api/search.json`` - confirmed live 2026-07-07: keyless, Open Government Licence v3.0). One upstream aggregating many institutions; filter with ``document_type``. Legally weighty types with live-verified totals (2026-07-07): ``employment_tribunal_decision`` (132,162), ``hmrc_manual_section`` (85,315), ``residential_property_tribunal_decision`` (17,088), ``employment_appeal_tribunal_decision`` (2,571), ``cma_case`` (2,565), ``utaac_decision`` (2,031), ``tax_tribunal_decision`` (1,414), ``asylum_support_decision`` (101). Args: query: full-text search terms. document_type: GOV.UK ``content_store_document_type`` slug (see above). organisation: GOV.UK organisation slug, e.g. ``"competition-and-markets-authority"``. from_date: ISO 8601 date (YYYY-MM-DD), inclusive - passed server-side via ``filter_public_timestamp`` (unlike Find Case Law, GOV.UK supports this). to_date: ISO 8601 date (YYYY-MM-DD), inclusive. Same server-side filter. limit: max items to return (1..100). start: result offset for pagination (0-based). Returns: ``GovUkSearchResult`` with the API's own ``total`` and ``items: list[GovUkDocumentInfo]``.

limit int query string start int to_date string from_date string organisation string document_type string
gb_get_govuk_content
annotations: none low

Fetch one GOV.UK document (tribunal decision, HMRC manual section, CMA case). Maps to the GOV.UK Content API (``www.gov.uk/api/content/{path}`` - confirmed live 2026-07-07). Tribunal decisions carry the judgment as a PDF in ``attachments`` with only a short HTML body; HMRC manual sections carry the full text in ``body_html``. Args: path: the document's site path - take it from a ``gb_search_govuk`` result's ``link`` field, e.g. ``"/employment-tribunal-decisions/mr-b-king-v-thales-dis-uk-ltd-1403603-slash-2020"`` or ``"/hmrc-internal-manuals/vat-government-and-public-bodies/vatgpb9700"``. A full ``www.gov.uk`` URL is also accepted. Returns: ``GovUkContent`` with ``human_readable_citation``, ``source_url``, ``body_html`` and ``attachments``.

path str
gb_coverage
annotations: none low

Declare what this connector covers, how it is sourced, and what it does NOT cover. Call this before telling a user that the law "does not contain" something, and whenever a search comes back empty: the absence may be a gap in this connector rather than in the law. Every gap carries a fallback saying where to look instead. Returns: ``Coverage`` with families, an as-of note, and a non-empty list of known gaps.

Permissions 3

network medium
Server uses network capabilities via: httpx, urllib
filesystem low
Server uses filesystem capabilities via: open(), os, pathlib
env_vars low
Server uses env_vars capabilities via: os.environ

Scan Findings 48

low
Tool 'gb_search' has no annotations annotation_checker · 100%
low
Tool 'gb_get_act' has no annotations annotation_checker · 100%
low
Tool 'gb_get_text' has no annotations annotation_checker · 100%
low
Tool 'gb_recent_legislation' has no annotations annotation_checker · 100%
low
Tool 'gb_search_case_law' has no annotations annotation_checker · 100%
low
Tool 'gb_get_case' has no annotations annotation_checker · 100%
low
Tool 'gb_search_govuk' has no annotations annotation_checker · 100%
low
Tool 'gb_get_govuk_content' has no annotations annotation_checker · 100%
low
Tool 'gb_coverage' has no annotations annotation_checker · 100%
info
Sandbox failed to start for behavioral verification behavioral_verifier · 100%
medium
Vulnerable dependency: fastmcp@3.4,<4 (GHSA-5h2m-4q8j-pqpj) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.4,<4 (GHSA-c2jp-c369-7pvx) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.4,<4 (GHSA-m8x7-r2rg-vh5g) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.4,<4 (GHSA-mxxr-jv3v-6pgc) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.4,<4 (GHSA-rcfx-77hg-w2wv) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.4,<4 (GHSA-rj5c-58rq-j5g5) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.4,<4 (GHSA-rww4-4w9c-7733) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.4,<4 (GHSA-vv7q-7jx5-f767) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.4,<4 (PYSEC-2026-1364) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.4,<4 (PYSEC-2026-1365) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.4,<4 (PYSEC-2026-2474) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.4,<4 (PYSEC-2026-2475) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.4,<4 (PYSEC-2026-2476) dependency_analyzer · 95%
medium
Vulnerable dependency: fastmcp@3.4,<4 (PYSEC-2026-338) dependency_analyzer · 95%
medium
Vulnerable dependency: httpx@0.27,<1 (GHSA-h8pj-cxx2-jfg2) dependency_analyzer · 95%
medium
Vulnerable dependency: httpx@0.27,<1 (PYSEC-2022-183) dependency_analyzer · 95%
medium
Vulnerable dependency: diskcache@5.6 (GHSA-w8v5-vhqr-4h9v) dependency_analyzer · 95%
medium
Vulnerable dependency: diskcache@5.6 (PYSEC-2026-2447) dependency_analyzer · 95%
medium
Vulnerable dependency: anyio@4.3 (GHSA-5p39-cfhj-2xmp) dependency_analyzer · 95%
medium
Vulnerable dependency: anyio@4.3 (GHSA-82r6-8w77-94w6) dependency_analyzer · 95%
info
pyproject.toml metadata manifest_parser · 100%
info
Tool: gb_search manifest_parser · 90%
info
Tool: gb_get_act manifest_parser · 90%
info
Tool: gb_get_text manifest_parser · 90%
info
Tool: gb_recent_legislation manifest_parser · 90%
info
Tool: gb_search_case_law manifest_parser · 90%
info
Tool: gb_get_case manifest_parser · 90%
info
Tool: gb_search_govuk manifest_parser · 90%
info
Tool: gb_get_govuk_content manifest_parser · 90%
info
Tool: gb_coverage manifest_parser · 90%
info
Required env vars (6) manifest_parser · 80%
info
Sandbox failed to start for output poisoning scan output_poisoning · 100%
medium
Permission: network access detected permission_analyzer · 90%
low
Permission: filesystem access detected permission_analyzer · 80%
low
Permission: env_vars access detected permission_analyzer · 90%
critical
Tool poisoning in 'gb_coverage': Cross-tool sequencing directive poisoning · 85%
info
No dependency files found for SBOM generation sbom_generator · 100%
medium
No build provenance detected (SLSA L0) slsa_assessor · 90%