UK Legal Research MCP Server
This MCP server connects AI assistants to UK legal and parliamentary data through 24 read-only tools (23 require no API keys) across 8 modules:
Case Law
Search UK judgments by full text, court, judge, party, or date range
Search within a specific judgment using text/regex patterns
Access judgment headers, paragraph indexes, and individual paragraphs via URI templates
Legislation
Search Acts of Parliament and Statutory Instruments by title or full text
Retrieve tables of contents, specific sections (with territorial extent and in-force status), and point-in-time historical versions
Parliament
Search Hansard debates by keyword, member, or date
Run a "vibe check" on a policy topic — uses LLM sentiment analysis to identify supporters, opponents, and concerns
Look up MPs/Lords by name; retrieve their debate contributions and registered financial interests (donations, shareholdings, directorships)
Search Parliament petitions by keyword and state
Bills
Search parliamentary bills by keyword, session, house, or stage
Get full bill details: sponsors, legislative stages, long title, and Royal Assent date
Votes
Search Commons and Lords division records by keyword or date
Get full division details including how each member voted
Committees
Search select committees by name and house; get membership and contact details
Search oral and written evidence submitted to committees
Citations (OSCOLA)
Parse and classify all OSCOLA citations from free text (neutral citations, law reports, legislation, SIs, retained EU law)
Resolve a single citation to its canonical TNA or legislation.gov.uk URL
Map the full citation network of a judgment
HMRC Tax
Look up UK VAT rates for any commodity or service
Check a business's Making Tax Digital (MTD) VAT mandate status (requires HMRC OAuth credentials)
Search GOV.UK for HMRC guidance documents
Workflow Prompts — four built-in multi-step research workflows: summarise_act, compare_legislation, policy_vibe_check, and member_position_analysis.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@UK Legal Research MCP Serversearch for recent Supreme Court judgments regarding duty of care"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
uk-legal-mcp
A Model Context Protocol server for UK legal research. One MCP connection wires your AI assistant into UK case law, legislation, parliamentary debates, bills, votes, committees, OSCOLA citation parsing, and HMRC guidance — every response carrying the metadata you'd need to footnote it.
Read-only. No API keys required for the legal sources (HMRC's authenticated endpoint is optional).
Connect
Hosted
Use this URL in any MCP-aware client (Claude, Claude Desktop, VS Code, Cursor, etc.):
https://uk-legal-mcp.fly.dev/mcpFor clients that use mcpServers JSON:
{
"mcpServers": {
"uk-legal": {
"type": "http",
"url": "https://uk-legal-mcp.fly.dev/mcp"
}
}
}Local install (stdio)
Useful from Claude Desktop on a residential IP — bypasses the legislation.gov.uk WAF that intermittently blocks the hosted server's cloud IP range:
uvx uk-legal-mcpClaude Desktop config:
{
"mcpServers": {
"uk-legal": {
"command": "uvx",
"args": ["uk-legal-mcp"]
}
}
}Local development
stdio against your local checkout — spawns a fresh process per MCP connection from the project's [project.scripts] entry, so the source is always read as edited. Replace <abs-path> with the absolute path to your clone:
{
"mcpServers": {
"local-uk-legal": {
"command": "uv",
"args": ["run", "--project", "<abs-path>", "uk-legal-mcp"],
"env": { "VIRTUAL_ENV": "" }
}
}
}What's here
Eight namespaced modules covering the UK's primary legal sources:
Module | What it covers |
case_law | UK court judgments from TNA Find Case Law — search, paragraph-level reads, in-document grep |
legislation | Acts and Statutory Instruments from legislation.gov.uk — search, section retrieval with territorial extent and in-force signals, point-in-time historical reads |
parliament | Hansard debates and contributions, deterministic facet aggregates, debate→divisions chain, OSCOLA column-citation lookup, member biographies, petitions |
bills | Parliamentary Bills — stages, sponsors, publications |
votes | Commons and Lords division records with per-member voting |
committees | Select committees, membership, oral and written evidence |
citations | Pure OSCOLA citation parser — no network, self-contained |
hmrc | UK VAT rate lookups, Making Tax Digital status, GOV.UK guidance search |
Plus a small set of judgment://, legislation://, and hansard:// URI-addressed resources for content the LLM can read on demand without bloating tool responses, and four orchestration prompts for common research workflows.
A lawyer's workflow
This server is a data pipe. It returns what the sources say, with citations. It does not interpret the law, classify members' positions, or recommend a research strategy — your agent does that work on your behalf.
A realistic end-to-end run: advising a Manchester landlord on their eviction-notice exposure under the new Renters' Rights regime, including verifying a column citation an opponent quoted at you.
The lawyer's prompt to their agent:
"My client is a landlord with a private assured shorthold tenancy started in 2020, dwelling in Manchester. Can he still serve a Section 21 notice? I also need to check what was said about no-fault evictions in the Lords debate around 14 October 2025, and the divisions held. Opposing counsel cites HL Deb 14 Oct 2025, vol 849, col 200 — verify what's actually at that column."
A reasonable path the agent walks — and what the server returns at each step:
The statute —
legislation_get_section(type="ukpga", year=1988, number=50, section="21"). The response carriesextent(England + Wales — confirms the Manchester tenancy is in scope, Scotland is not),in_force(False — the section is marked repealed in CLML via<Repeal RetainText="true">from Renters' Rights Act 2025), andversion_date(the date the repeal commenced, not 1988's original enactment).The new Act —
legislation_search(query="Renters' Rights")thenlegislation_get_tocto locate commencement / transitional provisions, thenlegislation_get_sectionfor the substantive sections.The parliamentary debate —
parliament_search_hansard(query="Renters' Rights Bill"). One call returns the corpus envelope: how many contributions, debates, divisions, written answers across the whole record, plus previews of the top debates and divisions touching the topic. Pick the relevant Lords debate fromtop_debates.The full debate — read
hansard://debate/{ext_id}/headerfor the ordered contribution index (every contribution carrying its citable column number via carry-forward), thenhansard://debate/{ext_id}/contribution/{ext_id}for the full text of any specific intervention.The divisions held —
parliament_get_debate_divisions(debate_ext_id=...). Returns each formal vote with motion text, result, ayes/noes counts, and division IDs that chain intovotes_get_divisionfor the per-member voting record.Verifying opposing counsel's citation —
parliament_lookup_by_column(column_number="200", volume_number=849, house="Lords"). Resolves the OSCOLA footnote directly to its debate, returning thedebate_ext_idthat chains intohansard://debate/{ext}/headerso you read the exact contribution opposing counsel quoted.The case law —
case_law_search(query="Renters' Rights Act 2025")for judgments already citing the Act,case_law_grep_judgment(slug=..., pattern=...)for the paragraphs that actually treat each section.Citations for the brief — pass your draft into
citations_parsefor a clean OSCOLA-formatted list with canonical URLs.
Every response carries the metadata needed for an OSCOLA footnote: attributed_to, column_ref, citable column numbers, debate title, sitting date, public Hansard URL. The server returns the primary source verbatim — your agent and your judgement do the legal work.
Example output
Live output from the workflow above will be inserted here once the smoke test is run.
<!-- PASTE LIVE SMOKE OUTPUT FROM A REAL AGENT SESSION HERE -->Tools reference
Case Law
Tool | What it does |
| Full-text search of UK judgments. Filter by court, judge, party, date range. |
| Pattern-match within a judgment; returns |
Resource | Returns |
| Metadata: parties, judges, neutral citation. |
| Paragraph eId + first-line per row. Walk to discover. |
| A single paragraph with its sub-paragraphs. |
Legislation
Tool | What it does |
| Find Acts and SIs by keyword. |
| Table of contents for an Act — parts, chapters, sections, schedules. |
| A specific section with |
Resource | Returns |
| CLML XML for a section; optional point-in-time date. |
| Flat |
Parliament
Tool | What it does |
| Search Hansard contributions; returns citation-grade metadata per contribution PLUS a corpus envelope (totals + top_debates/top_divisions previews). |
| Deterministic facet counts on a topic — by house, section, year, top debates. No LLM, no editorial labels. |
| Divisions held within a debate. Chain via |
| Resolve an OSCOLA Hansard citation (column + volume) to its debate. Bound-volume citations only. |
| Name → integer member ID. |
| One member's Hansard contributions, optionally filtered by topic. |
| A member's registered financial interests. |
| UK Parliament petitions by keyword. |
Resource | Returns |
| Debate overview + ordered contribution index with citable column numbers via carry-forward. |
| A single contribution's full text + metadata. |
| Government / opposition / committee posts with start/end dates so you can resolve a member's role at the time of any contribution. |
Bills
Tool | What it does |
| Search current and historical Bills by keyword, session, or type. |
| Full bill detail — stages, sponsors, publications. |
Votes
Tool | What it does |
| Search Commons and Lords divisions by keyword or date. |
| Full division detail — vote counts, per-member voting record. |
Committees
Tool | What it does |
| Select committees by keyword. |
| Committee detail — membership, sub-committees. |
| Oral and written evidence submissions. |
Citations
Tool | What it does |
| Extract OSCOLA citations from free text. Resolves to canonical URLs. |
| Parse and resolve a single citation string. |
| Fetch a judgment and map every citation within — cases, legislation, SIs, EU law. |
Supported citation formats:
Format | Example |
Neutral citation |
|
Law report (with or without volume) |
|
Legislation section |
|
Statutory Instrument |
|
Retained EU law |
|
HMRC
Tool | What it does |
| VAT rate lookup for any commodity or service. |
| Check Making Tax Digital VAT mandate status for a VRN. Requires HMRC OAuth. |
| Search GOV.UK for HMRC guidance documents. |
hmrc_check_mtd_status requires HMRC_CLIENT_ID and HMRC_CLIENT_SECRET — register at developer.service.hmrc.gov.uk. Defaults to sandbox; set HMRC_API_BASE=https://api.service.hmrc.gov.uk for production.
Prompts
Workflow templates exposed as tools via PromptsAsTools (for ChatGPT) and natively on protocol-aware clients (Claude, Inspector). All produce citable evidence packs; none classify positions or recommend an argumentative line.
Prompt | Module | What it produces |
| legislation | Structured summary of a UK Act or SI. |
| legislation | Comparative analysis of two pieces of legislation on a topic. |
| parliament | Citation-grade review of how a policy topic is being received in Parliament. |
| parliament | Citable evidence pack of a named member's contributions on a topic — their own words, footnoted. |
Important constraints
Territorial extent always matters.
legislation_get_sectionexposes theextentfield. Acts that apply in England and Wales do not automatically apply in Scotland or Northern Ireland. Read this before citing a section as binding in a jurisdiction.Verifying opposing counsel's citations — when a brief cites HL Deb [date], vol N, col M, run
parliament_lookup_by_column(column_number="M", volume_number=N, house="Lords")to resolve the citation to its debate, then read the header resource to find the contribution at the cited column. The endpoint only resolves Bound Volume citations; Daily Part columns shift on consolidation and aren't searchable this way.What this server does not do. It does not classify a member as supporting or opposing a policy, summarise a judgment's outcome in your client's favour, or recommend an argumentative line. Those are interpretive acts. The server returns the primary source verbatim with citation metadata; your agent and your judgement do the legal work.
Legislation.gov.uk WAF. Some heavy Acts (notably the Companies Act 2006) intermittently fail on the hosted server due to upstream WAF rules that block our cloud IP range. The local install (
uvx uk-legal-mcp) runs on your own IP and bypasses this.
Maintenance
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/paulieb89/uk-legal-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server