Legal Docket Monitor MCP Server

Legal Docket Monitor MCP Server

Wraps the CourtListener API for real-time federal docket monitoring, with pluggable client-list connectors (SharePoint, Excel, webhook) and tools for docket monitoring and client matching via elicitation.

Category
访问服务器

README

Legal Docket Monitor — MCP Server

An MCP server that wraps the CourtListener API for real-time federal docket monitoring — and, when configured, automatically connects new filings to your firm's existing client list, wherever it lives.

Built for litigation teams who don't want to manually check PACER for new filings, and who want that monitoring connected to "which client does this affect" without re-keying data between systems.

Why this exists

Most docket-monitoring tools are single-purpose: they watch a case and email you. This is an MCP server instead — a tool layer any AI agent (Claude Desktop, Cursor, your own orchestrator) can call. That means an agent can watch dockets, triage what's urgent, and link filings to clients as part of a larger workflow you control, not a fixed pipeline someone else built.

What's new in v2

v1 monitored dockets. v2 adds:

  • A pluggable client-list connector — SharePoint List, Excel Table, or your own backend via webhook, all behind one interface. Pick whichever fits your stack; switching later is a config change, not a rewrite.
  • Sampling-based filing triage — new filings are automatically classified (routine / needs-review / urgent) using the connected AI client's own model. The server never holds a model API key.
  • Elicitation-based client matching — when a filing's case name could match more than one client, the server asks a human to confirm instead of guessing.

Tools

Docket monitoring

Tool What it does
search_dockets Search for cases by name, party, or keyword
get_docket Full metadata for a docket (judge, dates, court, status)
get_new_filings Entries since a given date
get_docket_summary Metadata + last N filings in one call
get_parties Parties and attorneys for a docket
watch_docket Add a docket to the watch list
unwatch_docket Remove from the watch list
list_watched_dockets See all tracked matters
check_watched_dockets Poll all watched dockets; triages new filings by urgency via sampling

Client matching (requires a configured client source — see below)

Tool What it does
find_matching_clients Fuzzy-search the connected client list by name
link_docket_to_client Link a docket to a client — auto-matches if unambiguous, asks via elicitation if not
check_client_source Health check the configured backend

Architecture

MCP tool layer (src/index.ts)
        │
        ├─→ CourtListener client (src/courtlistener.ts)     — docket data
        ├─→ Watch list (src/watchlist.ts)                    — tracked matters
        ├─→ Triage (src/triage.ts)                            — sampling-based urgency classification
        ├─→ Client matching (src/client-matching.ts)          — elicitation-based resolution
        └─→ ClientListSource (src/client-sources/)             — pluggable client-list backend
                  ├─ SharePointListSource   (Microsoft Graph: SharePoint Lists)
                  ├─ ExcelTableSource       (Microsoft Graph: Excel Workbook API)
                  └─ WebhookSource          (your own REST endpoint)

Every client-list backend implements the same ClientListSource interface. The tool layer never knows which one is active — that's controlled entirely by environment configuration (see below). This is what makes "connect your client list however you want" an actual property of the system rather than a roadmap item.

Prerequisites

  • Node.js 18+
  • A free CourtListener account, for an API token: https://www.courtlistener.com/sign-in/
  • If connecting SharePoint or Excel: an Entra ID (Azure AD) app registration with Sites.Read.Write.All (or narrower, scoped to the specific site) Graph API permissions, using the client-credentials flow
  • If connecting a custom backend: an HTTP endpoint matching the contract below

Installation

git clone <your-repo>
cd legal-docket-monitor
npm install
npm run build

Configuration

Docket monitoring works standalone with just a CourtListener token. Client matching requires one client-source configuration block, chosen by CLIENT_SOURCE_TYPE.

# Required for docket monitoring
COURTLISTENER_API_TOKEN=your_token_here

# Optional — enables client-matching tools. One of: sharepoint, excel, webhook
CLIENT_SOURCE_TYPE=

# --- SharePoint List ---
SHAREPOINT_SITE_ID=
SHAREPOINT_LIST_ID=
GRAPH_TENANT_ID=
GRAPH_CLIENT_ID=
GRAPH_CLIENT_SECRET=

# --- Excel Table (same Graph credentials as SharePoint) ---
EXCEL_DRIVE_ID=
EXCEL_ITEM_ID=
EXCEL_TABLE_NAME=
GRAPH_TENANT_ID=
GRAPH_CLIENT_ID=
GRAPH_CLIENT_SECRET=

# --- Custom webhook (your own code) ---
WEBHOOK_BASE_URL=
WEBHOOK_AUTH_TOKEN=
WEBHOOK_SEARCH_FALLBACK=true   # set false to require the backend implement /clients/search

