Legal MCP logo

Legal MCP

Community
Mahender22

The first comprehensive US legal MCP server -- case law, citations, practice management, and court filings for AI assistants

PublisherMahender22
Repositorylegal-mcp
LanguagePython
Forks
18
Stars
68
Available tools
0
Transport typestdio, streamable-http
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Legal MCP exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    68 stars and 18 forks from the linked repository.

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 ResearchAI + LegalMCP
Find relevant cases45-90 min< 30 sec
Trace citation historyOpen Westlaw, click around"Who cited this case?"
Pull client billingLog 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:

bash
# 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:

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

Run

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

bash
# Mac/Linux
export LEGAL_MCP_DEMO=true

# Windows
set LEGAL_MCP_DEMO=true

Then start the server:

bash
legal-mcp

Connect to Claude Desktop

Add to your claude_desktop_config.json:

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

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):

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:

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

Windows:

bash
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:

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

Windows:

bash
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.

VariableRequiredDescription
COURTLISTENER_TOKENOptionalHigher rate limits for case law search
CLIO_TOKENFor Clio toolsOAuth token for practice management
PACER_USERNAMEFor PACER toolsPACER account username
PACER_PASSWORDFor PACER toolsPACER account password
LEGAL_MCP_DEMOOptionalSet true for demo mode (no API keys)

All 18 Tools

Case Law

ToolWhat It Does
search_case_lawSearch 4M+ US court opinions by topic, court, date range
get_case_detailsGet full opinion text for a specific case
get_case_recordGet docket — parties, judges, procedural history
find_citing_casesFind cases that cite a specific opinion
find_cited_casesFind cases that an opinion relies on
parse_legal_citationsParse Bluebook citations from any text
list_available_courtsList all 400+ courts and their codes
list_reporter_abbreviationsDecode reporter abbreviations (U.S., F.3d, etc.)

Practice Management — Clio

ToolWhat It Does
search_clientsSearch contacts by name, email, phone
search_mattersSearch matters by number, description, status
get_matter_detailsFull matter info — client, billing, deadlines
get_time_entriesBillable hours by matter, attorney, date range
get_matter_tasksTasks and to-dos for a matter
get_matter_documentsDocuments attached to a matter
get_calendarHearings, deadlines, and meetings

Court Filings — PACER

ToolWhat It Does
search_federal_casesSearch PACER for federal court cases
get_federal_caseGet case details from PACER
get_court_filingsGet 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

bash
# 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

bash
# 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.

Installation

TypingMind
{
  "mcpServers": {
    "legal-mcp": {
      "command": "legal-mcp",
      "args": []
    }
  }
}

Use Legal MCP MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Legal MCP is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Legal MCP as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Legal MCP MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "legal-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Legal MCP MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Legal MCP MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Legal MCP to help me with this task?
Legal MCP
Sure. I read it.
Here is what I found using Legal MCP.

Option 2: Add an MCP server URL

Use this when Legal MCP is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter the MCP server URL from the provider in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste the MCP server URL from the provider into the Server URL field.
  2. Enter a connection name for Legal MCP.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the Legal MCP connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the Legal MCP tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the Legal MCP tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Legal MCP to help me with this task?
Legal MCP
Sure. I read it.
Here is what I found using Legal MCP.

Frequently asked questions

What is the Legal MCP MCP server used for?

Legal MCP is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Legal MCP MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Legal MCP with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Legal MCP MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Legal MCP connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Legal MCP MCP to TypingMind?

Legal MCP can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does Legal MCP MCP provide in TypingMind?

Legal MCP exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Legal MCP MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Legal MCP requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