Skip to main content

BAILII MCP Server

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

Install

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

Tool What it does
bailii_search Full-text search across all BAILII courts. Returns titles, citations, and links.
bailii_get_judgment Retrieve judgment text. Defaults to summary + conclusions (~5000 chars).
bailii_list_courts List 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.

Metadata

Release files for bailii-mcp 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bailii-mcp 1.0.2
File Size Uploaded
bailii_mcp-1.0.2.tar.gz 19.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bailii-mcp 1.0.2
File Interpreter ABI Platform
bailii_mcp-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 27.4 kB

Release files / bailii_mcp-1.0.2.tar.gz

Download URL bailii_mcp-1.0.2.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
67948cece8c8e3676fc4df376abe9ccecd3b64bcc0140a616b272fe55639e026
BLAKE2b-256 checksum
How to use checksums
89023dd4c021c0a09a65ddc848fab47922c689f23525efba5f0e59be174430de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.5

Release files / bailii_mcp-1.0.2-py3-none-any.whl

Download URL bailii_mcp-1.0.2-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
889d0fe55337886119c9470727b3a860a3f9bb6df188087613ec4718e9b04b2f
BLAKE2b-256 checksum
How to use checksums
025c318ab0dd30cf9d2d341e14c1e05a0b0706854b40655fab21797b4dc01cf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.5

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page