legal-mcp

legal-mcp

A remotely callable MCP server for US legal research that provides tools to search, retrieve, and analyze US case law from the CourtListener API, enabling agents to build evidence packs from primary sources without generating legal content.

Category
Visit Server

README

legal-mcp

A remotely callable MCP server for US legal research. Baseline ("套壳") milestone: a thin, source-agnostic wrapper over CourtListener (the Free Law Project's 9M+ federal and state court opinions — free and public), exposed over the MCP streamable-HTTP transport.

It is deliberately the skeleton the value layers plug into later (multi-jurisdiction aggregation, full-text retrieval, citation graphs, freshness monitoring), mirroring the architecture of paper-mcp.

Design discipline

The server returns only primary-source text and citation metadata retrieved from the upstream API. It never lets a model generate legal content — agents build evidence packs they can check and footnote. (Legal hallucination has real sanctions; the server refuses to be the source of one.)

Tools

Tool What it does
search_cases(query, court='', sort_by='relevance') Full-text case-law search.
search_all(query) Aggregated search across every configured corpus, de-duplicated and re-ranked with Reciprocal Rank Fusion.
get_case(doc_id) One case's full record (citations, judges, sub-opinion links).
read_opinion(opinion_id, format='text') Full opinion text (text or html).
lookup_citation(text) Resolve reporter citations in free text to real cases. Needs a token.
get_citation_network(doc_id) Authorities a case relies on + how often it is later cited.
list_recent_cases(court) Newest opinions in a court.
list_courts() Common court ids.
list_legal_sources() Available corpora.

Architecture

legal_mcp/
├── __init__.py            version string
├── models.py              LegalDoc — normalized, source-agnostic record
├── aggregate.py           pure RRF fusion + de-dup (by citation / case name)
├── server.py              FastMCP bootstrap + tool registrations
└── sources/
    ├── base.py            LegalSource Protocol (the swappable contract)
    ├── __init__.py        source registry + aliases
    └── courtlistener.py   CourtListener REST client → LegalDoc

Adding a jurisdiction (CAP, GovInfo, Congress, eCFR, OpenStates) is a new sources/<name>.py implementing the LegalSource contract plus one line in the registry — no server change.

Configuration

Env var Default Purpose
LEGAL_MCP_HOST 127.0.0.1 bind host
LEGAL_MCP_PORT 9500 bind port
LEGAL_MCP_PATH /mcp MCP endpoint path
COURTLISTENER_API_TOKEN optional; raises rate limits and unlocks lookup_citation

Run

pip install -e .
legal-mcp                 # serves streamable-HTTP at 127.0.0.1:9500/mcp

Anonymous access already allows search and document fetch (rate-limited). Set COURTLISTENER_API_TOKEN for higher limits and citation lookup.

Roadmap

  1. MVP (this) — CourtListener case law: search, full text, citations.
  2. Add federal sources — eCFR (regulations), GovInfo (US Code), Congress (bills/votes/members), Federal Register, 26 USC/CFR (tax).
  3. Add CAP (Harvard) historical 50-state case law, fused with CourtListener.
  4. Add OpenStates (50-state legislation) for the state layer UK has no analogue for.
  5. Freshness pipeline — incremental watermark crawl + embeddings (slow data: ~hundreds of new docs/day, <10 min GPU/day).

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured