mcpField
B
BAILII UK Case Law

BAILII UK Case Law

Local
github.comLegal & Government6Updated 26w ago

About BAILII UK Case Law

BAILII UK Case Law is a local MCP server for searching BAILII’s UK case law and retrieving judgments. It is intended for targeted legal research and extracts judgment sections to make long texts easier to inspect.

Key features

  1. 01Full-text search across BAILII courts
  2. 02Retrieve judgment text
  3. 03Extract summary and conclusions by default
  4. 04Request specific judgment sections
  5. 05List available UK courts

Use cases

  1. 01Find employment tribunal decisions
  2. 02Research older cases not in the TNA database
  3. 03Review a judgment’s discussion or conclusions

MCP support

Exposes BAILII case search, judgment retrieval, and court-listing tools to MCP clients. It runs locally, which routes requests through the user’s machine.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"paulieb89-bailii": {
"command": "uvx",
"args": [
"bailii-mcp"
]
}
}
}
Run commanduvx bailii-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypibailii-mcp1.0.1

Tools

3

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
paramsobjectYesSearch parameters containing: - query (str): Search terms - max_results (int): Number of results to return (default 10)
params.querystringYesFull-text search query, e.g. 'landlord HMO licensing duty of care'
params.max_resultsintegerNoMaximum number of results to return (1-30)

Details

From the project README

BAILII MCP Server

PyPI Install in VS Code

Search UK case law on BAILII. Retrieve judgments with automatic section extraction (summary, conclusions, discussion, background). Runs locally — BAILII blocks cloud IPs.

Install

Using uv (recommended)

No install needed — uvx runs it directly from PyPI:

uvx bailii-mcp
Using pip
pip install bailii-mcp
bailii-mcp

Requires Python 3.10+.

Configuration

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "bailii": {
      "command": "uvx",
      "args": ["bailii-mcp"]
    }
  }
}
Claude Code
claude mcp add bailii -- uvx bailii-mcp
VS Code

Add to .vscode/settings.json or use the MCP panel:

{
  "mcp": {
    "servers": {
      "bailii": {
        "command": "uvx",
        "args": ["bailii-mcp"]
      }
    }
  }
}
Using pip instead of uvx

If you installed via pip install bailii-mcp, use "command": "bailii-mcp" and "args": [] instead.

From source
git clone https://github.com/paulieb89/bailii-mcp.git
cd bailii-mcp
pip install -e .

What You Can Ask

Once connected, just ask Claude naturally:

  • "Search BAILII for cases about HMO licensing"
  • "Find recent whistleblowing employment tribunal cases"
  • "Get the summary of Chinn v Hoilund-Carlsen"
  • "What did the court hold in that case?"
  • "Show me the discussion section"

Tools

ToolWhat it does
bailii_searchFull-text search across all BAILII courts. Returns titles, citations, and links.
bailii_get_judgmentRetrieve judgment text. Defaults to summary + conclusions (~5000 chars).
bailii_list_courtsList available UK courts (UKSC, EWCA, EWHC, UKUT, EAT, etc).
Section Extraction

Judgments are large (30-100KB). By default, only the summary and conclusions are returned. Ask for more if you need it:

  • Default: summary + conclusions (5000 chars)
  • Specific section: "show me the discussion" → pulls just that section
  • Full text: "get the complete judgment" → returns everything

Sections detected: summary, conclusions, held, discussion, background

Why Local?

BAILII blocks requests from cloud servers and datacenters. This server runs on your machine, so requests go through your residential IP.

For case law that doesn't need BAILII specifically, uk-legal-mcp provides case law via the National Archives API — hosted on Fly.io, no local setup needed.

This BAILII server is useful when you need:

  • Employment tribunal decisions (EAT coverage is stronger on BAILII)
  • Older cases not yet in the TNA database
  • Specific tribunals with better BAILII indexing

Notes

  • BAILII terms prohibit bulk downloading — use for targeted research only
  • Be reasonable with request rate
  • Section extraction depends on judgment formatting — not all judgments have clear section headers

Licence

Apache 2.0

Author

Paul Boucherat — building MCP servers for UK property, legal, and project controls.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.