Cerebra Legal MCP Server

Cerebra Legal MCP Server

mcp-cerebra-legal-server•byyoda-digital

An MCP server for legal reasoning and analysis that provides structured legal thinking, domain-specific follow-up questions, and formatted legal completion results.

License: MIT•Runtime: Awaiting documentation review•Category: ai agents-models

WHAT IT DOES

  • •Provides a structured legal_think tool that supports step-by-step legal analysis with feedback on reasoning quality.
  • •Automatically detects legal domains such as ANSC contestation, consumer protection, and contract analysis, offering tailored guidance and templates.
  • •Includes a legal_ask_followup_question tool that formats legal questions and suggests domain-specific options.
  • •Includes a legal_attempt_completion tool that structures results and formats legal citations into a professional legal document format.

BEST FOR

  • •Analyzing public procurement contestations, such as ANSC contestations about overly restrictive tender specifications.
  • •Gathering missing information during legal analysis through domain-aware follow-up questions.
  • •Producing final legal analysis write-ups with organized sections and formatted citations.

ABOUT MCP-CEREBRA-LEGAL-SERVER

Cerebra Legal MCP Server is cataloged as an MCP server attributed to yoda-digital. An MCP server for legal reasoning and analysis that provides structured legal thinking, domain-specific follow-up questions, and formatted legal completion results. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Cerebra Legal MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Which legal domains does the server detect automatically?

It detects domains including ANSC contestation, consumer protection, and contract analysis.

Can previous legal reasoning steps be revised?

Yes, revision support allows reconsidering an earlier thought by specifying which thought number is being revised.

上游原版 README

在 GitHub 查看同一版本原文

README.md · b74d6796f72a · 采集于 2026-11-13 09:46:04 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Cerebra Legal MCP Server

An enterprise-grade MCP server for legal reasoning and analysis based on the "think" tool concept from Anthropic's engineering blog.

Overview

Cerebra Legal provides three powerful tools for legal reasoning and analysis:

  1. legal_think - A structured legal reasoning tool that helps analyze complex legal issues with domain-specific guidance and templates.
  2. legal_ask_followup_question - A specialized tool for asking follow-up questions in legal contexts with domain-specific options.
  3. legal_attempt_completion - A tool for presenting legal analysis results with proper structure and citation formatting.

The server automatically detects legal domains (ANSC contestation, consumer protection, contract analysis) and provides domain-specific guidance, templates, and feedback.

Features

  • Domain Detection: Automatically identifies the legal domain of the analysis
  • Domain-Specific Guidance: Provides tailored guidance for different legal domains
  • Structured Templates: Offers domain-specific templates for legal analysis
  • Citation Formatting: Properly formats legal citations
  • Thought Quality Analysis: Provides feedback on legal reasoning quality
  • Revision Support: Allows for revising previous thoughts

Installation

# 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

Usage

Running the Server

npm start

Testing the Server

The repository includes a test client that demonstrates how to interact with the server:

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

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

The test client will:

  1. Start the server
  2. Send a tools/list request to get available tools
  3. Send a legal_think request with a sample thought
  4. Display the server's responses

Adding to Claude

To add the server to Claude, update your MCP settings file with the following configuration:

For VSCode Extension

Edit the file at ~/.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": []
    }
  }
}

For Claude Desktop App

Edit the file at ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent on your platform:

{
  "mcpServers": {
    "cerebra-legal": {
      "command": "node",
      "args": ["/path/to/mcp-cerebra-legal-server/build/index.js"],
      "disabled": false,
      "alwaysAllow": []
    }
  }
}

Using the Tools in Claude

Once the server is added to Claude, you can use the tools in your conversations:

System Prompt Integration

For optimal AI interaction with these legal tools, it's essential to include proper guidance in the system prompt. These tools follow the same AI → Human interaction model as standard Cline tools but with domain-specific enhancements.

The system prompt should include detailed documentation for each tool:

## 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>

This guidance ensures the AI understands:

  1. These are specialized versions of standard tools
  2. They maintain the same AI → Human interaction flow
  3. They have additional capabilities and parameters
  4. How to properly format the tool calls

Without this guidance, the AI might not fully leverage the domain-specific capabilities built into these tools.

The legal_think tool helps you analyze complex legal issues with structured thinking:

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

Claude will use the legal_think tool to:

  • Detect the legal domain (ANSC contestation)
  • Provide domain-specific guidance
  • Offer a structured template for analysis
  • Give feedback on the quality of legal reasoning
  • Support revision of previous thoughts

When Claude needs more information to complete a legal analysis:

What specific provisions of the technical specifications are being challenged?

Claude will use the legal_ask_followup_question tool to:

  • Format the question with appropriate legal terminology
  • Provide domain-specific options for the user to choose from
  • Detect the legal domain for context-aware questioning

When Claude is ready to present the final legal analysis:

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 will use the legal_attempt_completion tool to:

  • Format the conclusion with proper legal structure
  • Extract and format legal citations
  • Organize the analysis into clear sections
  • Provide a professional legal document format

Tool Input Schemas

{
  "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
}
{
  "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
}
{
  "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
}

Architecture

The server is built with a modular architecture:

  • Domain Detector: Identifies the legal domain of the analysis
  • Legal Knowledge Base: Provides domain-specific guidance and templates
  • Citation Formatter: Formats legal citations properly
  • Tool Implementations: Handles the logic for each tool

Development

Project Structure

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

Building

npm run build

Testing

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

Repository

This project is available on GitHub at: https://github.com/yoda-digital/mcp-cerebra-legal-server

References

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Cerebra Legal MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-cerebra-legal-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related ai agents-models MCP Servers

Alternative and complementary servers in the same category

View all in ai agents-models →
Knowledge Graph Memory
@modelcontextprotocol/server-memory•Model Context Protocol

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

create_entitiescreate_relationsadd_observations+6 more
92K
AI & Multi-Agent
Sequential Thinking
@modelcontextprotocol/server-sequential-thinking•Model Context Protocol

Organize problem solving into revisable, branching thought steps through an MCP tool.

sequential_thinking
92K
AI & Multi-Agent

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.

146
AI & Multi-Agent