Skip to main content

Search UK case law on BAILII — court judgments with section extraction. Runs locally (BAILII blocks cloud IPs).

Project description

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

pip install bailii-mcp

Or with uv:

uvx bailii-mcp --stdio

Requires Python 3.10+.

Quickstart

Claude Desktop

Add to your claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "bailii": {
      "command": "bailii-mcp",
      "args": ["--stdio"]
    }
  }
}

Claude Code

claude mcp add bailii -- bailii-mcp --stdio

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bailii_mcp-1.0.0.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bailii_mcp-1.0.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file bailii_mcp-1.0.0.tar.gz.

File metadata

  • Download URL: bailii_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for bailii_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 29e1e3f7c5e98b60fdfe88a8662c80c11218320902816c7ca82747267022b069
MD5 596ec4f3ff5a3df95b407ed1877a4c81
BLAKE2b-256 0419c68d7388c844d93009a82e9153ff00a354e82faf2ca37bda35ba7055cb60

See more details on using hashes here.

File details

Details for the file bailii_mcp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: bailii_mcp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for bailii_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b130c4a5cc791c0ed6858270b592cc240230c4df76600c0a680a965db23e89a
MD5 6bc815d68b448ec438b8bfcbfcbc6a15
BLAKE2b-256 6b81698b37b48773614ac33f0194ff967c8fbf987429642927e5b056348e8639

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page