Skip to main content

教程 07: MCP Integrations for Legal Workflows

Connect Claude, ChatGPT or Codex to case law databases, document management systems, and court records for seamless legal research workflows using the Model Context Protocol.

覆盖Claude: 已验证ChatGPT / Codex: 草稿Grok Bot: 已验证

撰写以来的变化最近核查: 2026年5月20日 · 2
  1. Codex 0.132.0 与 Secure MCP Tunnel 控制

    OpenAI 的 Codex 0.132.0 changelog 增加了 Python SDK 身份验证、更简单的纯文本 turn API、恢复 exec 会话的结构化输出、远程执行器的标准 Codex 身份验证,以及 app-server 图像保真度保留;OpenAI API changelog 还推出 Secure MCP Tunnel,用于 account-led enterprise 访问私有 MCP 服务器。

    建议操作: 对法律自动化,请在连接高权限仓库或客户数据系统前,重新检查 SDK 身份验证存储、恢复会话 schema、远程执行器身份、私有 MCP tunnel 归属和人工审查。

    来源: OpenAI Codex changelog · OpenAI API changelog · OpenAI Secure MCP Tunnel guide

  2. OpenAI 模型、计划与 Responses API 文档更新

    OpenAI 文档现在强调当前 GPT-5.5/GPT-5.4 时代模型、更新后的 ChatGPT 计划命名,以及用于新 API 工作流的 Responses API 和内置工具。

    建议操作: 对法律工作流,避免陈旧的 GPT-4 或固定价格建议;面向客户试点前请核查当前模型、计划、工具、保留设置和审核控制。

    来源: OpenAI models · ChatGPT pricing · GPT-5.5 in ChatGPT · Responses API migration · OpenAI tools guide · Code Interpreter tool

本教程将向你展示如何将你的 AI 助手连接到法律数据源——判例法、文档管理、法院记录——从而无需离开 Claude 即可进行研究并核验引文。

学习目标

完成本教程后,你将能够:

  • 理解 Model Context Protocol (MCP) 及其在法律场景中的应用
  • 将判例法研究来源(Midpage 或 CourtListener)连接到你的助手
  • 连接到文档管理系统(iManage、Google Drive、Box、SharePoint)
  • 使用 MCP 构建自定义法律研究工作流
  • 执行带版本跟踪的法规研究工作流
  • 实施自动化引文核验流程
  • 设置法院记录提醒和案卷监控
  • 应用代理式多步骤研究模式
  • 解读判例法分析以获得战略洞察

高级级别 | 需要一定技术基础 | 时长:105 分钟


第 1 部分:理解法律场景中的 MCP

什么是 MCP?

Model Context Protocol (MCP) 是 Anthropic 用于将 AI 连接到外部工具和数据源的开放标准。可以把它理解为 AI 的 USB——一种通用连接器。

为什么 MCP 对法律工作很重要

传统方式MCP 方式
从研究平台复制粘贴到聊天中助手直接查询该平台
从 iManage 下载,再上传到聊天中助手直接访问 iManage
在 5 个不同工具之间切换所有工具集中在单一界面
手动录入数据自动化数据流

已核实的连接器和 MCP 服务器

这里只列出截至 2026-09-02 可核查的来源。对阻止自动核查的供应商设置页面,会在下文相应部分标记为 draft。

连接器或服务器可提供内容文档位置
CourtListener联邦案卷和判决意见;公开,可选 API keyClaude for Legal plugins 中预配置提供
Midpage判例法检索、判决意见分析、案卷报告(订阅制)Midpage 自有的 Codex plugin,基于 Midpage MCP 构建
CoCounsel Legal (Thomson Reuters)带引用报告的 Westlaw Deep Research(订阅制,OAuth)Claude for Legal 外部 plugin
Trellis, Descrybe, Solve Intelligence州案卷、判例法研究、专利起草(订阅制)Claude for Legal 连接器表
iManage, Ironclad, DocuSign, EverlawDMS、合同登记、电子签名、电子取证(订阅制)Claude for Legal 连接器表
Slack, Google Drive, Box聊天与文件访问Claude for Legal 连接器表;Slack 和 Google Workspace 也列在 Claude 定价页面
Dropbox, Gmail, Google Drive, Microsoft Teams, Outlook, SharePointOpenAI 托管的连接器,在共享数据前会请求批准OpenAI remote MCP guide
Any remote MCP server你自己的服务器或供应商通过 HTTP 提供的服务器Claude Code claude mcp add、Claude API MCP connector、OpenAI 的 remote MCP tool、Codex config.toml

