Skip to main content
Glama
khizar-anjum

CourtListener Legal Research MCP Server

by khizar-anjum

CourtListener Legal Research MCP Server

A powerful MCP server for legal research across 3,352 U.S. courts using the CourtListener API.

npm version npm downloads License Build Status

๐Ÿ“ฆ Available on: npm | Smithery

Disclaimer: This is an independent personal project and is not affiliated with, endorsed by, or sponsored by CourtListener or the Free Law Project.

CourtListener MCP Demo

Built using the CourtListener API - An open legal database democratizing access to court data with exceptional API documentation and comprehensive coverage of the U.S. legal system.

Quick Start

# Install from npm
npm install @khizar-anjum/courtlistener-mcp

# Or install from source
git clone https://github.com/khizar-anjum/courtlistener-mcp.git
cd courtlistener-mcp
npm install

# Setup
echo 'COURTLISTENER_API_KEY="your_api_key"' > .env
npm run generate-courts

# Build and run
npm run build
npm run dev

Get your free API key from: https://www.courtlistener.com/api/

๐Ÿ’ก About the CourtListener API: A non-profit legal database providing free access to millions of legal documents, court opinions, and PACER data. The API's excellent documentation and comprehensive data coverage make legal research accessible to everyone.

Available Tools

Accesses CourtListener's opinion database - all 3,352 courts

๐Ÿ” search_cases_by_problem

Find relevant cases using natural language legal problems

  • Parameters: search_keywords[], jurisdiction, case_type, date_range, limit

๐Ÿ“‹ get_case_details

Deep dive into specific cases with full opinion text

  • Parameters: case_id, include_full_text

๐Ÿ”— find_similar_precedents

Discover cases with similar legal reasoning

  • Parameters: reference_case_id, jurisdiction, legal_concepts, limit

๐Ÿ“Š analyze_case_outcomes

Analyze outcome patterns for success prediction

  • Parameters: case_type, jurisdiction, court_level, date_range

โš–๏ธ get_judge_analysis

Understand judge's ruling patterns for strategy

  • Parameters: judge_name, case_type, court, jurisdiction

โœ… validate_citations

Verify and expand legal citations

  • Parameters: citations[], context_text, jurisdiction

๐Ÿ“ get_procedural_requirements

Find filing requirements and court rules

  • Parameters: case_type, jurisdiction, court, claim_amount

Identify trends in case law

  • Parameters: legal_area, time_period, trend_type

RECAP Archive Integration ๐Ÿ”’

Federal PACER data accessed via CourtListener's RECAP Archive

Premium Access: Some functions require a CourtListener premium subscription

  • ๐Ÿ”’ PREMIUM REQUIRED | ๐Ÿ“Š BASIC ACCESS

๐Ÿ“Š search_pacer_dockets (Basic)

Search federal court dockets from PACER using full-text search

  • Parameters: case_name, court, date_range, party_name, nature_of_suit

  • Functionality: Uses proper search API endpoint for accurate, relevant results

๐Ÿ“Š search_parties_attorneys (Basic)

Track attorney representation patterns

  • Parameters: party_name, attorney_name, firm_name, court, date_range

๐Ÿ“Š track_case_status (Basic)

Monitor case status and recent activity

  • Parameters: docket_id, include_recent_activity, status_history

๐Ÿ”’ get_docket_entries (Premium)

Detailed timeline of case filings and orders

  • Parameters: docket_id, entry_type, limit

๐Ÿ”’ analyze_case_timeline (Premium)

Deep case progression analysis with activity patterns

  • Parameters: docket_id, analysis_type, include_documents

๐Ÿ”’ get_case_documents (Premium)

Access documents with full text extraction

  • Parameters: docket_id, document_type, include_text, limit

Available Resources

Browse via MCP client:

  • courtlistener://courts/all - All 3,352 courts

  • courtlistener://courts/federal - Federal courts

  • courtlistener://courts/state - State courts

  • courtlistener://courts/state-{state} - State-specific courts

  • courtlistener://jurisdictions/court-mappings - Jurisdiction mappings

Jurisdiction Options

Input

Description

Example

"all"

All courts

Search nationwide

"federal"

Federal courts

Circuit, District courts

"california"

State courts

All CA courts

"scotus"

Specific court

Supreme Court

"ca9,nysd"

Multiple courts

9th Circuit + NY Southern

MCP Client Setup

Add to Claude Desktop or MCP client:

{
  "mcpServers": {
    "courtlistener": {
      "command": "node",
      "args": ["/path/to/courtlistener-mcp/.smithery/index.ts"],
      "env": {
        "COURTLISTENER_API_KEY": "your_api_key"
      }
    }
  }
}

Usage Examples

Case Research Workflow

// 1. Search for cases
{
  "tool": "search_cases_by_problem",
  "arguments": {
    "search_keywords": ["breach of warranty", "defective product"],
    "jurisdiction": "california",
    "case_type": "warranty"
  }
}

// 2. Get case details
{
  "tool": "get_case_details",
  "arguments": {
    "case_id": "12345",
    "include_full_text": false
  }
}

// 3. Find similar cases
{
  "tool": "find_similar_precedents",
  "arguments": {
    "reference_case_id": "12345",
    "jurisdiction": "federal"
  }
}

PACER Research (Premium)

// Search PACER dockets
{
  "tool": "search_pacer_dockets",
  "arguments": {
    "nature_of_suit": "contract",
    "court": "federal"
  }
}

// Analyze case timeline (Premium)
{
  "tool": "analyze_case_timeline",
  "arguments": {
    "docket_id": "67890",
    "analysis_type": "all"
  }
}

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines on how to submit improvements, bug fixes, and new features.

API Rate Limits

  • Authenticated: 5,000 requests/hour

  • Unauthenticated: 100 requests/day

Premium Access

Basic API access provides all Core Legal Research tools plus limited PACER metadata. Premium access unlocks:

  • Detailed docket entry analysis

  • Full document text extraction

  • Comprehensive timeline analysis

  • Advanced litigation intelligence

Get premium access: https://www.courtlistener.com/help/api/rest/

Acknowledgments

This independent project uses the CourtListener API, created by the Free Law Project, a non-profit organization. We acknowledge and appreciate:

  • Their API Design: Clear, well-documented REST API with comprehensive field coverage

  • Open Legal Data: Free access to millions of court opinions, dockets, and legal documents

  • RECAP Archive: Democratizing access to PACER federal court data

  • Community Impact: Making legal research accessible beyond expensive commercial databases

Consider supporting their mission: Free Law Project

License

MIT

-
security - not tested
A
license - permissive license
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/khizar-anjum/courtlistener-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server