If CLIENT_SOURCE_TYPE is unset, the server runs in docket-monitoring-only mode — find_matching_clients and link_docket_to_client report that no client source is configured, rather than failing.

SharePoint List — expected columns

Column Maps to Required
Title clientName Yes
Aliases comma-separated alternate names No
MatterIds comma-separated docket numbers (also where links get written) No
ContactEmail No
PracticeArea No

Excel Table — expected columns

Same shape as above, but the data must be formatted as an actual Excel Table (Insert → Table), not a raw range — the Graph Workbook API operates on named tables. Header names: ClientName, Aliases, MatterIds, ContactEmail, PracticeArea.

Custom webhook — expected contract

Your backend implements:

GET  /clients                    → ClientRecord[]
GET  /clients/search?q=&limit=   → ClientMatch[]   (optional; falls back to local
                                    fuzzy search over GET /clients if omitted)
POST /clients/:id/link           → body: { docketId: number }, 204 on success
GET  /health                     → { ok: boolean, detail?: string }

All requests carry Authorization: Bearer <WEBHOOK_AUTH_TOKEN>. See src/client-sources/types.ts for the exact ClientRecord and ClientMatch shapes.

Connecting to Claude Desktop

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "legal-docket-monitor": {
      "command": "node",
      "args": ["/absolute/path/to/legal-docket-monitor/dist/index.js"],
      "env": {
        "COURTLISTENER_API_TOKEN": "your_token_here",
        "CLIENT_SOURCE_TYPE": "sharepoint",
        "SHAREPOINT_SITE_ID": "...",
        "SHAREPOINT_LIST_ID": "...",
        "GRAPH_TENANT_ID": "...",
        "GRAPH_CLIENT_ID": "...",
        "GRAPH_CLIENT_SECRET": "..."
      }
    }
  }
}

Restart Claude Desktop after editing. Note: sampling and elicitation require a client that supports those MCP capabilities — check your client's documentation if check_watched_dockets triage or link_docket_to_client confirmation prompts don't appear.

Example agent interactions

Watch a matter and check in on it:
→ watch_docket(docket_id=4214664, matter_id="smith-v-jones")
→ check_watched_dockets()
   → new filings are automatically triaged: 🔴 urgent / 🟡 needs-review / ⚪ routine

Connect a docket to your client list:
→ link_docket_to_client(docket_id=4214664, case_name="Acme Corp Holdings LLC v. Smith")
   → if one clear match: linked automatically
   → if ambiguous: you're asked to pick which client record is correct

Check whether your client source is set up correctly:
→ check_client_source()

Running tests

npm test          # full suite — 55 tests across docket, watchlist, and client-source logic
npm run typecheck  # type-check only, faster than a full build

All tests mock network calls (fetch) — no real CourtListener, Graph, or webhook requests are made during testing.

Project structure

src/
  index.ts                    MCP server entry point — all tool definitions
  courtlistener.ts            CourtListener API v4 client
  watchlist.ts                In-memory watch list
  triage.ts                   Sampling-based filing urgency triage
  client-matching.ts          Elicitation-based docket→client resolution
  client-sources/
    types.ts                  ClientListSource interface + fuzzy matching + caching
    graph-client.ts           Shared Microsoft Graph auth client
    sharepoint-source.ts      SharePoint List adapter
    excel-source.ts           Excel Table adapter
    webhook-source.ts         Custom backend adapter
    factory.ts                Picks the adapter from CLIENT_SOURCE_TYPE
  *.test.ts                   Vitest suites
CLAUDE.md                     Guidance for AI agents extending this codebase

Limitations & production considerations

  • Watch list is in-memory — lost on restart. Swap WatchList for a persistent store for production use.
  • CourtListener coverage isn't complete for every federal case — cases not submitted to RECAP may have limited entry data.
  • Client-source caching: client lists are cached for 5 minutes by default (TtlCache in types.ts) to avoid hammering SharePoint/Excel/your webhook on every fuzzy search. Adjust if your client list changes more frequently than that.
  • Sampling and elicitation require client support. Not every MCP client implements these capabilities yet. The server degrades gracefully (triage falls back to raw filing text; matching without elicitation support will simply not offer disambiguation), but won't error out.
  • No webhooks from CourtListener (yet)check_watched_dockets is poll-based. A future extension could register CourtListener webhooks for push-based alerts instead.

Contributing

See CLAUDE.md for architecture conventions, the adapter-extension checklist, and PR expectations if you're adding a new client-list backend or tool.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选