mcpField
C
Cerebra Legal MCP Server

Cerebra Legal MCP Server

ローカル
github.com/yoda-digital法務・行政3383 週間前に更新

Cerebra Legal MCP Server について

Cerebra Legal MCP サーバーは、Anthropic のエンジニアリングブログで紹介された "think" ツールの考え方に基づく、構造化された法的推論と分析のための MCP サーバーです。法的問題を段階的に分析したい利用者を対象としています。法律分野を自動検出し、分野ごとのガイダンスとテンプレートを提供します。

主な機能

  1. 01法律分野の自動検出(ANSC 異議、消費者保護、契約分析など)
  2. 02分野別のガイダンスとテンプレート
  3. 03法律引用の書式整形
  4. 04推論品質に関するフィードバック
  5. 05過去の推論ステップの修正

活用シーン

  1. 01公共調達の異議申し立てに関する分析手順の整理
  2. 02特定の契約条項について後続の質問を行う
  3. 03結論を引用付きの構造化文書にまとめる

MCP 対応

本プロジェクトは MCP サーバーであり、MCP クライアントに legal_think、legal_ask_followup_question、legal_attempt_completion の 3 つのツールを公開します。

設定

ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。

インストール方法は未掲載です

このサーバーのパッケージやリモートエンドポイントはまだ取得できていません。プロジェクトの README の手順に従ってください。

リポジトリ

ツール

ツール一覧はまだ取得されていません

ローカルサーバーのツールはマシン上で起動して初めて取得できます。メンテナーはまだツール一覧を提供していません。

詳細

Cerebra Legal MCP サーバー

Anthropicのエンジニアリングブログの「think」ツールのコンセプトに基づく、エンタープライズグレードの法的推論・分析用 MCP サーバーです。

概要

Cerebra Legal は、法的推論・分析のための強力なツールを3つ提供します。

  1. legal_think - ドメイン固有のガイダンスとテンプレートを使用して、複雑な法的問題の分析を支援する、構造化された法的推論ツールです。
  2. legal_ask_followup_question - 法的な文脈で、ドメイン固有の選択肢を用いて追加の質問をするための専用ツールです。
  3. legal_attempt_completion - 適切な構成と引用形式で法的分析の結果を提示するツールです。

サーバーは法的領域(ANSCへの異議申し立て、消費者保護、契約分析)を自動的に検出し、領域固有のガイダンス、テンプレート、フィードバックを提供します。

機能

  • 領域の検出:分析対象の法的領域を自動的に特定します
  • 領域固有のガイダンス:さまざまな法的領域に合わせたガイダンスを提供します
  • 構造化されたテンプレート:法的分析のための領域固有のテンプレートを提供します
  • 引用形式:法的引用を適切な形式に整えます
  • 思考の品質分析:法的推論の品質に関するフィードバックを提供します
  • 修正のサポート:以前の思考を修正できます

インストール

# Clone the repository
git clone https://github.com/yoda-digital/mcp-cerebra-legal-server.git
cd mcp-cerebra-legal-server

# Install dependencies
npm install

# Build the project
npm run build

使用方法

サーバーの実行
npm start
サーバーのテスト

リポジトリには、サーバーとのやり取りの方法を示すテストクライアントが含まれています。

# Make the test client executable
chmod +x test-client.js

# Run the test client
./test-client.js

テストクライアントは次の処理を行います。

  1. サーバーを起動します
  2. 利用可能なツールを取得するため、tools/list リクエストを送信します
  3. サンプルの思考を含む legal_think リクエストを送信します
  4. サーバーからの応答を表示します
Claude への追加

サーバーを Claude に追加するには、MCP 設定ファイルを次の構成で更新します。

VSCode 拡張機能の場合

~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json にあるファイルを編集します。

{
  "mcpServers": {
    "cerebra-legal": {
      "command": "node",
      "args": ["/path/to/mcp-cerebra-legal-server/build/index.js"],
      "disabled": false,
      "alwaysAllow": []
    }
  }
}
Claude Desktop アプリの場合

~/Library/Application Support/Claude/claude_desktop_config.json にあるファイル(macOSの場合)またはお使いのプラットフォームに対応するファイルを編集します。

