Gb MCP Server

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

Local serverstdioPython

What is the Gb MCP Server?

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

The short version

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 tools it exposes

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 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
  • 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

Recorded tools

  • 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.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
gb_searchSearch legislation by text, doc type and year (/all/data.feed or /{doc_type}/data.feed).
gb_get_actFetch act/instrument metadata by reference (e.g. ukpga/2018/12).
gb_get_textFetch the full text (xml, html, akn/Akoma Ntoso, rdf, pdf, csv).
gb_recent_legislationLegislation published since a date, newest-first, optionally by doc type.
gb_search_case_lawSearch UK judgments via The National Archives' Find Case Law Atom feed, by text, court, and date range.
gb_get_caseFetch a judgment by neutral citation, Find Case Law URI/path, or opaque id - returns Akoma Ntoso XML, or a PDF link fallback.
gb_search_govukSearch 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_contentFetch one GOV.UK document via the Content API - tribunal decisions return the judgment PDF link, HMRC manual sections return the full text.

How to install the Gb MCP Server

{
  "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.

Configuration

VariableDescriptionRequired
GB_ELI_BASE_URLEndpoint or connection string the server talks to.Yes
GB_ELI_CASELAW_BASE_URLEndpoint or connection string the server talks to.Yes
GB_ELI_GOVUK_BASE_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • “Use Gb to gb search.”
  • “Use Gb to gb get act.”
  • “Use Gb to gb get text.”

Frequently asked questions

MCP server for UK legislation (legislation.gov.uk): persistent identifiers and verifiable citations. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.