Case law, legislation, Hansard, bills, votes, committees, and HMRC — one MCP server.
About
UK Legal Research gives AI agents structured access to UK legal and parliamentary sources. Search case law from TNA Find Case Law, look up Acts of Parliament and Statutory Instruments, search Hansard debates, track parliamentary bills and voting records, query select committee evidence, parse and resolve legal citations (OSCOLA), look up HMRC VAT rates and Making Tax Digital status, and search HMRC guidance.
At a glance
- Runs
- On a server the publisher hosts. You connect to its URL, nothing to install.
- Works with
- Claude Desktop, Claude Code, Grok Build (formerly Cursor), Windsurf, VS Code, Codex, Antigravity CLI, Gemini app, Gemini CLI, ChatGPT.
- Can access
- Reads files on the server that hosts it
Security report
How we scoreSerious: Uses an outdated component (lxml) with a known security hole
The uk-legal-mcp server is a well-architected legal research gateway with appropriate authentication patterns and reasonable permission scope for its business purpose. All 23 of 24 tools require no API keys; only HMRC MTD status checking requires optional credentials that default to sandbox mode. The codebase demonstrates good security practices: no hardcoded secrets, proper input validation via Pydantic, careful error handling, and read-only access to public UK legal data sources. Minor code quality observations (broad exception handling in citation parsing, HTML stripping regex) do not meaningfully impact security posture. Supply chain analysis found 1 known vulnerability in dependencies (0 critical, 1 high severity). Package verification found 1 issue.
4 files analyzed · 6 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Permissions Found in Source Code
Found by scanning the linked source code. This listing connects to a hosted endpoint, so none of this runs on your machine: it describes what the server software does where it is hosted.
How to Connect
Remote Plugin
No local installation needed. Your AI client connects to the remote endpoint directly.
Add this to your MCP configuration to connect:
{
"mcpServers": {
"uk-legal-research": {
"url": "https://uk-legal-mcp.fly.dev/mcp"
}
}
}Getting Started
Once installed, try these example prompts and explore these capabilities:
- 1"Find recent Supreme Court cases on landlord and tenant disputes"
- 2"What does Section 3 of the Housing Act 1988 say?"
- 3"Search Hansard for debates about AI regulation in 2024"
- 4"How did MPs vote on the Online Safety Act?"
- 5"Parse these citations and resolve them to legislation.gov.uk"
- 6"What is the VAT rate for energy-saving materials?"
- 7"Find evidence submitted to the Housing Select Committee on leasehold reform"
- 8Tool: case_law_search — Search UK court judgments
- 9Tool: legislation_search — Find Acts and Statutory Instruments
- 10Tool: parliament_search_hansard — Search Hansard debates
- 11Tool: bills_search_bills — Search parliamentary bills
- 12Tool: votes_search_divisions — Search Commons/Lords division records
- 13Tool: citations_parse — Parse OSCOLA legal citations from text
- 14Tool: hmrc_get_vat_rate — Look up UK VAT rates by category
Documentation
View on GitHubFrom the project's GitHub README.
uk-legal-mcp
Maintained by BOUCH — private hosting, custom tools and setup: paul@bouch.dev · bouch.dev/products/uk-legal-mcp
UK legal research sources for your AI assistant.
uk-legal-mcp connects ChatGPT, Claude, VS Code, Cursor, and other MCP-aware clients to UK case law, legislation, Hansard, bills, votes, committees, OSCOLA citation parsing, and HMRC guidance. It returns primary source text and citation metadata so your agent can build evidence packs you can check and footnote.
No API keys are required for the legal sources. HMRC's authenticated Making Tax Digital endpoint is optional.
For best results, tell your assistant to use the uk-legal-mcp server and not to answer from memory when a UK legal source can be checked.
Connect
Hosted endpoint — no install, no API key:
https://uk-legal-mcp.fly.dev/mcp
Claude (web, desktop and mobile)
- Open Customize → Connectors (claude.ai/customize/connectors).
- Click Add custom connector.
- Name it
uk-legal, paste the URL above and click Add. No sign-in is needed.
That's it — no config file to edit and no restart. Add the connector on web or desktop, and it's then available on your account, including the mobile apps. Turn it on or off per chat from the + menu → Connectors. On Team and Enterprise plans an Owner adds it once under Organization settings → Connectors; Free plans can add one custom connector.
Claude Code
If you've added the connector above, Claude Code lists it under /mcp — but only when Claude Code is signed in with your claude.ai subscription login, not an API key. Otherwise, add it directly:
claude mcp add --transport http --scope user uk-legal https://uk-legal-mcp.fly.dev/mcp
Other clients
VS Code and Cursor: use the install badges at the top of this page. For clients configured with mcpServers JSON:
{
"mcpServers": {
"uk-legal": {
"type": "http",
"url": "https://uk-legal-mcp.fly.dev/mcp"
}
}
}
Run it locally (stdio)
Local mode uses your own IP rather than a shared cloud IP, which can be more reliable for very large Acts.
Claude Code:
claude mcp add --scope user uk-legal -- uvx uk-legal-mcp
Claude Desktop runs local servers either as a packaged desktop extension (.mcpb, installed from Settings → Extensions) or from claude_desktop_config.json. There's no .mcpb for this server yet, so for local mode add this to the config file (Settings → Developer → Edit Config) and restart the app. For everyday use the hosted connector above is simpler.
{
"mcpServers": {
"uk-legal": {
"command": "uvx",
"args": ["uk-legal-mcp"]
}
}
}
If a hosted tool stops responding, refresh the server from your client's connector settings (in Claude, Customize → Connectors).
Try This First
After connecting the server, start a fresh chat and ask:
I am checking a UK legal source. Only use uk-legal-mcp. Find the source, give me the source URL, and tell me what metadata I should check before relying on it.
For legal work, ask for an evidence pack rather than a bare answer:
Only use uk-legal-mcp. Give me the source text or source summary, the source URL, citation metadata, and any caveats about jurisdiction, version, or uncertainty.
See the lawyer guide for ready-to-run prompts.
What It Covers
| Source area | What your assistant can check |
|---|---|
| Case law | UK judgments from TNA Find Case Law, including neutral citations, court, date, judgment metadata, paragraph reads, and in-judgment search. |
| Legislation | Acts and Statutory Instruments from legislation.gov.uk, including tables of contents, sections, territorial extent, in-force signals, and point-in-time reads. |
| Parliament | Hansard debates and contributions, debate-to-division chains, member biographies, column references, and petitions. |
| Bills | Parliamentary Bills, stages, sponsors, publications, and bill history. |
| Votes | Commons and Lords divisions, counts, results, and per-member voting records. |
| Committees | Select committees, memberships, oral evidence, and written evidence. |
| Citations | OSCOLA-style citation parsing and resolution to canonical sources. |
| HMRC | VAT rate lookups, GOV.UK HMRC guidance search, and MTD VAT status checks on self-hosted instances with production HMRC credentials (not offered on the hosted endpoint). |
The server also exposes judgment://, legislation://, and hansard:// resources for source text that is too large to return in a single search result.
Full details are in the tool reference and upstream API reference.
Examples
Legislation check: the assistant finds the Worker Protection Act duty, commencement position, territorial extent, and source links.

Parliamentary evidence: the assistant follows a House of Lords debate into a division result for an Automated Vehicles Bill amendment.

More examples are in the lawyer guide.
Using It Safely
uk-legal-mcp helps your AI assistant find and quote UK legal sources. It does not replace legal judgement.
- Check jurisdiction. Legislation can apply differently in England, Wales, Scotland, and Northern Ireland. When reading a section, check the
extentfield before relying on it. - Check whether a provision is current. Some sections may be repealed, amended, prospective, or not yet in force. The server returns in-force and version-date information where the source provides it.
- Verify citations before relying on them. Ask the agent to resolve case citations and Hansard volume/column references against the primary source.
- Separate exact matches from nearby candidates. Case names and party names can be similar. A good answer should say which source was verified and which candidates were merely related.
- Treat the result as an evidence pack. The server returns primary source text and citation metadata. Your agent can summarise it, but you decide how the law applies.
For Developers
Run the streamable HTTP server locally:
python -m src.gateway
Run the declarative FastMCP manifest for inspection/dev tooling:
fastmcp run
fastmcp inspect
fastmcp run is for inspection/dev only — it wraps the FastMCP runner directly and skips the production uvicorn shape (_AcceptNormalizer, proxy_headers) that python -m src.gateway wires for the Fly deployment. The server answers GET /mcp with a native 405 (stateless, POST-only), so use python -m src.gateway for anything prod-like.
Use a local checkout over stdio:
{
"mcpServers": {
"local-uk-legal": {
"command": "uv",
"args": ["run", "--project", "<abs-path>", "uk-legal-mcp"],
"env": { "VIRTUAL_ENV": "" }
}
}
}
Release notes live in CHANGELOG.md.
Reviews
No reviews yet
Be the first to review this server!
Related MCP Servers
Bailii
Freeby BOUCH · Business Tools
Search UK court judgments on BAILII — runs locally because BAILII blocks cloud IPs.
UK Due Diligence
Freeby BOUCH · Business Tools
Companies House, Charity Commission, Land Registry, Gazette, and HMRC VAT — one MCP server.
Eur Lex
Freeby Cyanheads · Developer Tools
Search EU legislation, CJEU case law, and treaties; traverse CELLAR graph; browse EuroVoc concepts.
Justicelibre
Freeby Dahliyaal · Education & Research
MCP juridique : jurisprudence et lois françaises, 3,9 M+ décisions, 19 outils, accès libre
Uk Parliament Interests
Freeby DarkhorseOne · Developer Tools
MCP server for UK Parliament Register of Interests API
Tw Legal Rag
Freeby Aa0101181514 · AI & ML
Taiwan law MCP server: 22M court judgments, statutes, agency rulings, with citation checks