{
  "markdown": "# gb-eli-mcp\n\n<!-- mcp-name: io.github.matematicsolutions/gb-eli-mcp -->\n\nAn MCP server for **legislation.gov.uk**, The National Archives' official portal for\nUnited Kingdom legislation. It searches and retrieves Acts of Parliament, UK Statutory\nInstruments, and the equivalent instruments of the Scottish Parliament, Senedd\nCymru/Welsh Parliament and Northern Ireland Assembly, with persistent identifiers and\nverifiable citations.\n\nPart of the MateMatic `eu-legal-mcp` production line: the UK counterpart of the Polish\n`sejm-eli-mcp` and the German `de-eli-mcp`, built on the same architecture and citation\ncontract against the UK's own source.\n\n> **No native ELI.** legislation.gov.uk does not publish a native `/eli/` namespace\n> (confirmed live: `GET /eli/ukpga/2018/12` returns 404), even though its own\n> persistent-identifier scheme predates and is closely related to ELI - the UK is widely\n> credited with pioneering the URI-based legislation-identifier concept that ELI later\n> formalised EU-wide. `eli_uri` therefore carries the UK's own stable id URI\n> (`https://www.legislation.gov.uk/id/{type}/{year}/{number}`) instead of a fabricated\n> ELI path - the same disclosure pattern used by this factory's `nl-eli-mcp` and\n> `se-eli-mcp`. See `CONSTITUTION.md` Art. 4.\n>\n> **Licence.** Content is published under the **Open Government Licence v3.0**\n> (confirmed live from the site's own `/help` page), which permits copying, publishing\n> and adapting with attribution. This connector only relays that public content, with a\n> `source_url` on every response.\n\n## The eight tools\n\n| Tool | What it does |\n|---|---|\n| `gb_search` | Search legislation by text, doc type and year (`/all/data.feed` or `/{doc_type}/data.feed`). |\n| `gb_get_act` | Fetch act/instrument metadata by reference (e.g. `ukpga/2018/12`). |\n| `gb_get_text` | Fetch the full text (`xml`, `html`, `akn`/Akoma Ntoso, `rdf`, `pdf`, `csv`). |\n| `gb_recent_legislation` | Legislation published since a date, newest-first, optionally by doc type. |\n| `gb_search_case_law` | Search UK judgments via The National Archives' Find Case Law Atom feed, by text, court, and date range. |\n| `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. |\n| `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. |\n| `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. |\n| `gb_coverage` | Declare what this connector covers, when each family was captured, and - explicitly - what it does NOT cover. Every gap carries a fallback. |\n\n### GOV.UK coverage (added v0.3.0, feature-003)\n\nOne upstream, many institutions: `gb_search_govuk` filters by `document_type`.\nLive-verified totals (2026-07-07, from the Search API's own `total`/facet fields -\nprobe: `https://www.gov.uk/api/search.json?count=0&facet_content_store_document_type=1000`):\n\n| `document_type` | Documents |\n|---|---|\n| `employment_tribunal_decision` | 132,162 |\n| `hmrc_manual_section` | 85,315 |\n| `residential_property_tribunal_decision` | 17,088 |\n| `employment_appeal_tribunal_decision` | 2,571 |\n| `cma_case` | 2,565 |\n| `utaac_decision` (Upper Tribunal, AAC) | 2,031 |\n| `tax_tribunal_decision` | 1,414 |\n| `asylum_support_decision` | 101 |\n\nSee `SOURCES.md` for the full per-source ledger, including what was scouted and\ndeliberately rejected (ICO, FCA, IAC) and why.\n\nEvery response carries the contract: `eli_uri`\n(e.g. `https://www.legislation.gov.uk/id/ukpga/2018/12`), `human_readable_citation`\n(e.g. `Data Protection Act 2018 c. 12`), and `source_url`. Case-law responses carry the\nsame-spirit contract (`human_readable_citation`, `source_url`, `dataset_note`) - see\n`CONSTITUTION.md` Art. 5.\n\n## Install\n\n```bash\ncd gb-eli-mcp\npip install -e .\n```\n\n## Configure (Claude Code / any MCP client)\n\nCopy `.mcp.json.example` and adjust if needed:\n\n```json\n{\n  \"mcpServers\": {\n    \"gb-eli-mcp\": { \"command\": \"gb-eli-mcp\" }\n  }\n}\n```\n\n### Windows 11 with Smart App Control\n\nSmart App Control blocks unsigned executables, which covers `uvx.exe`, `pip.exe`\nand the `gb-eli-mcp.exe` launcher that pip writes at install time. The `python.exe` and\n`py.exe` from the python.org installer are signed by the Python Software\nFoundation, so running the module through the interpreter works:\n\n```bash\npython -m pip install gb-eli-mcp\npython -m gb_eli_mcp\n```\n\n`pip.exe` is blocked for the same reason, so install with `python -m pip`, not\n`pip install`. If `python` is not on PATH, use the Windows launcher: `py -3 -m gb_eli_mcp`.\n\n```json\n{ \"mcpServers\": { \"gb-eli-mcp\": { \"command\": \"python\", \"args\": [\"-m\", \"gb_eli_mcp\"] } } }\n```\n\nDo not turn Smart App Control off to work around this - it cannot be re-enabled\nwithout reinstalling Windows.\n\nEnvironment:\n\n- `GB_ELI_BASE_URL` - default `https://www.legislation.gov.uk`\n- `GB_ELI_CASELAW_BASE_URL` - default `https://caselaw.nationalarchives.gov.uk`\n- `GB_ELI_GOVUK_BASE_URL` - default `https://www.gov.uk`\n- `GB_ELI_CACHE_DIR` - default `~/.matematic/cache/gb-eli`\n- `GB_ELI_AUDIT_DIR` - default `~/.matematic/audit`\n\nNo API key. legislation.gov.uk is keyless.\n\n## Governance\n\n- **Public data only** - read-only against legislation.gov.uk; no client data leaves the\n  machine beyond search parameters.\n- **Audit log** - every tool call appends one JSON line to\n  `~/.matematic/audit/gb-eli-mcp.jsonl`.\n- **Vendor-neutral** - the server talks only to legislation.gov.uk and the local\n  filesystem; no LLM provider, no telemetry.\n- **Verifiable citations** - every response is independently checkable via `source_url`.\n\nSee `CONSTITUTION.md` (the binding rules) and `DISCOVERY.md` (the live API probe).\n\n## Tests\n\n```bash\npip install -e \".[dev]\"\npytest tests/test_instructions_drift.py -v   # offline\npytest tests/test_citations_case_law.py -v   # offline\npytest tests/test_citations_govuk.py -v      # offline\npytest tests/test_smoke.py -v                # hits live legislation.gov.uk\npytest tests/test_smoke_case_law.py -v       # hits live caselaw.nationalarchives.gov.uk\npytest tests/test_smoke_govuk.py -v          # hits live www.gov.uk\n```\n\n## Licence\n\nApache-2.0. (c) Matematic Solutions / Wieslaw Mazur.\n\nNote: the *code* in this repository is Apache-2.0. The *legislation content* fetched at\nruntime from legislation.gov.uk remains Crown copyright, published under the Open\nGovernment Licence v3.0 - not relicensed by this project.\n",
  "bytes": 6650,
  "sha": "fb6e894ff6504a19e88e85a32a815bade0ab80b4f5f7c33b1a7dbc938e7a3fa8",
  "repo_slug": "matematicsolutions/gb-eli-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_matematicsolutions_gb_eli_mcp_d99b759f/readme"
}