第 2 部分:设置判例法研究连接器(Midpage)

Midpage 提供什么

Midpage 是一个法律研究平台。其 MCP 暴露了判例法工具,Midpage 自有 Codex plugin 文档将其列为 searchanalyzeOpinionfindInOpinionanalyzeDocketReportanalyzeDocketFiling(核查日期 2026-09-02)。需要 Midpage 订阅。

集成优势

连接研究连接器后:

  • 无需离开助手即可研究判例法
  • 核验引文是否仍然是有效法律
  • 为你的事实查找相关先例
  • 在起草时整合法律依据

要求

  • Midpage 订阅
  • Claude Code,或 Pro、Max 或 Team 方案的 Cowork 桌面应用(带 remote MCP 的连接器列在定价页面

设置

  1. 从你的 Midpage 账户获取 Midpage MCP endpoint 或凭证。Draft:无法抓取 Midpage 的设置页面进行核验;本教程早期版本中显示的 @midpage/mcp-server 命令未经核实。
  2. 添加服务器。在 Claude Code 中(MCP docs):
claude mcp add --transport http midpage <midpage-mcp-url>
# or, for a local process:
claude mcp add --transport stdio midpage -- <command from Midpage's docs>
  1. 在 Claude Code 中运行 /mcp 以完成任何 OAuth 流程并检查状态;claude mcp list 会显示已配置的服务器。
  2. 在 Cowork 或 Claude Desktop 中,在 Connectors 下添加同一服务器;在 Claude Desktop 中配置的服务器可通过 claude mcp add-from-claude-desktop 导入。

测试连接

Search for Delaware cases on limitation of liability clauses in
software agreements from the last 3 years.

助手应返回带有研究来源标签的案件引文。如果没有任何标签,说明连接器未激活。


第 3 部分:设置 CourtListener(免费替代方案)

CourtListener 提供什么

CourtListener 是 Free Law Project 提供的免费开源法律研究数据库:

  • 联邦判例法
  • 州法院判决意见
  • 口头辩论
  • 通过 RECAP 集成 PACER
  • 无需订阅;API key 可提高速率限制

CourtListener 作为连接器已预配置在每一个处理诉讼、知识产权、法律诊所或法学院学生工作的 Claude for Legal plugin 中(README,核查于 2026-09-02):安装 plugin,授权一次连接器,通过其获得的引文会带有来源标签。仅来自模型知识的引文会被标记为 [verify]

若采用独立设置,可使用 claude mcp add 添加 CourtListener MCP 服务器。Draft:未能核实由 Free Law Project 维护的 MCP 服务器;GitHub 上存在社区服务器,而本教程早期版本提到的 @open-legal-tools/courtlistener-mcp package 未经核实。在将任何社区服务器用于客户事项前,请审查其代码和数据处理方式。

测试连接

Search CourtListener for Ninth Circuit cases discussing
software license enforceability.

CourtListener 与 Midpage 对比

功能CourtListenerMidpage
价格免费订阅制
覆盖范围联邦覆盖较好,州覆盖不一商业法律研究覆盖
引证工具基础AI 驱动
更新速度因来源而异因供应商流程而异
最适合注重成本、聚焦联邦完整法律研究

第 4 部分:文档管理集成

MCP TypeScript 栈(2026 年 2 月更新)

对于自定义本地 MCP 服务器,可选择以下路径之一:

  • 当前可稳定用于生产@modelcontextprotocol/sdk(v1.x 分支)
  • 迁移观察:关注拆分 package 的发布文档(@modelcontextprotocol/server + @modelcontextprotocol/client),并在切换前先在 npm 上核实可用性。

本教程中的自定义服务器片段使用 v1.x 稳定 import 模式,以确保在生产法律工作流中的可靠性。

基础安装:

npm install @modelcontextprotocol/sdk zod

截至当时的验证(2026-02-10):

  • 已在本地验证 @modelcontextprotocol/sdk@1.26.0 可正常工作
  • 已通过 StdioClientTransport 验证 stdio 握手(工具列表 + 成功的工具调用)
  • 已确认本教程使用的本地 server/client 模式可在当前稳定 package 下运行

在采用拆分 package imports 之前,请先核实 npm 可用性并在你的环境中测试。

选项 A:连接已存在的连接器

Claude for Legal 连接器表(核查于 2026-09-02)涵盖 iManage(commercial-legalcorporate-legal)、Box(corporate-legal)、Google Drive 和 Slack(所有 plugins),以及 Ironclad、DocuSign 和 Everlaw。可在每个 plugin 的 .mcp.json 中或在 Claude Code 中使用 claude mcp 进行配置。标记为 “customer subscription” 的连接器需要你自己的账户和 API key。

用法:

Retrieve the Smith v. Jones complaint from our matter workspace
in iManage and summarize the key allegations.

Draft:本教程早期版本中出现过 Cowork 的 SharePoint 连接器和 Clio 连接器(“LegalContext”);截至 2026-09-02,均无法从官方来源核实。

选项 C:通过自定义 MCP 服务器连接 iManage

iManage 集成需要自定义设置:

第 1 步:创建 iManage API Application

  1. 登录 iManage Control Center
  2. 创建 OAuth2 application
  3. 配置 redirect URI
  4. 记录 Client ID 和 Secret

第 2 步:构建自定义 MCP 服务器

// imanage-mcp.js
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
import iManageClient from "imanage-api-client";
 
const server = new McpServer({ name: "imanage", version: "1.0.0" });
 
server.registerTool(
  "search_documents",
  {
    description: "Search iManage for documents",
    inputSchema: {
      query: z.string().describe("Search query"),
      workspace: z.string().describe("Workspace ID"),
    },
  },
  async ({ query, workspace }) => {
    const client = new iManageClient(process.env.IMANAGE_CREDENTIALS);
    const results = await client.search({ query, workspace });
    return { content: [{ type: "text", text: JSON.stringify(results) }] };
  },
);
 
server.registerTool(
  "get_document",
  {
    description: "Retrieve document content",
    inputSchema: {
      documentId: z.string().describe("Document ID"),
    },
  },
  async ({ documentId }) => {
    const client = new iManageClient(process.env.IMANAGE_CREDENTIALS);
    const document = await client.getDocument(documentId);
    return { content: [{ type: "text", text: JSON.stringify(document) }] };
  },
);
 
const transport = new StdioServerTransport();
await server.connect(transport);

第 3 步:注册服务器

claude mcp add --scope project --transport stdio imanage \
  --env IMANAGE_CREDENTIALS=path/to/credentials.json -- node path/to/imanage-mcp.js

这会写入一个项目范围的 .mcp.json,你可以提交给团队共享;--scope user 则会将其仅保留给你自己使用。


第 5 部分:构建法律研究工作流

工作流 1:全面法律研究

结合多个 MCP 来源进行深入研究:

I need to research the enforceability of liquidated damages
clauses in software agreements under Delaware law.

Workflow:
1. Search Midpage for Delaware cases on liquidated damages
2. Search CourtListener for federal cases applying Delaware law
3. Pull our firm's memo on liquidated damages from SharePoint
4. Synthesize into a research summary

助手响应模式

Let me research this across multiple sources...

## Midpage Results (Delaware State Cases)
[Assistant queries Midpage, returns cases]

## CourtListener Results (Federal/Delaware Law)
[Assistant queries CourtListener, returns additional cases]

## Firm Precedent (SharePoint)
[Assistant retrieves firm memo]

## Synthesis
Based on my research across these sources:

The leading Delaware case is [X], which established...
Federal courts applying Delaware law have held...
Our firm's prior analysis in the [Client] matter noted...

**Key Takeaways**:
1. Delaware generally enforces liquidated damages if...
2. The "reasonableness" test requires...
3. Our recommended approach is...

**Citations** (verified via Midpage citator):
- [Citation 1] - Still good law
- [Citation 2] - Still good law

工作流 2:合同 + 研究集成

/review-contract
[Upload software agreement]

[Assistant identifies concerning liability provision under CA law]

"I've flagged the liability limitation as potentially problematic.
Let me research California's position on liability caps in
software agreements..."

[Assistant queries Midpage for CA cases]

"Based on my research, California courts have held that [X].
The clause as drafted may be enforceable because [Y], but
you should consider [Z] modification."

工作流 3:尽职调查研究

We're acquiring a company in the healthcare space.
Research the regulatory landscape:

1. Search our SharePoint for prior healthcare M&A memos
2. Search Midpage for recent HIPAA enforcement actions
3. Search for FTC healthcare antitrust cases
4. Generate a due diligence issue checklist

第 6 部分:高级 MCP 配置

运行多个服务器并设置作用域

Claude Code 保留三个作用域(MCP docs,核查于 2026-09-02):local(默认,仅你在当前项目中可见)、project(仓库根目录中的 .mcp.json,通过版本控制共享)和 user(你的所有项目)。使用 claude mcp add --scope <scope> ... 添加服务器,使用 claude mcp list 列出它们,使用 claude mcp remove <name> 删除,并可在会话内通过 /mcp 检查状态或完成 OAuth。建议将研究连接器放在共享的 project 作用域中,而将特定事项的 DMS 凭证保留在 user 作用域中。

调试连接

检查状态:

What MCP servers do you have access to right now?
List each server and its available tools.

测试特定工具:

Test the Midpage search tool by searching for "contract breach"
and report any errors.

第 7 部分:安全注意事项

数据流

Your Query

Your assistant (vendor servers)

MCP Server (Your Control)

External Service (Midpage/iManage/etc.)

安全最佳实践

凭证管理

  • 绝不要将 API keys 提交到版本控制中
  • 使用环境变量
  • 定期轮换密钥
  • 为不同用途使用不同密钥

访问控制

  • 将 MCP server 访问限制在必要数据范围内
  • 尽可能使用只读访问
  • 审计 MCP server 日志
  • 禁用未使用的集成

客户数据

  • 了解各服务的数据处理方式
  • 检查是否具备 SOC 2、ISO 27001 认证
  • 审查服务的 DPA
  • 考虑哪些事项可使用哪些集成

合规检查

  • 已对所有 MCP 服务进行安全审查
  • API keys 已安全存储
  • 已启用访问日志
  • 已签署 数据处理 协议
  • 在需要时已获得客户同意
  • 律所 IT 已批准该配置

第 8 部分:法规研究工作流

立法追踪集成

连接 Congress API 以进行实时立法监控:

设置

{
  "mcpServers": {
    "congress": {
      "command": "npx",
      "args": ["-y", "@open-legal-tools/congress-mcp"],
      "env": {
        "CONGRESS_API_KEY": "optional-api-key"
      }
    }
  }
}

法规版本比较

用于比较跨立法会期法规版本的工作流:

Research task:
Track amendments to the California CCPA across its
legislative history and identify key changes by session.

Assistant multi-step workflow:
1. Query Congress API for CCPA bill history
2. Retrieve full text for versions from 2018, 2020, 2023
3. Compare key sections (scope, penalties, exemptions)
4. Generate side-by-side amendment analysis
5. Flag enforcement implications of changes

用于法规追踪的 MCP 配置

{
  "mcpServers": {
    "congress": {
      "command": "npx",
      "args": ["-y", "@open-legal-tools/congress-mcp"],
      "tools": [
        "search_bills",
        "get_bill_versions",
        "track_amendments",
        "retrieve_sponsor_info"
      ]
    },
    "regulationtracker": {
      "command": "npx",
      "args": ["-y", "regulation-tracker-mcp"],
      "env": {
        "FEDERAL_REGISTER_API": "api-key"
      }
    }
  }
}

监管法规检索

用于全面监管研究的模式:

Query: "Search all HIPAA regulations (45 CFR 160-164)
related to breach notification requirements and identify
which sections were modified in the last 3 years."

Assistant workflow:
1. Query regulatory database for HIPAA sections
2. Cross-reference Federal Register for amendments
3. Pull relevant case law on HIPAA enforcement
4. Compile regulatory timeline
5. Provide implementation checklist for compliance

法案追踪工作流

为影响你业务领域的立法设置自动追踪:

// bill-tracking-mcp.js - Custom MCP for monitoring bills
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";
 
const server = new McpServer({ name: "bill-tracker", version: "1.0.0" });
 
server.registerTool(
  "monitor_bills",
  {
    description: "Set up alerts for bills matching criteria",
    inputSchema: {
      keywords: z.array(z.string()).describe("Bill topic keywords"),
      jurisdictions: z.array(z.string()).describe("States/federal"),
      stages: z.array(z.string()).describe("Introduced, hearing, floor, etc."),
    },
  },
  async ({ keywords, jurisdictions, stages }) => {
    const bills = await monitorLegislation(keywords, jurisdictions, stages);
    return { content: [{ type: "text", text: JSON.stringify(bills) }] };
  },
);
 
server.registerTool(
  "compare_versions",
  {
    description: "Compare bill versions across sessions",
    inputSchema: {
      billId: z.string(),
      versions: z.array(z.string()).describe("Version numbers to compare"),
    },
  },
  async ({ billId, versions }) => {
    const diff = await compareLegislativeVersions(billId, versions);
    return { content: [{ type: "text", text: JSON.stringify(diff) }] };
  },
);

第 9 部分:引文核验流程

自动化引文核查

在法律写作中直接实施引文核验:

Upload the legal brief to your assistant with instruction:
"Verify every case citation in this brief is still good law
and identify any corrections needed."

Assistant workflow:
1. Extract all citations (Midpage tool)
2. Check each citation status (Midpage citator)
3. Identify overruled/reversed cases
4. Generate citation correction report
5. Flag negative law that contradicts arguments

有效法律核验系统

自动化引文核查配置

{
  "mcpServers": {
    "midpage": {
      "command": "npx",
      "args": ["-y", "@midpage/mcp-server"],
      "tools": [
        "search_cases",
        "verify_citation_status",
        "find_citing_cases",
        "check_negative_law"
      ],
      "env": {
        "MIDPAGE_API_KEY": "your-api-key"
      }
    },
    "google-scholar": {
      "command": "npx",
      "args": ["-y", "google-scholar-mcp"],
      "tools": ["search_scholar", "verify_citations"]
    }
  }
}

Shepardizing/KeyCiting 等效方法

用于核验引文权威强度的流程:

Citation verification prompt:
"For the following cases, provide Shepard's analysis:
- Smith v. Jones, 234 F.3d 567 (5th Cir. 2020)
- Brown v. Green Corp., 890 P.2d 123 (Cal. 2019)

For each case:
1. Current status (good law/overruled/limited)
2. Citing cases (positive/negative treatment)
3. Strength of authority for this proposition
4. Alternative authorities if weakened"

引文格式校验

用于标准化引文的工作流:

// citation-validator-mcp.js
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";
 
const server = new McpServer({ name: "citation-validator", version: "1.0.0" });
 
server.registerTool(
  "validate_citation_format",
  {
    description: "Validate and standardize citation format",
    inputSchema: {
      citation: z.string().describe("Citation to validate"),
      jurisdiction: z.string().describe("State/federal"),
      citationStyle: z.enum(["bluebook", "alwd", "local"]),
    },
  },
  async ({ citation, jurisdiction, citationStyle }) => {
    const normalized = normalizeCitation(citation, jurisdiction);
    const formatted = applyCitationStyle(normalized, citationStyle);
    const result = { original: citation, normalized, formatted, isValid: true, corrections: [] };
    return { content: [{ type: "text", text: JSON.stringify(result) }] };
  },
);
 
server.registerTool(
  "batch_validate_brief",
  {
    description: "Validate all citations in document",
    inputSchema: {
      documentText: z.string(),
      citationStyle: z.string(),
    },
  },
  async ({ documentText, citationStyle }) => {
    const citations = extractCitations(documentText);
    const validated = await Promise.all(citations.map((c) => validateCitationFormat(c, citationStyle)));
    const summary = {
      totalCitations: citations.length,
      validCitations: validated.filter((v) => v.isValid).length,
      issues: validated.filter((v) => !v.isValid),
      correctedDocument: reconstructDocumentWithCorrections(documentText, validated),
    };
    return { content: [{ type: "text", text: JSON.stringify(summary) }] };
  },
);

第 10 部分:法院记录提醒设置

实时案件提交提醒

配置 PACER 集成以进行案卷监控:

设置 PACER MCP Server

{
  "mcpServers": {
    "pacer": {
      "command": "npx",
      "args": ["-y", "@open-legal-tools/pacer-mcp"],
      "env": {
        "PACER_USERNAME": "your-pacer-login",
        "PACER_PASSWORD": "your-pacer-password",
        "PACER_CLIENT_CODE": "your-client-code"
      }
    },
    "recap": {
      "command": "npx",
      "args": ["-y", "@free-law-project/recap-mcp"],
      "tools": [
        "search_pacer_documents",
        "get_docket",
        "set_filing_alerts",
        "get_document"
      ]
    }
  }
}

850M+ 记录检索模式

用于全面法院记录检索的查询模式:

Workflow: Competitive intelligence monitoring

Setup alert for:
- All cases involving Company X in federal courts
- Parties: Company X (plaintiff or defendant)
- Date range: Last 2 years
- Alert frequency: Real-time

Assistant multi-source search:
1. Query PACER for Company X docket entries
2. Search RECAP for public documents
3. Cross-reference state court records
4. Extract defendants/plaintiffs for analysis
5. Generate competitive threat assessment

大规模检索配置

# Search patterns for 850M+ document database
# Example: Patent litigation involving software
 
curl -X POST https://api.recap.org/search \
  -H "Content-Type: application/json" \
  -d '{
    "query": "software patent infringement",
    "courts": ["all_federal"],
    "date_filed_after": "2023-01-01",
    "document_types": ["complaint", "judgment"],
    "limit": 1000
  }'

