BAILII UK Case Law

io.github.paulieb89由 GitHub 帳號 paulieb89 發布v1.0.1更新於 Oct 24, 2026

Search UK case law on BAILII — court judgments with section extraction. Runs locally.

已驗證STDIO僅桌面網頁搜尋與抓取

概覽

AI 產生的概覽

讓助理在 BAILII 上檢索英國判例法,並自動擷取判決書章節,於本機執行。

可以做什麼
提供三個工具:bailii_search 在所有 BAILII 法院中進行全文檢索,回傳標題、引註與連結;bailii_get_judgment 取得判決書文字;bailii_list_courts 列出可用的英國法院,例如 UKSC、EWCA、EWHC、UKUT、EAT 等。判決書篇幅龐大,因此預設只回傳摘要與結論(約 5000 字元),也可視需要取得特定章節或全文。可辨識的章節包括 summary、conclusions、held、discussion 與 background。
適用情境
適合需要 BAILII 涵蓋範圍的特定英國法律檢索,例如就業法庭裁決、尚未收錄於其他資料庫的舊案,或 BAILII 索引較完整的特定法庭。它鎖定特定研究用途,而非大量蒐集。
執行需求
以本機程序在使用者電腦上執行,僅限桌面端。需要 Python 3.10+,可用 uvx 直接從 PyPI 執行,或以 pip 安裝。未宣告任何驗證、環境變數或標頭。需要連線至 BAILII 的網路,且必須在住宅 IP 上執行,因為 BAILII 會阻擋來自雲端伺服器與資料中心的請求。
安裝前請注意
BAILII 條款禁止大量下載,因此僅可用於特定研究,並應維持合理的請求頻率。章節擷取取決於判決書格式,並非所有判決書都有清楚的章節標題。請求會經由使用者自己的 IP 位址送出。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 BAILII UK Case Law,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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:

bash
uvx bailii-mcp

Using pip

bash
pip install bailii-mcpbailii-mcp

Requires Python 3.10+.

Configuration

Claude Desktop

Add to your claude_desktop_config.json:

json
{  "mcpServers": {    "bailii": {      "command": "uvx",      "args": ["bailii-mcp"]    }  }}

Claude Code

bash
claude mcp add bailii -- uvx bailii-mcp

VS Code

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

json
{  "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

bash
git clone https://github.com/paulieb89/bailii-mcp.gitcd bailii-mcppip 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.

來源:README.md,提交 b1b9f51

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。