CourtListener MCP Server
Provides general web search capabilities via Brave Search API to supplement legal research with recent developments, practical guidance, and contextual information.
Click on "Install 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., "@CourtListener MCP ServerSearch for Supreme Court cases on free speech"
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.
CourtListener MCP Server
A comprehensive Model Context Protocol (MCP) server for accessing CourtListener's legal database. Provides Claude Desktop with powerful legal research capabilities including court opinions, case dockets, judge profiles, and comprehensive legal analysis.
Features
šļø Court Opinion Analysis - Retrieve and analyze court decisions with full text interpretation
š Case Docket Information - Complete case timelines, parties, and procedural history
āļø Legal Content Analysis - Extract holdings, dispositions, and factual backgrounds
šØāāļø Judge & People Profiles - Comprehensive biographical, educational, and career data
š³ļø Political & Career Analysis - Political affiliations, ABA ratings, and retention events
š¼ Position & Appointment Tracking - Judicial positions, appointment processes, and career timelines
š Advanced Search & Citations - Search across all content types with citation network analysis
š Human-Readable Codes - Automatic translation of legal codes to plain English
š Citation & Precedent Analysis - Track case citations and legal precedents
Related MCP server: courtlistener-mcp
Complete Tool Set
Court Opinions & Case Law
get_opinion- Individual court decisions with full text analysisget_cluster- Grouped opinions (cases with multiple decisions)get_docket- Case information, timelines, and procedural historysearch_legal_cases- Advanced search across all legal contentadvanced_legal_search- Complex filtering and multi-court searches
Judge & People Information
get_judge- Comprehensive judge biographical and career dataget_positions- Judicial and professional position historyget_political_affiliations- Political party history and timelineget_aba_ratings- American Bar Association ratings analysisget_educations- Educational background and degree detailsget_retention_events- Judicial retention votes and reappointmentsget_sources- Data provenance and source tracking
Citation & Legal Analysis
verify_citations- Citation verification and lookup using Eyecitebulk_citation_verification- Batch citation processingfind_authorities_cited- Legal precedents an opinion relies uponfind_citing_opinions- Later cases that cite a specific decisionanalyze_citation_network- Comprehensive precedent network analysis
Courts & Infrastructure
get_court- Court information, jurisdiction, and hierarchy
Project Structure
courtlistener-mcp/
āāā courtlistener_server.py # Main MCP server
āāā server_factory.py # server factory
āāā requirements.txt # Dependencies
āāā .env.template # Environment template
āāā README.md # Project documentation
āāā core/
ā āāā __init__.py
ā āāā lifespan.py # Lifecycle management
āāā tools/ # All 16 tool implementations
ā āāā __init__.py
ā āāā opinion_tools.py
ā āāā cluster_tools.py
ā āāā docket_tools.py
ā āāā court_tools.py
ā āāā search_tools.py
ā āāā people_tools.py
ā āāā position_tools.py
ā āāā political_affiliation_tools.py
ā āāā aba_ratings_tools.py
ā āāā retention_events_tools.py
ā āāā sources_tools.py
ā āāā education_tools.py
ā āāā citation_tools.py
ā āāā opinions_cited_tools.py
āāā utils/
ā āāā __init__.py
ā āāā mappings.py # Code mappings
ā āāā formatters.py # Output formatting
āāā tests/ # Test directory (NEW)
āāā __init__.py # Make it a Python package
āāā courtlistener_evals.py # Comprehensive evaluation suite
āāā mcp_test_runner.py # Practical test runner
āāā test_config.sh # Automated test script
āāā pytest.ini # Pytest configuration
āāā .env.test # Test environment templateInstallation
1. Clone and Setup
# Install MCP framework
pip install mcp
# Install legal database clients
pip install courtlistener-api
pip install brave-search-api2. API Configuration
CourtListener Setup:
# Register for CourtListener API access at: https://www.courtlistener.com/api/
export COURTLISTENER_API_KEY="your_api_key_here"Brave Search Setup:
# Register for Brave Search API at: https://api.search.brave.com/
export BRAVE_SEARCH_API_KEY="your_api_key_here"3. Start MCP Servers
# Start CourtListener MCP Server
python mcp_servers/courtlistener_server.py --port 8000
# Start Brave Search MCP Server
python mcp_servers/brave_server.py --port 80014. Run Training with MCP
python train_with_mcp.py \
--config config/mcp_training.yaml \
--mcp-servers courtlistener,brave \
--output models/mcp_legal_agent_v1/Learning Patterns During Training
Tool Usage Evolution
Early Training (Episodes 1-100):
Random tool selection
Poor query formulation
No strategic sequencing
Mid Training (Episodes 500-1000):
Begins preferring CourtListener for legal precedents
Learns basic jurisdiction targeting
Develops simple search refinement
Advanced Training (Episodes 2000+):
Strategic tool sequencing (CourtListener ā Brave for context)
Jurisdiction-aware tool selection
Complex query optimization
Expert Level (Episodes 5000+):
Sophisticated search strategies
Tool coordination patterns
Professional-grade research workflows
Optimal Search Strategy Patterns
Precedent Research:
Search CourtListener for case topic
Search CourtListener for jurisdiction-specific cases
Search Brave for recent developments
Statutory Analysis:
Search Brave for statute text
Search CourtListener for statute interpretation
Search Brave for recent applications
General Consultation:
Search Brave for topic overview
Search CourtListener for relevant cases
Search Brave for practical guidance
Monitoring and Troubleshooting
Health Checks
# Test MCP server connectivity
curl http://localhost:8000/health # CourtListener
curl http://localhost:8001/health # BraveCommon Issues
Connection Problems:
Check API keys are properly set
Verify servers are running on correct ports
Test network connectivity
Rate Limiting:
Monitor API usage quotas
Adjust request frequency if needed
Scale servers for higher throughput
Performance Issues:
Check server response times
Monitor memory usage
Verify database connectivity
Scaling Considerations
High-Traffic Scenarios:
Run multiple MCP server instances
Use load balancers for distribution
Implement connection pooling
Cache frequent queries
Key Benefits of Our MCP Approach
1. Strategic Learning During Training
Agents develop optimal tool sequencing patterns naturally
9-call constraint forces efficient resource utilization
Legal-specific search strategies emerge through reinforcement learning
2. Professional Legal Research Replication
Dual database approach mirrors real legal practice (specialized + general search)
Jurisdiction-aware tool selection develops automatically
Citation network navigation skills learned during training
3. Research Innovation
First implementation of MCP integration during RL training episodes
Reproducible methodology using standardized MCP protocols
Novel training approach for legal AI development
4. Practical Advantages
Cost-effective training through search constraints
Quality-focused rewards for search relevance
Scalable architecture supporting concurrent training
Future MCP Enhancements
Additional Legal Database Integration
Westlaw and Lexis MCP servers
Patent database access
Regulatory database integration
Advanced Search Capabilities
Multi-modal document analysis
Real-time legal news integration
Specialized practice area databases
Performance Optimizations
Intelligent query caching
Predictive search suggestions
Dynamic rate limit management
This MCP integration enables our legal AI agents to develop professional-grade research skills by learning with tools during training, representing a fundamental advancement in legal AI training methodology.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- 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.Last updated6MIT
- Alicense-qualityCmaintenanceAn MCP server providing AI agents access to CourtListener's comprehensive legal database, featuring semantic search, hybrid search, citation verification, and research tools.Last updated7MIT
- Alicense-qualityCmaintenanceA 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.Last updatedMIT
- 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.Last updated6MIT
Related MCP Connectors
MCP for CourtListener: US federal and state opinions, dockets, judges, plus eCFR regulations.
CourtListener MCP ā Free Law Project's CourtListener API (free, no auth required for basic access)
Search US court opinions, federal dockets, judges, citations, and oral arguments via CourtListener.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/UPSD1/courtlistener-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server