案卷监控

自动化案卷跟踪工作流:

Monitor docket: Smith v. Jones, Case No. 2023-CV-12345

Daily workflow:
1. Check for new filings (PACER alert)
2. Extract filing metadata (date, filer, document type)
3. Download documents if Rule 34 request received
4. Flag critical events (depositions, trial dates)
5. Summarize for team

Configuration:
{
  "monitored_dockets": [
    {
      "case_id": "2023-CV-12345",
      "court": "Northern District of California",
      "check_frequency": "daily",
      "alerts": {
        "critical_events": true,
        "discovery_deadlines": true,
        "expert_disclosures": true,
        "all_filings": false
      }
    }
  ]
}

基于当事人的跟踪

监控涉及特定当事人的所有事项:

// party-tracker-mcp.js
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";
 
const server = new McpServer({ name: "party-tracker", version: "1.0.0" });
 
server.registerTool(
  "track_party",
  {
    description: "Monitor all cases involving a party",
    inputSchema: {
      partyName: z.string().describe("Individual or company name"),
      role: z.enum(["plaintiff", "defendant", "all"]),
      courts: z.array(z.string()).describe("Courts to monitor"),
    },
  },
  async ({ partyName, role, courts }) => {
    const cases = await searchAllCourts(partyName, role, courts);
    const dockets = await Promise.all(cases.map((c) => getDocket(c.caseId)));
    const report = {
      totalCases: cases.length,
      activeCases: cases.filter((c) => c.status === "open"),
      dockets,
      competitiveAnalysis: analyzePartyHistory(cases),
    };
    return { content: [{ type: "text", text: JSON.stringify(report) }] };
  },
);

