GU

georgejeffers/uk-case-law-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

26 stars 8 forks 质量 53 趋势 11NOASSERTION

使用国家档案馆API的英国案例法MCP服务器。使LLM能够搜索、检索并引用英国法律判决。

概览

一个模型上下文协议(MCP)服务器,为Claude提供工具,用于从国家档案馆检索和检索英国判例法。 - : 跨所有法院和法庭查询(2003+) - : 获得完整案件文本及编号段落 - : 聚焦特定司法管辖区或执业领域 - : 访问首页以上的结果 - : 遵守TNA API限制(每5分钟1000个请求) 使用可选筛选器搜索英国判例法: - 查询 - 搜索词(法律概念、当事人名称、关键词) - legal_area - 按领域筛选(知识产权、商业、雇佣等) - 法院 - 按法院级别筛选(最高法院、上诉法院等) - year_from / year_to - 日期范围过滤 - 限制 - 最大结果(1-50) - 页面 - 分页 - 引用 - 中立引用(例如,[2024] UKSC 1)或文件URI - 段落 - 可选范围(例如,1-50)- include_metadata - 包括法官、法院、日期 添加到你的Claude桌面配置(~/Library/Application Support/Claude/claude_desktop_config。

概述(AI 翻译)

一个模型上下文协议(MCP)服务器,为Claude提供工具,用于从国家档案馆检索和检索英国判例法。

特色

  • 搜索英国判例法:跨所有法院和法庭查询(2003+)
  • 检索完整判决:获取带编号段落的完整案件文本
  • 按法院/法律领域筛选:聚焦特定司法管辖区或执业领域
  • 分页支持:访问首页之后的结果
  • 速率限制:遵守TNA API限制(每5分钟1,000次请求)

工具

uklaw_search

使用可选筛选器搜索英国判例法:

  • query - 搜索词(法律概念、当事人名称、关键词)
  • legal_area - 按区域筛选(知识产权、商业、就业等)
  • court - 按法院层级筛选(最高法院、上诉法院等)
  • year_from / year_to - 日期范围过滤
  • limit - 满分结果(1-50)
  • page - 分码

uklaw_get_case

获取完整案件文本:

  • citation - 中性引用(例如,[2024] UKSC 1)或文档URI
  • paragraphs - 可选射程(例如,1-50)
  • include_metadata - 包括法官、法院、日期

支持的法院

法院级别 示例

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

UK Case Law MCP Server

A Model Context Protocol (MCP) server that provides Claude with tools to search and retrieve UK case law from The National Archives.

Features

  • Search UK Case Law: Query across all courts and tribunals (2003+)
  • Retrieve Full Judgments: Get complete case text with numbered paragraphs
  • Filter by Court/Legal Area: Focus on specific jurisdictions or practice areas
  • Pagination Support: Access results beyond the first page
  • Rate Limited: Respects TNA API limits (1,000 requests per 5 minutes)

Tools

uklaw_search

Search UK case law with optional filters:

  • query - Search terms (legal concepts, party names, keywords)
  • legal_area - Filter by area (IP, commercial, employment, etc.)
  • court - Filter by court level (Supreme Court, Court of Appeal, etc.)
  • year_from / year_to - Date range filtering
  • limit - Max results (1-50)
  • page - Pagination

uklaw_get_case

Retrieve full case text:

  • citation - Neutral citation (e.g., [2024] UKSC 1) or document URI
  • paragraphs - Optional range (e.g., 1-50)
  • include_metadata - Include judges, court, date

Supported Courts

Court Level Examples
Supreme Court UKSC
Court of Appeal EWCA Civ, EWCA Crim
High Court EWHC (Ch, QB/KB, Admin, Comm, Patents, IPEC, TCC, Fam)
Tribunals EAT, UKUT (IAC, LC, AAC)

Installation

Prerequisites

Setup

# Clone the repository
git clone https://github.com/georgejeffers/uk-case-law-mcp-server.git
cd uk-case-law-mcp-server

# Install dependencies
bun install

# Run tests
bun test

# Start the server
bun start

Claude Desktop Configuration

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "uk-case-law": {
      "command": "bun",
      "args": ["run", "/path/to/uk-case-law-mcp/src/server.ts"]
    }
  }
}

Usage Examples

Once configured, you can ask Claude questions like:

  • “Search for patent obviousness cases in the High Court”
  • “Find recent unfair dismissal tribunal decisions”
  • “Get the full text of [2024] UKSC 1”
  • “What did the Court of Appeal say about breach of fiduciary duty in 2023?”

API

This server uses the TNA Find Case Law API, which:

  • Covers judgments from 2003 onwards
  • Requires no authentication
  • Returns results in Atom/XML format
  • Provides full text in LegalDocML (Akoma Ntoso) format

License

This project is licensed under the PolyForm Noncommercial License 1.0.0.

You may use this software for personal, educational, and non-commercial purposes only. Commercial use requires a separate license.

Contributing

Contributions are welcome for non-commercial purposes. Please open an issue or PR.

Acknowledgments

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "uk-case-law": { "command": "bun", "args": ["run", "/path/to/uk-case-law-mcp/src/server.ts"] } } }