LegalMCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LegalMCP Search for Supreme Court cases on Fourth Amendment and cell phone location data"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
LegalMCP
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/4578834Related MCP server: Legal Court MCP Server
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-mcpOr install from GitHub:
pip install git+https://github.com/Mahender22/legal-mcp.gitRun
Want to try it without API keys? Enable demo mode first (optional):
# Mac/Linux
export LEGAL_MCP_DEMO=true
# Windows
set LEGAL_MCP_DEMO=trueThen start the server:
legal-mcpConnect 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-mcpinside your virtual environment. Remove theLEGAL_MCP_DEMOline 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-mcpWindows:
claude mcp add legal-mcp C:\path\to\legal-mcp-env\Scripts\legal-mcp.exeTo 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-mcpWindows:
claude mcp add legal-mcp -e LEGAL_MCP_DEMO=true -- C:\path\to\legal-mcp-env\Scripts\legal-mcp.exeTip: To add it to a specific project only, add
-s projectflag or create a.mcp.jsonfile 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 |
| Optional | Higher rate limits for case law search |
| For Clio tools | OAuth token for practice management |
| For PACER tools | PACER account username |
| For PACER tools | PACER account password |
| Optional | Set |
All 18 Tools
Case Law
Tool | What It Does |
| Search 4M+ US court opinions by topic, court, date range |
| Get full opinion text for a specific case |
| Get docket — parties, judges, procedural history |
| Find cases that cite a specific opinion |
| Find cases that an opinion relies on |
| Parse Bluebook citations from any text |
| List all 400+ courts and their codes |
| Decode reporter abbreviations (U.S., F.3d, etc.) |
Practice Management — Clio
Tool | What It Does |
| Search contacts by name, email, phone |
| Search matters by number, description, status |
| Full matter info — client, billing, deadlines |
| Billable hours by matter, attorney, date range |
| Tasks and to-dos for a matter |
| Documents attached to a matter |
| Hearings, deadlines, and meetings |
Court Filings — PACER
Tool | What It Does |
| Search PACER for federal court cases |
| Get case details from PACER |
| 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 upThis 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.serverLicense
MIT — use it however you want.
Available Tools
18 toolsfind_cited_casesA
Find cases that a specific opinion cites (what cases did this ruling rely on?).
Use this to understand the legal foundation of a decision.
Inputs: opinion_id (required). Returns: object
find_citing_casesA
Find cases that cite a specific opinion (who cited this case later?).
Use this to trace how a case has been used in subsequent rulings.
Inputs: opinion_id (required). Returns: object
get_calendarA
Get calendar entries (hearings, deadlines, meetings) from Clio.
Inputs: date_to, date_from, matter_id. Returns: object
get_case_detailsA
Get full details of a specific court opinion by its ID.
Use this after search_case_law to get the full text and details of a case.
Inputs: opinion_id (required). Returns: object
get_case_recordB
Get the full docket (case record) for a case.
Includes parties, attorneys, judges, and procedural history.
Inputs: docket_id (required). Returns: object
get_court_filingsA
Get docket entries (individual filings) for a federal case from PACER.
Shows motions, orders, briefs, and other documents filed in the case.
Inputs: case_id (required), court_id (required), date_to, date_from. Returns: object
get_federal_caseB
Get details of a specific federal case from PACER.
Inputs: case_id (required), court_id (required). Returns: object
get_matter_detailsA
Get full details of a specific matter (case) from Clio.
Includes client info, practice area, responsible attorney, billing method, deadlines.
Inputs: matter_id (required). Returns: object
get_matter_documentsA
Search documents in Clio, optionally filtered by matter.
Inputs: query, matter_id. Returns: object
get_matter_tasksB
Get tasks associated with a matter in Clio.
Inputs: status, matter_id. Returns: object
get_time_entriesA
Get time entries (billable hours) from Clio.
Use this to review time spent on a case or by an attorney.
Inputs: date_to, date_from, matter_id. Returns: object
list_available_courtsA
List all available US courts and their short codes.
Use this to find the correct court code for filtering searches.
Inputs: no named parameters. Returns: object
list_reporter_abbreviationsA
List common legal reporter abbreviations and which courts they cover.
Useful for understanding citations like '347 U.S. 483' or '42 F.3d 1421'.
Inputs: no named parameters. Returns: object
parse_legal_citationsA
Parse legal citations from text and identify the cases referenced.
Handles Bluebook-format citations like "347 U.S. 483 (1954)" or "42 F.3d 1421".
Inputs: text (required). Returns: object
search_case_lawA
Search US case law for court opinions matching a query.
Use this to find cases about specific legal topics, statutes, or concepts.
Inputs: query (required), court, date_after, date_before. Returns: object
search_clientsA
Search for clients/contacts in Clio practice management.
Requires Clio API token. Use this to look up client info, phone numbers, emails.
Inputs: query, contact_type. Returns: object
search_federal_casesA
Search PACER for federal court cases and filings.
Requires PACER credentials. Use this to find active federal cases, check filing status, or look up case numbers.
Inputs: court_id, case_name, case_number, date_filed_to, +1 more. Returns: object
search_mattersA
Search for matters (cases) in Clio practice management.
Requires Clio API token. Find open cases, filter by status or client.
Inputs: query, status, client_id. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Several tools could be confused (get_federal_case, get_case_record, get_court_filings all provide case/docket information), but descriptions help clarify the differences. The separation between search_case_law and search_federal_cases is clear, and citation tools are distinct.
All tools follow a consistent verb_noun pattern (search_, get_, find_, parse_, list_) with snake_case. Minor deviations like get_matter_documents (which actually searches) don't cause confusion.
18 tools is slightly above the ideal range of 3-15, but the server covers three distinct domains (Clio practice management, PACER federal cases, and case law research), so each tool earns its place.
Covers search/retrieval for clients, matters, federal cases, opinions, and citation analysis. Missing tools like get_client_details and full-text document access for court filings are minor gaps that can be worked around.
Maintenance
Related MCP Connectors
Connect AI to millions of laws and court cases with the Lawstronaut MCP.
Hosted MCP server for pre-action AI governance verdicts, model routing, and evidence verification.
41Law firm management MCP: manage cases, clients, tasks, calendar and documents via Claude AI.
Search U.S. case law, fetch opinions, and ask matter-aware legal questions over your documents.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server providing AI assistants access to Canadian case law and legislation metadata from CanLII across all jurisdictions, supporting search and citation relationships.79MIT
- AlicenseAqualityDmaintenanceMCP Server providing AI agents access to over 3 million US court decisions via CourtListener and EU legislation via EUR-Lex, with tools for searching cases, citations, judges, and court information.6MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server providing AI agents access to CourtListener's comprehensive legal database, featuring semantic search, hybrid search, citation verification, and research tools.7MIT
- AlicenseAqualityBmaintenanceMCP server for free U.S. case-law and court-docket search via CourtListener, providing tools for opinion search, docket lookup, citation verification, and more.105 npmMIT