MCP server for UK legislation (legislation.gov.uk): persistent identifiers and verifiable citations.
MCP server for UK legislation (legislation.gov.uk): persistent identifiers and verifiable citations. That is what the gb mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.
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.
The server publishes 8 tools. What each one is for:
gb_search — Search legislation by text, doc type and year (/all/data.feed or /{doc_type}/data.feed)gb_get_act — Fetch act/instrument metadata by reference (e.g. ukpga/2018/12)gb_get_text — Fetch the full text (xml, html, akn/Akoma Ntoso, rdf, pdf, csv)gb_recent_legislation — Legislation published since a date, newest-first, optionally by doc typegb_search_case_law — Search UK judgments via The National Archives' Find Case Law Atom feed, by text, court, and date rangegb_get_case — Fetch a judgment by neutral citation, Find Case Law URI/path, or opaque id - returns Akoma Ntoso XML, or a PDF link fallbackgb_search_govuk — Search GOV.UK documents via the keyless Search API - employment/tax/property tribunal decisions, HMRC internal manuals, CMA cases - with server-sidegb_get_govuk_content — Fetch one GOV.UK document via the Content API - tribunal decisions return the judgment PDF link, HMRC manual sections return the full textConfiguration is passed through the environment: GB_ELI_BASE_URL, GB_ELI_CASELAW_BASE_URL, GB_ELI_GOVUK_BASE_URL. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.
gb-eli-mcp on PyPI is all you need. Most clients run it directly, so configuration is a few lines and a restart.
This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Gb's toolset — gb_search, gb_get_act, gb_get_text and 5 more — is a fair guide to whether it matches your workflow. It is maintained by matematicsolutions; worth a glance at recent repository activity before you build anything load-bearing on it.
We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.
| Tool | What it does |
|---|---|
| gb_search | Search legislation by text, doc type and year (/all/data.feed or /{doc_type}/data.feed). |
| gb_get_act | Fetch act/instrument metadata by reference (e.g. ukpga/2018/12). |
| gb_get_text | Fetch the full text (xml, html, akn/Akoma Ntoso, rdf, pdf, csv). |
| gb_recent_legislation | Legislation published since a date, newest-first, optionally by doc type. |
| gb_search_case_law | Search UK judgments via The National Archives' Find Case Law Atom feed, by text, court, and date range. |
| gb_get_case | Fetch a judgment by neutral citation, Find Case Law URI/path, or opaque id - returns Akoma Ntoso XML, or a PDF link fallback. |
| gb_search_govuk | Search GOV.UK documents via the keyless Search API - employment/tax/property tribunal decisions, HMRC internal manuals, CMA cases - with server-side date filters and real totals. |
| gb_get_govuk_content | Fetch one GOV.UK document via the Content API - tribunal decisions return the judgment PDF link, HMRC manual sections return the full text. |
{
"mcpServers": {
"gb-eli": {
"command": "uvx",
"args": ["gb-eli-mcp"],
"env": {
"GB_ELI_BASE_URL": "your-value",
"GB_ELI_CASELAW_BASE_URL": "your-value",
"GB_ELI_GOVUK_BASE_URL": "your-value"
}
}
}
}Add to claude_desktop_config.json, then restart Claude Desktop.
| Variable | Description | Required |
|---|---|---|
| GB_ELI_BASE_URL | Endpoint or connection string the server talks to. | Yes |
| GB_ELI_CASELAW_BASE_URL | Endpoint or connection string the server talks to. | Yes |
| GB_ELI_GOVUK_BASE_URL | Endpoint or connection string the server talks to. | Yes |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.