第 11 部分:代理式多步骤研究模式

深度法律研究工作流

以类似代理的行为执行复杂研究任务:

Research request:
"My client is negotiating a software licensing agreement
with a major tech company. Research the landscape of:
1. Recent software licensing disputes
2. Key contract provisions courts scrutinize
3. Best practices from firm precedents
4. Relevant patent litigation affecting licensing
5. Synthesize into deal negotiation memo"

Assistant agent workflow:
Step 1: Research Phase
  - Query Midpage for software licensing cases (last 5 years)
  - Extract critical issues from leading cases

Step 2: Precedent Phase
  - Search SharePoint for firm's prior licensing agreements
  - Extract successful clause language
  - Identify deal-breaker provisions by client type

Step 3: Patent Phase
  - Search Google Patents for relevant technology patents
  - Identify software licensing implications
  - Flag cross-license requirements

Step 4: Synthesis Phase
  - Organize findings by provision (IP ownership, liability, etc.)
  - Cross-reference case law to deal terms
  - Generate risk assessment matrix

Step 5: Deliverable Phase
  - Create negotiation memo with:
    * Market landscape summary
    * Key case takeaways
    * Recommended provisions
    * Risk mitigation strategies

多来源综合分析

用于跨来源协同研究的配置:

{
  "mcpServers": {
    "midpage": { },
    "sharepoint": { },
    "google-patents": {
      "command": "npx",
      "args": ["-y", "google-patents-mcp"]
    },
    "courtlistener": { }
  },
  "research_workflows": {
    "licensing_negotiation": {
      "sources": ["midpage", "sharepoint", "google-patents"],
      "steps": [
        "search_cases",
        "extract_precedents",
        "patent_analysis",
        "synthesize_findings"
      ],
      "output_format": "negotiation_memo"
    }
  }
}