{
  "mcpServers": {
    "cerebra-legal": {
      "command": "node",
      "args": ["/path/to/mcp-cerebra-legal-server/build/index.js"],
      "disabled": false,
      "alwaysAllow": []
    }
  }
}
Claude でのツールの使用

サーバーを Claude に追加すると、会話の中でツールを使用できます。

システムプロンプトへの統合

これらの法的ツールを AI と最適に連携させるには、システムプロンプトに適切なガイダンスを含めることが重要です。これらのツールは、標準的な Cline ツールと同じ AI → Human の対話モデルに従いますが、領域固有の機能が追加されています。

システムプロンプトには、各ツールの詳細なドキュメントを含める必要があります。

## legal_think
Description: A structured legal reasoning tool that helps analyze complex legal issues with domain-specific guidance and templates. This tool enables step-by-step legal analysis with feedback on reasoning quality.

Parameters:
- thought: (required) The current legal reasoning step
- thoughtNumber: (required) Current thought number in sequence
- totalThoughts: (required) Estimated total thoughts needed
- nextThoughtNeeded: (required) Whether another thought step is needed
- category: (optional) Legal domain category (auto-detected if not provided)
- references: (optional) Array of legal references
- isRevision: (optional) Whether this revises previous thinking
- revisesThoughtNumber: (optional) Which thought is being reconsidered
- requestGuidance: (optional) Whether to request domain-specific guidance
- requestTemplate: (optional) Whether to request a domain-specific template

Usage:
<legal_think>
<thought>Your legal reasoning step here</thought>
<thoughtNumber>Current thought number</thoughtNumber>
<totalThoughts>Estimated total thoughts</totalThoughts>
<nextThoughtNeeded>true or false</nextThoughtNeeded>
<category>Legal domain (optional)</category>
<references>Array of references (optional)</references>
<isRevision>true or false (optional)</isRevision>
<revisesThoughtNumber>Thought number being revised (optional)</revisesThoughtNumber>
<requestGuidance>true or false (optional)</requestGuidance>
<requestTemplate>true or false (optional)</requestTemplate>
</legal_think>

## legal_ask_followup_question
Description: Ask the user a legal domain-specific question to gather additional information needed to complete the task. This tool enhances the standard ask_followup_question with legal domain detection, terminology formatting, and domain-specific suggested options.

Parameters:
- question: (required) The question to ask the user. This will be automatically enhanced with appropriate legal terminology.
- options: (optional) An array of 2-5 options for the user to choose from. If not provided, domain-specific options will be automatically suggested.
- context: (optional) Additional context to help with domain detection and question formatting.

Usage:
<legal_ask_followup_question>
<question>Your question here</question>
<options>
Array of options here (optional), e.g. ["Option 1", "Option 2", "Option 3"]
</options>
<context>Additional context to help with domain detection (optional)</context>
</legal_ask_followup_question>

## legal_attempt_completion
Description: Present the result of your work to the user with proper legal structure and formatting. This tool enhances the standard attempt_completion with legal domain detection, document structuring, and citation formatting.

Parameters:
- result: (required) The result of the task. This will be automatically formatted with proper legal structure.
- command: (optional) A CLI command to execute to show a live demo of the result to the user.
- context: (optional) Additional context to help with domain detection and result formatting.

Usage:
<legal_attempt_completion>
<result>
Your final result description here
</result>
<command>Command to demonstrate result (optional)</command>
<context>Additional context to help with domain detection (optional)</context>
</legal_attempt_completion>

このガイダンスにより、AI は次のことを理解できます。

  1. これらが標準ツールの専用バージョンであること
  2. 同じ AI → Human の対話フローを維持していること
  3. 追加の機能とパラメーターを備えていること
  4. ツール呼び出しを適切に形式化する方法

このガイダンスがないと、AI はこれらのツールに組み込まれた領域固有の機能を十分に活用できない可能性があります。

1. legal_think の使用

legal_think ツールは、構造化された思考を用いて複雑な法的問題を分析するのに役立ちます。

