
Gb Eli Mcp
io.github.matematicsolutionsPublished by GitHub account matematicsolutionsv0.5.3Updated Oct 24, 2026
MCP server for UK legislation, case law (Find Case Law), GOV.UK tribunal decisions and HMRC manuals.
Overview
Lets an assistant search and retrieve UK legislation, case law, GOV.UK tribunal decisions and HMRC manuals with verifiable citations.
- What you can do
- Provides eight read-only tools over public UK legal sources. gb_search, gb_get_act, gb_get_text and gb_recent_legislation cover legislation.gov.uk (Acts, Statutory Instruments, and Scottish, Welsh and Northern Irish instruments). gb_search_case_law and gb_get_case query The National Archives' Find Case Law. gb_search_govuk and gb_get_govuk_content cover GOV.UK documents such as tribunal decisions and HMRC manual sections, and gb_coverage declares what is and is not covered. Responses carry a stable identifier URI, a human-readable citation and a source_url.
- When to use it
- Useful when an assistant needs to look up UK statutes or instruments, find or fetch judgments, or pull GOV.UK tribunal decisions and HMRC manual text, and when answers should cite checkable public sources. It is aimed at legal, compliance and research lookups rather than general web search.
- Requirements
- Runs locally as a Python package (PyPI gb-eli-mcp, typically via uvx, or installed with pip and run as a module). Needs Python and network access to legislation.gov.uk, caselaw.nationalarchives.gov.uk and www.gov.uk. No API key or account is required. Optional environment variables set base URLs, a cache directory and an audit directory.
Installation
In SourceWeft
- Open Gb Eli Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
gb-eli-mcp
An MCP server for legislation.gov.uk, The National Archives' official portal for United Kingdom legislation. It searches and retrieves Acts of Parliament, UK Statutory Instruments, and the equivalent instruments of the Scottish Parliament, Senedd Cymru/Welsh Parliament and Northern Ireland Assembly, with persistent identifiers and verifiable citations.
Part of the MateMatic eu-legal-mcp production line: the UK counterpart of the Polish
sejm-eli-mcp and the German de-eli-mcp, built on the same architecture and citation
contract against the UK's own source.
No native ELI. legislation.gov.uk does not publish a native
/eli/namespace (confirmed live:GET /eli/ukpga/2018/12returns 404), even though its own persistent-identifier scheme predates and is closely related to ELI - the UK is widely credited with pioneering the URI-based legislation-identifier concept that ELI later formalised EU-wide.eli_uritherefore carries the UK's own stable id URI (https://www.legislation.gov.uk/id/{type}/{year}/{number}) instead of a fabricated ELI path - the same disclosure pattern used by this factory'snl-eli-mcpandse-eli-mcp. SeeCONSTITUTION.mdArt. 4.Licence. Content is published under the Open Government Licence v3.0 (confirmed live from the site's own
/helppage), which permits copying, publishing and adapting with attribution. This connector only relays that public content, with asource_urlon every response.
The nine tools
GOV.UK coverage (added v0.3.0, feature-003)
One upstream, many institutions: gb_search_govuk filters by document_type.
Live-verified totals (2026-07-07, from the Search API's own total/facet fields -
probe: https://www.gov.uk/api/search.json?count=0&facet_content_store_document_type=1000):
See SOURCES.md for the full per-source ledger, including what was scouted and
deliberately rejected (ICO, FCA, IAC) and why.
Every response carries the contract: eli_uri
(e.g. https://www.legislation.gov.uk/id/ukpga/2018/12), human_readable_citation
(e.g. Data Protection Act 2018 c. 12), and source_url. Case-law responses carry the
same-spirit contract (human_readable_citation, source_url, dataset_note) - see
CONSTITUTION.md Art. 5.
Install
As a Claude plugin (Claude Code or the desktop app, needs uv); see plugin/README.md for what it sends and stores:
As a standalone server, from PyPI (uvx gb-eli-mcp), or from source:
Configure (Claude Code / any MCP client)
Copy .mcp.json.example and adjust if needed:
Windows 11 with Smart App Control
Smart App Control blocks unsigned executables, which covers uvx.exe, pip.exe
and the gb-eli-mcp.exe launcher that pip writes at install time. The python.exe and
py.exe from the python.org installer are signed by the Python Software
Foundation, so running the module through the interpreter works:
pip.exe is blocked for the same reason, so install with python -m pip, not
pip install. If python is not on PATH, use the Windows launcher: py -3 -m gb_eli_mcp.
Do not turn Smart App Control off to work around this - it cannot be re-enabled without reinstalling Windows.
Environment:
GB_ELI_BASE_URL- defaulthttps://www.legislation.gov.ukGB_ELI_CASELAW_BASE_URL- defaulthttps://caselaw.nationalarchives.gov.ukGB_ELI_GOVUK_BASE_URL- defaulthttps://www.gov.ukGB_ELI_CACHE_DIR- default~/.matematic/cache/gb-eliGB_ELI_AUDIT_DIR- default~/.matematic/audit
No API key. legislation.gov.uk is keyless.
Governance
- Public data only - read-only against legislation.gov.uk, Find Case Law and GOV.UK; no client data leaves the machine beyond search parameters.
- Audit log - every tool call appends one JSON line to
~/.matematic/audit/gb-eli-mcp.jsonl. - Network - the server talks to legislation.gov.uk, caselaw.nationalarchives.gov.uk,
www.gov.uk and the local filesystem. Once, on first use, it also fetches a small configuration
file (
gb-runtime.json.gz, updated source addresses) from this repository's GitHub Releases. That request carries no query content; GitHub's download counter for the file is the only usage signal we see.GB_ELI_RUNTIME_URL=""turns it off; the Claude plugin ships with it off. No LLM provider, no other telemetry. - Verifiable citations - every response is independently checkable via
source_url.
See CONSTITUTION.md (the binding rules) and DISCOVERY.md (the live API probe).
Tests
Licence
Apache-2.0. (c) Matematic Solutions / Wieslaw Mazur.
Note: the code in this repository is Apache-2.0. The legislation content fetched at runtime from legislation.gov.uk remains Crown copyright, published under the Open Government Licence v3.0 - not relicensed by this project.
Source: README.md at commit 6f77dc1
Tools
0Version history
1- v0.5.3LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts