UK legal research — case law, legislation, Hansard, bills, votes, committees, HMRC, citations
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"uk-legal": {
"url": "https://uk-legal-mcp.fly.dev/mcp",
"type": "streamable-http"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
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 through a single endpoint.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
uvx 'pytest' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
pytest has vulnerable tmpdir handling
pytest through 9.0.2 on UNIX relies on directories with the `/tmp/pytest-of-{user}` name pattern, which allows local users to cause a denial of service or possibly gain privileges.
Click any tool to inspect its schema.
judgment_headerMetadata header (parties, judges, citation). ~1k tokens.
judgment://{slug}/header
judgment_indexParagraph eId + first-line per row. ~4k tokens. Walk this to discover paragraphs.
judgment://{slug}/index
judgment_paragraphA single paragraph including its sub-paragraphs. 400–1700 tokens.
judgment://{slug}/para/{eId}
legislation_fullFull Act/SI as CLML XML.
legislation://{type}/{year}/{number}
legislation_sectionA specific section as CLML XML.
legislation://{type}/{year}/{number}/section/{section}
legislation_tocFlat id: title lines for the table of contents.
legislation://{type}/{year}/{number}/toc
legislation_point_in_timePoint-in-time CLML for a YYYY-MM-DD date.
legislation://{type}/{year}/{number}/{date}
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in legal / search
Web and local search using Brave Search API
Production ready MCP server with real-time search, extract, map & crawl.
Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors
mini cli search engine for your docs, knowledge bases, meeting notes, whatever. Tracking current sota approaches while being all local
MCP Security Weekly
Get CVE alerts and security updates for io.github.paulieb89/uk-legal-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
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.
No API keys required for the legal sources (HMRC's authenticated endpoint is optional).
For best results remind the agent to use the uk-legal-mcp server. The location depends on the agent or setup you are using. It maybe project instructions, MEMORY.md, AGENTS.md etc.
If you face issues refresh the server in the Apps / Customise menu.
Use this URL in any MCP-aware client (Claude, Claude Desktop, VS Code, Cursor, etc.):
https://uk-legal-mcp.fly.dev/mcp
For clients that use mcpServers JSON:
{
"mcpServers": {
"uk-legal": {
"type": "http",
"url": "https://uk-legal-mcp.fly.dev/mcp"
}
}
}
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-mcp
Claude Desktop config:
{
"mcpServers": {
"uk-legal": {
"command": "uvx",
"args": ["uk-legal-mcp"]
}
}
}
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": "" }
}
}
}
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 |
| **citation |