uk-legal

A Model Context Protocol server for UK legal research.

Community: Submitted by a user or imported; check the owner before granting accessOnlineNo sign-inGlobalFreeRead-only

What it can do

  • Judgment Get Header: Get metadata for a UK court judgment: parties, judges, neutral citation, court, dates. Use case_law_search to find the slug, then call this for orientation before reading specific
  • Judgment Get Index: Get the paragraph navigation index for a UK court judgment. Returns eId: first_line pairs for every paragraph. Use this to discover paragraph identifiers, then call judgment_get_pa
  • Judgment Get Paragraph: Get a single paragraph from a UK court judgment by its LegalDocML eId. Use judgment_get_index first to discover available eIds. Returns the paragraph XML content (400–1,700 tok

What data it sees

Do you need an account

No: the server works without sign-in

A Model Context Protocol server for UK legal research. Connects AI assistants to case law, legislation, parliamentary debates, bills, votes, committees, OSCOLA citation parsing, and HMRC tax data.

Server tool list (29)

Raw names from tools/list. Only developers need these.

judgment_get_headerGet metadata for a UK court judgment: parties, judges, neutral citation, court, dates. Use case_law_search to find the slug, then call this for orientation before reading specific paragraphs via judgment_get_paragraph.
judgment_get_indexGet the paragraph navigation index for a UK court judgment. Returns eId: first_line pairs for every paragraph. Use this to discover paragraph identifiers, then call judgment_get_paragraph to read specific ones.
judgment_get_paragraphGet a single paragraph from a UK court judgment by its LegalDocML eId. Use judgment_get_index first to discover available eIds. Returns the paragraph XML content (400–1,700 tokens typical).
case_law_searchSearch UK case law via the TNA Find Case Law API. Returns paginated judgment summaries: neutral citations, court, dates, stable URIs. Use the judgment://{slug}/header resource to inspect a result, then judgment://{slug}/index to discover paragraphs and judgment://{slug}/para/{eId} to read individual paragraphs. For content-based discovery within a judgment, use case_law_grep_judgment.
case_law_grep_judgmentFind paragraphs in a single judgment whose text matches a pattern. Returns a list of `{eId, snippet, match}` hits — small per-paragraph snippets centred on the match — so the LLM can decide which full paragraphs to read via judgment://{slug}/para/{eId}. Use this when answering content-based questions ("what did the judges say about negligence?", "find the test for foreseeability", "did this case cite Donoghue?") rather than navigating by paragraph number (which uses the index resource). Pattern is regex; if it doesn't compile, falls back to literal substring search.
legislation_searchSearch UK legislation on legislation.gov.uk. Returns ranked results: title, type, year, number, and legislation.gov.uk URL. Use legislation_get_toc to explore structure, then legislation_get_section for provisions.
legislation_get_sectionRetrieve a specific section of a UK Act or Statutory Instrument. Returns the full section text, territorial extent, in-force status, and prospective flag. Content is capped per max_chars (default 10,000, ~2,500 tokens) — raise max_chars for unusually long definition sections. Check content_truncated in the response to see if it was cut. IMPORTANT: Always check `extent` — a section may apply to England & Wales but not Scotland or Northern Ireland. Alternative: read the resource template `legislation://{type}/{year}/{number}/section/{section}` to get raw CLML XML directly. Use this tool when you want the parsed structured response (extent, in-force, version_date) instead of raw XML.
legislation_get_tocRetrieve the table of contents for a UK Act or SI. Returns structural elements (parts, chapters, sections, schedules) with XML id and title, e.g. 'section-47: Definitions'. When calling legislation_get_section, pass only the numeric part — use '47', not 'section-47'. Large statutes (Companies Act 2006 has 1300+ items) are paginated via offset/limit. Check has_more and total_items on the response. Alternative: read the resource template `legislation://{type}/{year}/{number}/toc` for the full TOC as a newline-separated `id: title` string (no pagination). Use this tool when you need the structured `LegislationTOC` response with offset/limit/has_more for stepping through Companies-Act-scale lists.
parliament_search_hansardSearch Hansard for parliamentary debates, questions, and speeches. Returns contributions from MPs and Lords including date, party, debate title, and text (capped at 3000 chars per contribution). Useful for understanding legislative intent or political context.
parliament_vibe_checkAssess the likely parliamentary reception of a policy proposal. Searches Hansard for relevant debate contributions, then uses LLM sampling to classify sentiment and extract supporters, opponents, and key concerns. Degrades gracefully if sampling is unavailable — returns contributions only.
parliament_find_memberSearch for a current or former MP or Lord by name. Returns all members matching the name query, each with the integer `id` required by parliament_member_debates and parliament_member_interests, plus party, constituency, house, and current-sitting status.
parliament_member_debatesRetrieve Hansard contributions by a specific member, optionally filtered by topic. Use parliament_find_member first to obtain the integer member ID. Each contribution's text field is capped at 3000 characters.
parliament_member_interestsLook up registered financial interests for a member of Parliament. Returns ONE PAGE of interests (default 20, caller controls via limit). For prolific members (big donors, many directorships, extensive land holdings), re-call with offset=offset+returned while has_more is true to paginate. Description text is capped per max_description_chars; raise it for forensic provenance work that needs the full narrative. Use parliament_find_member first to obtain the integer member_id.
parliament_search_petitionsSearch UK Parliament petitions by keyword. Returns petition title, state, signature count, and dates for government response or parliamentary debate if applicable.
bills_search_billsSearch UK parliamentary bills by keyword, session, house, or legislative stage. Returns a paginated page of bill summaries including title, current stage, and whether it has become an Act. Use bills_get_bill with the bill ID for full detail.
bills_get_billGet full detail for a specific parliamentary bill. Returns sponsors, current stage, long title, summary, and Royal Assent date if enacted. Summary text is capped per max_summary_chars — check summary_truncated in the response to see if it was cut.
votes_search_divisionsSearch parliamentary divisions (votes) in the Commons or Lords. Returns division summaries including title, date, vote counts, and whether the motion passed. Use votes_get_division with the division ID for full voter lists.
votes_get_divisionGet full detail for a parliamentary division including how each member voted. Voter lists are truncated to 100 per side to fit response limits. Total voter counts are always accurate regardless of truncation.
committees_search_committeesSearch or list UK parliamentary select committees. Returns committee names, house, and active status. Use committees_get_committee with the committee ID for membership detail.
committees_get_committeeGet detail for a parliamentary committee including current membership. Fetches committee metadata and member list in parallel.
committees_search_evidenceSearch oral and written evidence submitted to a parliamentary committee. Returns ONE PAGE of evidence (default 20). Free-text titles are capped per max_title_chars; witness lists are capped at 10 per item. For committees with many submissions, re-call with offset=offset+returned while has_more is true.
citations_parseExtract and classify all OSCOLA legal citations from free text. Identifies: neutral citations ([2024] UKSC 12), law reports ([2024] 1 WLR 100), legislation sections (s.47 Companies Act 2006), SIs (SI 2018/1234), and retained EU law (Regulation (EU) 2016/679). Ambiguous citations (e.g. bare [2024] EWHC without division) are optionally disambiguated via LLM sampling. Resolves citations to TNA / legislation.gov.uk URLs.
citations_resolveParse and resolve a single OSCOLA citation to its canonical URL. Supports: neutral citations, SIs, legislation sections, retained EU law. Returns parsed fields and resolved_url if resolvable. Raises ValueError if no recognised citation is found in the input.
citations_networkMap all citations within a judgment — cases cited, legislation referenced, SIs, EU law. Fetches the judgment XML from TNA and parses all OSCOLA citations within it. Returns citations grouped by type for easy analysis. Each bucket is de-duplicated and sorted.
hmrc_get_vat_rateLook up the UK VAT rate for a commodity or service type. Returns the rate category (standard 20%, reduced 5%, zero 0%, exempt), effective date, and any relevant conditions or exceptions. Uses a static lookup table current as of 22 Nov 2023 (Autumn Statement). Rates may have changed — always verify against GOV.UK for recent Budgets.
hmrc_check_mtd_statusCheck a business's Making Tax Digital VAT mandate status via the HMRC API. NOTE: Connects to the HMRC sandbox by default. Set HMRC_API_BASE env var to 'https://api.service.hmrc.gov.uk' for production. Requires HMRC_CLIENT_ID and HMRC_CLIENT_SECRET environment variables (OAuth 2.0). Returns whether the business is mandated for MTD, effective date, and trading name.
hmrc_search_guidanceSearch GOV.UK for HMRC tax guidance documents. Returns matching guidance titles, URLs, summaries, and last-updated dates. Searches the official GOV.UK content API filtered to HMRC publications.
list_promptsList all available prompts. Returns JSON with prompt metadata including name, description, and optional arguments.
get_promptGet a prompt by name with optional arguments. Returns the rendered prompt as JSON with a messages array. Arguments should be provided as a dict mapping argument names to values.