Search US court opinions, federal dockets, judges, citations, and oral arguments via CourtListener.
Search and retrieve US court opinions, federal dockets, judge records, citation networks, and oral arguments from CourtListener's 9M+ opinion corpus via MCP. STDIO or Streamable HTTP.
Public Hosted Server: https://courtlistener.caseyjhand.com/mcp
US court opinions, federal dockets, judge records, and oral arguments from CourtListener's 9M+ opinion corpus and its RECAP mirror of federal PACER filings. Search opinions and dockets, trace citation networks and precedent chains, look up judges and courts, and pull judicial financial disclosures from any MCP client. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
| Tool | Description |
|---|---|
courtlistener_search_opinions | Full-text search across 9M+ written court opinions with field-level filtering, date ranges, status, and sort |
courtlistener_get_opinion | Fetch full text and metadata for an opinion cluster — returns all opinion variants (majority, concurrence, dissent) |
courtlistener_get_citations | Retrieve the citation network for an opinion: opinions cited by it (citing) or that cite it (cited_by) |
courtlistener_lookup_citation | Resolve legal citations (e.g., "410 U.S. 113") to cluster IDs and case metadata — one entry per citation found in the input |
courtlistener_search_dockets | Search RECAP federal court dockets by party name, attorney, court, and date |
courtlistener_get_docket | Fetch docket metadata and entry list for a single federal case |
courtlistener_get_parties | Fetch all parties and attorneys of record for a RECAP federal docket by docket ID |
courtlistener_search_judges | Search judge records by name, appointing president, court, and political affiliation |
courtlistener_get_judge | Fetch full biographical profile, appointment history, and education for a single judge |
courtlistener_lookup_courts | List courts filtered by jurisdiction type, active/inactive status, and scraper coverage |
courtlistener_search_oral_arguments | Search appellate oral argument audio recordings by case name, court, and date argued |
courtlistener_get_oral_argument | Fetch full detail for a single oral argument — panel, duration, MP3 link, and speech-to-text transcript |
courtlistener_search_financial_disclosures | Search federal judicial financial disclosure filings by judge and year — category counts, itemized gifts, and source PDF |
courtlistener_get_financial_disclosure | Fetch one disclosure's parsed line items — investments, debts, positions, income, gifts — with coded values decoded to dollar ranges; selectable by category |
| Resource | Description |
|---|---|
courtlistener://reference/courts | Jurisdiction type codes, common court IDs, search type codes, and rate-limit reference |
| Prompt | Description |
|---|---|
courtlistener_research_topic | Generate a structured legal research plan for a given legal topic or question |
courtlistener_search_opinions toolcaseName:, court_id:, judge:, docketNumber:, cites:(id)) and boolean AND / OR / NOT; filter by court, date range, and publication status (Published / Unpublished / In-chambers, etc.)cluster_id (for courtlistener_get_opinion) and docket_id (for courtlistener_get_docket) for chainingopinions[] variants — per-variant opinion ID, type, author, outbound cites, and a CourtListener-hosted local_path copy of the source documentsnippet is the matched excerpt from the first variant that carries one; CourtListener does not mark which variant the search matchedcourtlistener_get_opinion toolhtml_text and plain_text for each opinion variant; surfaces download_url when local text is absenttype_label — the same value courtlistener_search_opinions reports (lead-opinion, concurrence-opinion, dissent) — beside the stored type code, whose numeric prefix is a sort keycites[] (outbound citation IDs), cite_count, syllabus, posture, and docket linkcourtlistener_get_citations toolcited_by (default): opinions that cite this one — measures precedential influence and downstream adoptionciting: opinions this one cites — reveals the authority chain the court relied oncited_by follows CourtListener's own cursor with the filters applied, so its total and its pages describe the same set; citing walks the cited-opinion list and filters each page as it goes, so a filtered page can come back empty with matches still ahead — the response distinguishes that from an exhausted networkcourtlistener_lookup_citation toolmatches, one entry per citation CourtListener extracted from the input — pass a passage and every citation in it resolves, each with its own status (200 one case, 300 several candidates, 400 unrecognized reporter, 404 no match) and decoded status_labelcluster_id, case_name, court / court_id, court_resolution, docket_id, date_filed, all known citation strings, cite_count, precedential_status, and judgesmatches, not as an error — only text carrying no parseable citation at all failscourt is absent from the citation-lookup payload (the court lives on the linked docket), so it is resolved from docket_id — one extra request per distinct docket, bounded by max_court_lookups (default 4, up to 20; 0 skips court resolution). court_resolution (resolved / no_docket / lookup_failed / over_budget) says why a court is or isn't populated — only over_budget is worth retrying with a larger budget/citation-lookup/ plus those court lookups, issued sequentially and stopped early on the first rate-limited response. The endpoint requires authentication and has no unauthenticated pathcourtlistener_search_dockets toolparty_name filter applies in addition to (AND with) the q query — more precise than embedding party names in the queryparties, attorneys, and firms, plus nature of suit, jurisdiction type, and the referred magistrate judgeis_available status, page count, and a fully-qualified RECAP storage URL when a copy is storedcoverage_note in every response — RECAP is crowd-sourced from PACER; completeness varies by courtcourtlistener_get_docket toolentries_page_size controls how many entries are returned (1–50); large cases have hundredsis_available: false require a PACER account or CourtListener RECAP filing — document retrieval is not exposedcourtlistener_get_parties toolLead attorney, Terminated, …) alongside the raw code, with the date a relationship endednext_cursor back as cursor — this endpoint is cursor-paginated, so there is no page number to increment; page_size (max 10) is a request only, and CourtListener paginates at a fixed size that can return more parties than asked forcourtlistener_search_dockets or courtlistener_get_docketcourtlistener_search_judges toold/r/i/l/g/u)person_id for chaining to courtlistener_get_judge, plus a current_position summary — court, position type, appointer, selection method, and start date — selected as the position with no termination date, or the latest-starting one when several or none qualifypolitical_affiliation filter takescourtlistener_lookup_courts can be passed directlycourtlistener_get_judge tooljob_title and organization_name. /positions/ is cursor-walked under a page bound; a truncated notice and positionsShown/truncated fields report when a long career ran past itposition_type_label, termination_reason_label, degree_label) alongside the raw codes CourtListener's own filters takedob_granularity and the per-position date_start_granularity read year, month, or day, and a year-only record renders as the year rather than the stored YYYY-01-01 placeholdercourtlistener_lookup_courts toolCourt.JURISDICTIONS — federal appellate (F), federal district (FD), federal bankruptcy (FB), state supreme (S), state appellate (SA), plus the tribal, territory, and military benches. The full table is in the courtlistener://reference/courts resourcestatus selects which bench to return: active (the default) only the courts CourtListener still scrapes, inactive only the historical and defunct ones, any both. Upstream filters these as disjoint sets, so any is the only value that reaches the whole listhas_opinion_scraper filter useful for planning opinion searches — courts without scrapers have sparse coverageid (the court_id string for use in all search and filter parameters), citation string (e.g., "9th Cir."), and jurisdiction code/courts/ ignores any requested page size, so there is no way to pull a larger page. Enumerating a whole bench costs one call per 20 courts against a rate-limited free tier, and the inactive bench is several times larger than the active one: status: 'any' makes the full set reachable, not cheapall_matching_court_ids returns the complete filtered id set from a bundled snapshot of every CourtListener court, at no request cost — covers the default bench and every jurisdiction filter. Empty (not a truncated prefix) when more than 1,000 courts match; check all_matching_court_ids_complete before reading emptiness as "no courts match"courtlistener_search_oral_arguments tooldownload_url at the originating court, and local_path, CourtListener's durable hosted copy — plus duration_seconds, panel_ids (chaining to courtlistener_get_judge), and transcript snippetcourtlistener_get_oral_argument tooltranscript when transcription has completed, plus panel_ids, duration_seconds, MP3 download_url, and the linked docket_idcourtlistener_search_oral_arguments resultscourtlistener_search_financial_disclosures tooljudge_id (a person_id from courtlistener_search_judges) and/or filing yearyear filter is applied to the fetched page only — CourtListener has no server-side year filter, so filings for that year on later pages are not included; page through with cursor (the response returns next_cursor even when the current page has no year match)courtlistener_get_financial_disclosure tooldisclosure_id (from a courtlistener_search_financial_disclosures result); one upstream call returns every category inlineN → $250,001 - $500,000)categories: [...] to select specific categories; omit for all. When the full itemization is too large to inline, the response returns an outline of categories by size — re-call with categories: [...] to pull specific ones in fullcourtlistener://reference/courts resourcejurisdiction filter on courtlistener_lookup_courts validates against, so the two cannot disagreecourtlistener_research_topic prompttopic required; jurisdiction optional (e.g. "scotus", "ca9"); depth optional, "overview" (default, 3–5 key cases) or "deep" (adds citation-network traversal and judge lookup)Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
CourtListener-specific:
/search/-backed tools and on parties/attorneys, page-number on the courts and docket-entry lists — with continuation surfaced on every responseAgent-friendly output:
cluster_id, docket_id, and person_id fields are present wherever they enable a logical follow-up call, with field-level descriptions naming which tool to pass them tocoverage_note and oral argument transcript snippet availability explicitly signaled so agents can communicate limitations to users rather than silently omitting themA public instance is available at https://courtlistener.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"courtlistener-mcp-server": {
"type": "streamable-http",
"url": "https://courtlistener.caseyjhand.com/mcp"
}
}
}
Add the following to your MCP client configuration file. See CourtListener account settings to generate a free API token.
{
"mcpServers": {
"courtlistener-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/courtlistener-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"COURTLISTENER_API_TOKEN": "your-api-token"
}
}
}
}
Or with npx (no Bun required):
{
"mcpServers": {
"courtlistener-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/courtlistener-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"COURTLISTENER_API_TOKEN": "your-api-token"
}
}
}
}
Or with Docker:
{
"mcpServers": {
"courtlistener-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"-e", "COURTLISTENER_API_TOKEN=your-api-token",
"ghcr.io/cyanheads/courtlistener-mcp-server:latest"
]
}
}
}
For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 COURTLISTENER_API_TOKEN=... bun run start:http
# Server listens at http://localhost:3010/mcp
git clone https://github.com/cyanheads/courtlistener-mcp-server.git
cd courtlistener-mcp-server
bun install
cp .env.example .env
# edit .env and set COURTLISTENER_API_TOKEN
All configuration is validated at startup via Zod schemas in src/config/server-config.ts. Key environment variables:
| Variable | Description | Default |
|---|---|---|
COURTLISTENER_API_TOKEN | Required. API token from your CourtListener account settings. CourtListener's published free-tier limits are 5 req/min, 50/hr, 125/day; actual limits vary by token tier. | — |
COURTLISTENER_BASE_URL | API base URL override. | https://www.courtlistener.com/api/rest/v4 |
COURTLISTENER_RATE_LIMIT_PER_MINUTE | Requests the server starts against CourtListener per rolling minute. Past the window, requests queue for a slot; a call whose wait would run past ~45s fails with the reset time instead of spending a request. Defaults track the published free tier — raise them to match a higher token tier. | 5 |
COURTLISTENER_RATE_LIMIT_PER_HOUR | Requests the server starts against CourtListener per rolling hour. | 50 |
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_SESSION_MODE | HTTP session handling: stateless, stateful, or auto (resolves to stateful). The server declares stateless in src/index.ts; setting this overrides it. | stateless |
MCP_HTTP_PORT | HTTP server port. | 3010 |
MCP_HTTP_ENDPOINT_PATH | HTTP endpoint path. | /mcp |
MCP_PUBLIC_URL | Public origin for TLS-terminating reverse-proxy deployments. | — |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (debug, info, warning, error, etc.). | info |
MCP_GC_PRESSURE_INTERVAL_MS | Opt-in Bun-only forced-GC pressure loop (ms). Try 60000 if RSS grows under sustained HTTP load. | 0 |
LOGS_DIR | Directory for log files (Node.js only). | <project-root>/logs |
STORAGE_PROVIDER_TYPE | Storage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1. | in-memory |
OTEL_ENABLED | Enable OpenTelemetry instrumentation. | false |
See .env.example for the full list of optional overrides.
Build and run:
# One-time build
bun run rebuild
# Run the built server
bun run start:stdio
# or
bun run start:http
Run checks and tests:
bun run devcheck # Lint, format, typecheck, security
bun run test # Vitest test suite
bun run lint:mcp # Validate MCP definitions against spec
docker build -t courtlistener-mcp-server .
docker run --rm -e COURTLISTENER_API_TOKEN=your-token -p 3010:3010 courtlistener-mcp-server
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/courtlistener-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point — registers tools, resources, and prompts, and inits services. |
src/config | Server-specific environment variable parsing and validation with Zod. |
src/mcp-server/tools | Tool definitions (*.tool.ts). 14 tools across opinions, citations, dockets, parties, judges, financial disclosures, courts, and oral arguments. |
src/mcp-server/resources | Resource definitions (*.resource.ts). |
src/mcp-server/prompts | Prompt definitions (*.prompt.ts). |
src/services/courtlistener | CourtListener REST API client — auth, retry, rate-limit error classification. |
tests/ | Unit and integration tests mirroring src/. |
See CLAUDE.md for development guidelines and architectural rules. The short version:
try/catch in tool logicctx.log for request-scoped logging, ctx.state for tenant-scoped storagesrc/index.ts and adding to the createApp({ tools, resources, prompts }) arraysIssues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run test
Apache-2.0 — see LICENSE for details.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @cyanheads/courtlistener-mcp-serverMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-cyanheads-courtlistener-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/courtlistener-mcp-server"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referenceio.github.cyanheads/courtlistener-mcp-server works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.