LegalMCP

LegalMCP

LegalMCP is a comprehensive US legal MCP server that enables AI assistants to search over 4 million US court opinions, manage Clio practice data, and access PACER federal filings through natural language.

Category
访问服务器

README

LegalMCP

CI Python 3.10+ License: MIT PyPI

The first comprehensive US legal MCP server for AI assistants.

Connect Claude, GPT, Cursor, or any MCP-compatible AI to 4M+ US court opinions, Clio practice management, and PACER federal filings. Research in seconds, not hours.


30-Second Demo

You:  Find Supreme Court cases about Fourth Amendment and cell phone location data

LegalMCP:  Found 52 results. Top case:

  Carpenter v. United States, 585 U.S. 296 (2018)
  The Court held that accessing historical cell-site location
  information constitutes a search under the Fourth Amendment,
  requiring a warrant supported by probable cause.

  → 127 cases cite this opinion
  → Full text: courtlistener.com/opinion/4578834

Why LegalMCP?

Traditional Research AI + LegalMCP
Find relevant cases 45-90 min < 30 sec
Trace citation history Open Westlaw, click around "Who cited this case?"
Pull client billing Log into Clio, navigate menus "Total hours on Henderson?"
Monthly cost $200-400 (Westlaw/Lexis) Free

Quick Start

Install

We recommend using a virtual environment to avoid conflicts with other packages:

# Create and activate a virtual environment
python -m venv legal-mcp-env

# Windows
legal-mcp-env\Scripts\activate

# Mac/Linux
source legal-mcp-env/bin/activate

# Install
pip install legal-mcp

Or install from GitHub:

pip install git+https://github.com/Mahender22/legal-mcp.git

Run

Want to try it without API keys? Enable demo mode first (optional):

# Mac/Linux
export LEGAL_MCP_DEMO=true

# Windows
set LEGAL_MCP_DEMO=true

Then start the server:

legal-mcp

Connect to Claude Desktop

Add to your claude_desktop_config.json:

Windows (%APPDATA%\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "legal-mcp": {
      "command": "C:/path/to/legal-mcp-env/Scripts/legal-mcp.exe",
      "env": {
        "LEGAL_MCP_DEMO": "true"
      }
    }
  }
}

Mac/Linux (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "legal-mcp": {
      "command": "/path/to/legal-mcp-env/bin/legal-mcp",
      "env": {
        "LEGAL_MCP_DEMO": "true"
      }
    }
  }
}

Note: Use the full path to legal-mcp inside your virtual environment. Remove the LEGAL_MCP_DEMO line and add your API keys for real data (see SETUP.md).

Connect to Claude Code

Run this command to add LegalMCP globally (available in every session):

Mac/Linux:

claude mcp add legal-mcp /path/to/legal-mcp-env/bin/legal-mcp

Windows:

claude mcp add legal-mcp C:\path\to\legal-mcp-env\Scripts\legal-mcp.exe

To enable demo mode, add the env flag:

Mac/Linux:

claude mcp add legal-mcp -e LEGAL_MCP_DEMO=true -- /path/to/legal-mcp-env/bin/legal-mcp

Windows:

claude mcp add legal-mcp -e LEGAL_MCP_DEMO=true -- C:\path\to\legal-mcp-env\Scripts\legal-mcp.exe

Tip: To add it to a specific project only, add -s project flag or create a .mcp.json file in your project root.

Connect to Cursor / Windsurf

LegalMCP works with any MCP-compatible client. Add the legal-mcp command to your AI tool's MCP server configuration.

Configuration

Set environment variables for API access. See SETUP.md for step-by-step instructions.

Variable Required Description
COURTLISTENER_TOKEN Optional Higher rate limits for case law search
CLIO_TOKEN For Clio tools OAuth token for practice management
PACER_USERNAME For PACER tools PACER account username
PACER_PASSWORD For PACER tools PACER account password
LEGAL_MCP_DEMO Optional Set true for demo mode (no API keys)

All 18 Tools

Case Law

Tool What It Does
search_case_law Search 4M+ US court opinions by topic, court, date range
get_case_details Get full opinion text for a specific case
get_case_record Get docket — parties, judges, procedural history
find_citing_cases Find cases that cite a specific opinion
find_cited_cases Find cases that an opinion relies on
parse_legal_citations Parse Bluebook citations from any text
list_available_courts List all 400+ courts and their codes
list_reporter_abbreviations Decode reporter abbreviations (U.S., F.3d, etc.)

Practice Management — Clio

Tool What It Does
search_clients Search contacts by name, email, phone
search_matters Search matters by number, description, status
get_matter_details Full matter info — client, billing, deadlines
get_time_entries Billable hours by matter, attorney, date range
get_matter_tasks Tasks and to-dos for a matter
get_matter_documents Documents attached to a matter
get_calendar Hearings, deadlines, and meetings

Court Filings — PACER

Tool What It Does
search_federal_cases Search PACER for federal court cases
get_federal_case Get case details from PACER
get_court_filings Get docket entries and filings

Note: PACER charges $0.10/page for document downloads. LegalMCP searches and lists for free — it does not auto-download paid documents.

Pricing

Free and open source. All 18 tools, MIT license, no paywall. Just install and go.

Docker

# Copy and configure environment
cp .env.example .env
# Edit .env with your API keys

# Run
docker-compose up

This starts the MCP server on port 8000 and the waitlist API on port 8080.

How It Works

LegalMCP is a Model Context Protocol server. MCP is an open standard that lets AI assistants call external tools — like searching case law or querying your Clio data.

┌──────────────┐     MCP      ┌──────────────┐      API      ┌──────────────┐
│              │  ──────────►  │              │  ──────────►  │              │
│  Claude /    │   Tool calls  │   LegalMCP   │   HTTP        │ CourtListener│
│  GPT /       │  ◄──────────  │   Server     │  ◄──────────  │ Clio / PACER │
│  Cursor      │   Results     │  (your PC)   │   JSON        │              │
└──────────────┘               └──────────────┘               └──────────────┘

Your data stays on your machine. LegalMCP runs locally and connects directly to the APIs.

Development

# Clone and install
git clone https://github.com/Mahender22/legal-mcp.git
cd legal-mcp
pip install -e ".[dev,waitlist]"

# Run tests
pytest legal_mcp/tests/ -v

# Run server locally
python -m legal_mcp.src.server

License

MIT — use it however you want.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选