BAILII UK Case Law — Claude Code MCP server for UK judgments
Searches UK case law on BAILII and pulls the sections you actually need out of a judgment. Useful when you want the court's own wording, not a summary of it.
claude mcp add bailii-mcp -- uvx bailii-mcpWhat BAILII UK Case Law does
The server exposes three tools to your agent: full-text search across BAILII courts, retrieval of a judgment, and a list of the courts it can search — UKSC, EWCA, EWHC, UKUT, EAT among them. Judgments run 30-100KB, so the default response is summary plus conclusions, roughly 5000 characters. You can ask for one section or the whole thing.
Section detection keys off headings: summary, conclusions, held, discussion, background. A judgment formatted without clear headers won't split cleanly. That's how the extraction works, not a bug you can configure away.
It has to run on your machine. BAILII rejects traffic from cloud hosts and datacenters, so requests need to leave from a residential IP. Python 3.10+ is required. BAILII's terms rule out bulk downloading, which makes this a tool for targeted lookups — keep your request rate sane.
What it helps with
- find judgments on HMO licensing
- pull only the conclusions section out of a long judgment
- check recent whistleblowing decisions from the employment tribunal
- retrieve an older case that isn't in the National Archives database
- verify a citation and link before putting it in a document
Example prompts for the agent
- Search BAILII for cases about HMO licensing
- Show me the discussion section of that judgment
- Get the full text of Chinn v Hoilund-Carlsen
How to install BAILII UK Case Law
Platform CLI
claude mcp add bailii-mcp -- uvx bailii-mcpuvx runs the command named after the package; if the README names another one, use uvx --from bailii-mcp <command>
Platform CLI
codex mcp add bailii-uk-case-law -- uvx bailii-mcpuvx runs the command named after the package; if the README names another one, use uvx --from bailii-mcp <command>
Config file
{
"mcpServers": {
"bailii-uk-case-law": {
"command": "uvx",
"args": [
"bailii-mcp"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from bailii-mcp <command>
Config file
{
"servers": {
"bailii-uk-case-law": {
"type": "stdio",
"command": "uvx",
"args": [
"bailii-mcp"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from bailii-mcp <command>
Platform CLI
gemini mcp add bailii-uk-case-law uvx bailii-mcpuvx runs the command named after the package; if the README names another one, use uvx --from bailii-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about BAILII UK Case Law
How do I install BAILII UK Case Law in Claude Code?
Run claude mcp add bailii-mcp -- uvx bailii-mcp. Nothing to install first — uvx fetches the package from PyPI and runs it.
What does BAILII UK Case Law do?
It lets your agent search UK court judgments on BAILII and fetch the text with sections split out. The default reply covers summary and conclusions.
Why does this server run locally instead of in the cloud?
BAILII blocks requests from cloud servers and datacenters. Running locally means your requests go out through a residential IP and get through.