I need to analyze an ANSC contestation where a claimant argues that technical specifications in a tender were too restrictive.

Claude は legal_think ツールを使用して、次のことを行います。

  • 法的領域(ANSCへの異議申し立て)を検出します
  • 領域固有のガイダンスを提供します
  • 分析用の構造化されたテンプレートを提示します
  • 法的推論の品質についてフィードバックを提供します
  • 以前の思考の修正をサポートします
2. legal_ask_followup_question の使用

法的分析を完了するために追加情報が必要な場合、Claude は次のようにします。

What specific provisions of the technical specifications are being challenged?

Claude は legal_ask_followup_question ツールを使用して、次のことを行います。

  • 適切な法的用語を使って質問を形式化します
  • ユーザーが選択できる領域固有の選択肢を提示します
  • 文脈に応じた質問をするため、法的領域を検出します
3. legal_attempt_completion の使用

Claude が最終的な法的分析を提示する準備ができたら:

Based on my analysis, the technical specifications requiring "minimum 5 years experience" appear disproportionate and likely violate Article 33(2) of Law 131/2015 on public procurement.

Claude は legal_attempt_completion ツールを使用して、以下を行います。

  • 結論を適切な法的構成で整える
  • 法的引用を抽出して書式を整える
  • 分析を明確なセクションに整理する
  • 専門的な法的文書の形式で提示する
ツールの入力スキーマ
legal_think
{
  "thought": "Analyzing ANSC contestation where claimant argues technical specifications were too restrictive.",
  "thoughtNumber": 1,
  "totalThoughts": 5,
  "nextThoughtNeeded": true,
  "category": "ansc_contestation",  // Optional, auto-detected if not provided
  "references": ["Law 131/2015", "ANSC Decision #12345"],  // Optional
  "isRevision": false,  // Optional
  "revisesThoughtNumber": null,  // Optional
  "requestGuidance": true,  // Optional
  "requestTemplate": true  // Optional
}
legal_ask_followup_question
{
  "question": "What specific provisions of the technical specifications are being challenged?",
  "options": [  // Optional, auto-generated if not provided
    "Are you challenging the experience requirements?",
    "Are you challenging the technical capacity requirements?",
    "Are you challenging the financial requirements?",
    "Are you challenging the certification requirements?"
  ],
  "context": "ANSC contestation regarding procurement of IT equipment"  // Optional
}
legal_attempt_completion
{
  "result": "Based on the analysis of ANSC contestation #12345, the technical specifications requiring 'minimum 5 years experience' appear disproportionate and likely violate Article 33(2) of Law 131/2015 on public procurement.",
  "command": null,  // Optional
  "context": "ANSC contestation analysis"  // Optional
}

アーキテクチャ

このサーバーはモジュール式のアーキテクチャで構築されています。

  • ドメイン検出器:分析の法的領域を特定します
  • 法的ナレッジベース:領域固有のガイダンスとテンプレートを提供します
  • 引用フォーマッター:法的引用を適切に書式設定します
  • ツールの実装:各ツールのロジックを処理します

開発

プロジェクト構成
mcp-cerebra-legal-server/
├── src/
│   ├── shared/           # Shared components
│   │   ├── DomainDetector.ts
│   │   ├── LegalKnowledgeBase.ts
│   │   ├── CitationFormatter.ts
│   │   └── types.ts
│   ├── tools/            # Tool implementations
│   │   ├── LegalThinkTool.ts
│   │   ├── LegalAskFollowupQuestionTool.ts
│   │   └── LegalAttemptCompletionTool.ts
│   ├── utils/            # Utilities
│   │   └── logger.ts
│   └── index.ts          # Main server entry point
├── build/                # Compiled JavaScript
├── test-client.js        # Test client
├── package.json
└── tsconfig.json
ビルド
npm run build
テスト
# Run the test client
./test-client.js

リポジトリ

このプロジェクトは GitHub で公開されています。 https://github.com/yoda-digital/mcp-cerebra-legal-server

参考資料

ライセンス

MIT

コメント

MCP は初めてですか?

プロトコルの概要から最初のサーバーの導入まで、よくある疑問にまとめて答えます。

AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。