研究计划生成

用于自动研究规划的工作流:

User: "I need to understand California's position on
non-compete agreements in employment contracts.
What should I research?"

Assistant research planner:
"I'll develop a research plan covering:

Phase 1: Controlling Authority
  - California Supreme Court cases on non-competes
  - Test: Is non-compete reasonable? (Blue Pencil doctrine)
  - Key cases: Silguero, Edwards, Morbi

Phase 2: Legislature Response
  - California Business & Professions Code § 16600
  - Legislative amendments (2024 updates)
  - Statutory interpretation

Phase 3: Modern Applications
  - Recent Court of Appeal decisions (2023-2025)
  - Non-compete vs. non-solicitation distinction
  - Remote work implications

Phase 4: Practical Synthesis
  - Enforceable provisions despite § 16600
  - Trade secret protection alternatives
  - Employment agreement drafting best practices

Estimated research time: 2-3 hours
Key sources: Midpage, Clio firm memos, Bar Association guidance"

迭代优化

构建可在每次迭代中不断改进的研究工作流:

# research_refinement_pattern.py
research_iteration = {
    "initial_query": "California non-compete enforceability",
 
    "iteration_1": {
        "findings": "Initial results show non-competes generally unenforceable",
        "questions_raised": [
            "What about legitimate business interests exception?",
            "How does this apply to C-suite executives?",
            "Recent trends in remote work?"
        ]
    },
 
    "iteration_2": {
        "refined_searches": [
            "California non-compete exceptions legitimate business interests",
            "Non-compete enforcement executive employment contracts",
            "Non-compete non-solicitation remote work 2024"
        ],
        "new_findings": "Narrow exceptions for limited legitimate interests",
        "additional_questions": [
            "What qualifies as legitimate business interest?",
            "How do courts balance employee freedom with employer protection?"
        ]
    },
 
    "iteration_3": {
        "targeted_research": [
            "California Business Code § 16600 case law interpretation",
            "Blue pencil doctrine in non-compete context",
            "Employer strategic alternatives to non-competes"
        ],
        "synthesis": "Actionable guidance for client"
    }
}

第 12 部分:判例法分析解读

法官行为分析

集成司法分析以支持诉讼策略:

Query: "Judge Smith handles patent licensing disputes
in the Northern District of California. What patterns
can I identify in her decisions?"

Analytics workflow:
1. Search RECAP for all Judge Smith cases
2. Extract relevant patent licensing decisions
3. Analyze patterns:
   - Grant rate on summary judgment motions
   - Treatment of injunction requests
   - Damages awards (high/low/reasonable)
   - Attitude toward expert witnesses
4. Compare to district averages
5. Generate litigation strategy recommendations

司法分析配置

{
  "mcpServers": {
    "judicial-analytics": {
      "command": "npx",
      "args": ["-y", "judicial-analytics-mcp"],
      "tools": [
        "judge_profile",
        "decision_patterns",
        "motion_grant_rates",
        "remedy_analysis",
        "compare_judges"
      ],
      "env": {
        "RECAP_API": "api-key",
        "COURTLISTENER_API": "api-key"
      }
    }
  }
}

律师表现数据

跟踪对方律师的行为模式:

Workflow: Opposing Counsel Analysis

For: Attorney Jane Doe (plaintiff's counsel)

Metrics extracted:
- Settlement rate: 45% (vs. district average 52%)
- Trial win rate: 62% (favorable)
- Average verdict: $1.2M (high-value cases)
- Expert witness preferences: Specific firms used repeatedly
- Motion practice: Aggressive discovery requests
- Deposition style: Confrontational

Strategic implications:
- Prepare for aggressive discovery
- Expect push to trial
- May be open to structured settlements
- Anticipated expert witnesses based on historical patterns

结果预测模式

机器学习辅助的结果预测:

Query: "Predict the likely outcome of our employment
discrimination case with Judge Smith in NDCA."

Analysis:
1. Historical data: Judge Smith's discrimination cases
2. Factors: Strength of evidence, damages, settlement history
3. Prediction: 65% chance of plaintiff success in trial
4. Outcome distribution:
   - Summary judgment win (defendant): 20%
   - Trial win (defendant): 15%
   - Trial win (plaintiff): 45%
   - Settlement: 20%
5. Median award if plaintiff prevails: $850,000
6. Confidence interval: +/- $300,000

和解区间分析

基于数据的和解估值:

// settlement-analytics-mcp.js
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";
 
const server = new McpServer({ name: "settlement-analytics", version: "1.0.0" });
 
server.registerTool(
  "predict_settlement_range",
  {
    description: "Analyze historical settlements for range prediction",
    inputSchema: {
      caseType: z.string().describe("Employment, IP, contract, etc."),
      jurisdiction: z.string(),
      judge: z.string(),
      damages: z.number().describe("Claimed damages"),
    },
  },
  async ({ caseType, jurisdiction, judge, damages }) => {
    const historicalCases = await searchSimilarCases(caseType, jurisdiction, judge);
    const settlementRates = analyzeSettlements(historicalCases);
    const predictedRange = calculateRange(damages, settlementRates, judge);
    const output = {
      predictedLowRange: predictedRange.low,
      predictedMidRange: predictedRange.mid,
      predictedHighRange: predictedRange.high,
      confidence: predictedRange.confidence,
      comparableCases: historicalCases.slice(0, 5),
    };
    return { content: [{ type: "text", text: JSON.stringify(output) }] };
  },
);

第 13 部分:与企业级解决方案的比较

通用助手 + MCP 与 Harvey 集成

方面通用助手 + MCPHarvey
设置自行搭建或简单配置供应商托管
自定义能力完全控制有限
研究来源自行选择Harvey 选定来源
文档管理可连接任意系统仅 Harvey Vault
定价模式按工具/服务混合计费一体化企业合同
维护由你管理由 Harvey 管理

何时选择各自方案

在以下情况下选择通用助手 + MCP

  • 你希望控制集成方式
  • 成本是重要因素
  • 你有可用于设置的 IT 资源
  • 你使用非标准工具

在以下情况下选择 Harvey/Legora

  • 你希望获得开箱即用的解决方案
  • 需要企业级支持
  • 预算允许较高定价
  • 你需要供应商承担责任

现在就做

  • 将 Midpage 或 CourtListener 连接到你的助手(第 2 或第 3 部分)
  • 运行一次判例法检索,并确认引文带有研究来源标签
  • 使用 citator 核验一条引文是否仍然是有效法律
  • 尝试一个多来源研究任务(例如,判例法 + 律所文档)
  • 为你的团队记录你的设置

相关内容


快速参考:按来源分类的研究提示词

这些提示词假设已连接所述来源的连接器;如果没有,助手应明确说明,而不是猜测。

Midpage

Search for [topic] cases in [jurisdiction]
Verify citation [citation] is still good law
Find cases that cite [case name]
Check if [case] has been overruled or limited

CourtListener

Search CourtListener for [query]
Get full text of [case citation]
Find oral arguments in [case]
Search by judge: [judge name] in [court]

立法与监管

Search Congress for bills matching [criteria]
Track amendments to [statute] by year
Compare versions of [bill] across sessions
Search Federal Register for [regulation changes]
Monitor bills in [state legislature] related to [topic]

法院记录

Search PACER for cases involving [party name]
Get docket for [case number] in [court]
Set alert for filings in [case number]
Search RECAP for [party] across all federal courts
Find all cases by Judge [judge name]

引文核验

Verify citation [citation] is still good law
Check Shepard's for [case]: positive/negative treatment
Find alternative authorities for [proposition]
Validate citation format for [citation] (Bluebook/ALWD)

文档管理

Search [system] for documents matching [criteria]
Retrieve document [name/ID] from [location]
List recent documents in [workspace/folder]

分析与洞察

Analyze Judge [judge name] decision patterns for [case type]
Predict settlement range for [case type] before Judge [judge]
Compare outcome patterns for opposing counsel [attorney name]
Calculate motion grant rates for [judge] on [motion type]

来源

Claude

OpenAI

协议和研究来源

延伸阅读


← Previous: Legal Plugin | Next: Cowork Automation →

On this page

1 学习目标2 第 1 部分:理解法律场景中的 MCP2.1 什么是 MCP?2.2 为什么 MCP 对法律工作很重要2.3 已核实的连接器和 MCP 服务器3 第 2 部分:设置判例法研究连接器(Midpage)3.1 Midpage 提供什么3.2 集成优势4 第 3 部分:设置 CourtListener(免费替代方案)4.1 CourtListener 提供什么4.2 CourtListener 与 Midpage 对比5 第 4 部分:文档管理集成5.1 MCP TypeScript 栈(2026 年 2 月更新)5.2 选项 A:连接已存在的连接器5.3 选项 C:通过自定义 MCP 服务器连接 iManage6 第 5 部分:构建法律研究工作流6.1 工作流 1:全面法律研究6.2 工作流 2:合同 + 研究集成6.3 工作流 3:尽职调查研究7 第 6 部分:高级 MCP 配置7.1 运行多个服务器并设置作用域7.2 调试连接8 第 7 部分:安全注意事项8.1 数据流8.2 安全最佳实践9 第 8 部分:法规研究工作流9.1 立法追踪集成9.2 法规版本比较9.3 监管法规检索9.4 法案追踪工作流10 第 9 部分:引文核验流程10.1 自动化引文核查10.2 有效法律核验系统10.3 Shepardizing/KeyCiting 等效方法10.4 引文格式校验11 第 10 部分:法院记录提醒设置11.1 实时案件提交提醒11.2 850M+ 记录检索模式11.3 案卷监控11.4 基于当事人的跟踪12 第 11 部分:代理式多步骤研究模式12.1 深度法律研究工作流12.2 多来源综合分析12.3 研究计划生成12.4 迭代优化13 第 12 部分:判例法分析解读13.1 法官行为分析13.2 律师表现数据13.3 结果预测模式13.4 和解区间分析14 第 13 部分:与企业级解决方案的比较14.1 通用助手 + MCP 与 Harvey 集成14.2 何时选择各自方案15 现在就做16 相关内容17 快速参考:按来源分类的研究提示词17.1 Midpage17.2 CourtListener17.3 立法与监管17.4 法院记录17.5 引文核验17.6 文档管理17.7 分析与洞察18 来源19 延伸阅读