Baymax - Legal Research Synthesis Tool
Zero hallucination. Pure extraction.
Baymax is a powerful MCP server for Claude Desktop that provides extraction-based legal research tools. Unlike AI that generates or summarizes, Baymax extracts actual text from cases - holdings, rules, facts, and procedural posture - with full citations.
Quick Start (5 minutes)
Step 1: Install Python Dependencies
cd "path/to/baymax"
pip install -r requirements.txt
Step 2: Configure Claude Desktop
Add Baymax to your Claude Desktop config file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"baymax": {
"command": "python",
"args": ["C:/path/to/baymax/citation_mcp_text_based.py"]
}
}
}
Replace the path with your actual installation location.
Step 3: Restart Claude Desktop
Close and reopen Claude Desktop. You should see "baymax" in your MCP servers.
Step 4: Start Using
Just ask Claude:
- "Brief this case for me" (paste case text)
- "Extract the holding from Brady v. Maryland"
- "Synthesize the rules across these three cases"
- "Generate a parenthetical for this case"
Features
Core Extraction Tools
| Tool | Description |
|---|---|
extract_citation |
Parse case names and citations from text |
extract_rules |
Extract holdings, standards, elements, and factors |
extract_case_facts |
Extract procedural posture, key facts, and outcome |
generate_parenthetical |
Create properly formatted case parentheticals |
build_citation_string |
Format citations with signals and pin cites |
Workflow Tools (One-Click Analysis)
| Tool | Description |
|---|---|
brief_this_case |
Complete case briefing - facts, rules, holding, parenthetical |
synthesize_rules |
Multi-case rule synthesis with hierarchy |
validate_brief |
Check brief for citation errors and unsupported assertions |
Research Tools
| Tool | Description |
|---|---|
find_similar_holdings |
Match arguments to case holdings |
suggest_signals |
Recommend citation signals based on context |
analyze_argument_strength |
Evaluate supporting authority strength |
Deposition Tools
| Tool | Description |
|---|---|
ingest_deposition |
Parse transcript into searchable Q&A entries |
search_deposition |
Find testimony by keyword, topic, or citation |
validate_facts_against_record |
Check statement of facts against depositions |
Installation Options
Basic (MCP Server Only)
pip install mcp
Recommended (With PDF Support)
pip install mcp PyPDF2 pdfplumber python-docx
Full Install (All Features)
pip install -r requirements.txt
Optional: Web UI
Baymax includes a web interface for drag-and-drop case analysis:
pip install flask
python web_app.py
# Open http://127.0.0.1:5000
Usage Examples
Brief a Case
User: Brief this case for me:
[paste case text]
Claude: Uses brief_this_case tool...
CASE BRIEF: Brady v. Maryland
=============================
CITATION: 373 U.S. 83 (1963)
PROCEDURAL POSTURE:
Certiorari to the Court of Appeals of Maryland
KEY FACTS:
- Petitioner and companion were convicted of murder
- Companion admitted the actual killing
- Prosecution withheld companion's confession
HOLDING:
The suppression by the prosecution of evidence favorable
to an accused upon request violates due process where the
evidence is material either to guilt or to punishment.
PARENTHETICAL:
(holding that prosecution's suppression of evidence
favorable to accused violates due process when material
to guilt or punishment)
Synthesize Rules Across Cases
User: Synthesize the qualified immunity rules from these cases:
[paste 3 case texts]
Claude: Uses synthesize_rules tool...
RULE SYNTHESIS: Qualified Immunity
==================================
MASTER RULE:
Government officials are entitled to qualified immunity
unless their conduct violated clearly established law.
ELEMENTS:
1. Whether the facts show a constitutional violation
2. Whether the right was clearly established at the time
3. Whether a reasonable official would have known
SOURCES: Harlow v. Fitzgerald, Saucier v. Katz, Pearson v. Callahan
Validate a Brief
User: Check this brief section for problems:
[paste brief section]
Claude: Uses validate_brief tool...
VALIDATION REPORT
=================
CITATIONS: 5 found, 4 valid
ISSUES:
[!] "Smith v. Jones, 123 F.3d 456" - citation format error
[!] Assertion on page 3 lacks supporting authority
[!] Signal "see" may be incorrect - consider "see also"
SUGGESTIONS:
- Add pin cite for block quote from Johnson v. State
- Consider distinguishing adverse authority on element 2
Requirements
- Python 3.9+
- Claude Desktop with MCP support
- Optional: Tesseract OCR (for scanned PDFs)
- Optional: Poppler (for PDF-to-image conversion)
File Structure
baymax/
├── citation_mcp_text_based.py # MCP server (main entry point)
├── brief_synthesis.py # Parentheticals, synthesis
├── enhanced_rules.py # Rule/holding extraction
├── extraction_validation.py # Validation tools
├── workflows.py # Workflow orchestration
├── deposition_tools.py # Deposition processing
├── web_app.py # Optional web UI
├── templates/
│ └── index.html # Web UI template
├── requirements.txt # Python dependencies
├── pyproject.toml # Package configuration
└── README.md # This file
Troubleshooting
"MCP server not connecting"
- Check the path in
claude_desktop_config.jsonis correct - Ensure Python is in your PATH
- Try running
python citation_mcp_text_based.pydirectly to see errors
"Module not found"
pip install mcp
"PDF extraction not working"
pip install PyPDF2 pdfplumber
"DOCX export not working"
pip install python-docx
How It Works
Baymax uses pattern-based extraction - not AI generation. Every piece of text returned is extracted directly from the source document using legal-specific regex patterns:
- Holdings: Patterns like "We hold that...", "The court held..."
- Rules: "Under [standard], a party must..."
- Facts: Procedural posture, party actions, key events
- Elements: Numbered lists, "requires that" constructions
This means:
- No hallucination - only text from your documents
- Verifiable - check every extraction against the source
- Citation-ready - formatted for immediate use
License
MIT License - Free for personal and professional use.
Contributing
Issues and PRs welcome at the project repository.
Baymax - Extraction-based legal research synthesis for Claude Desktop.
Metadata
Release files for baymax-legal 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| baymax_legal-1.0.0.tar.gz | 243.0 kB | Without provenance | Details for baymax_legal-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| baymax_legal-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for baymax_legal-1.0.0-py3-none-any.whl |
Total release size: 495.6 kB
Release files / baymax_legal-1.0.0.tar.gz
| Download URL | baymax_legal-1.0.0.tar.gz |
|---|---|
| Size | 243.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ab0de7362990f0b04d5782e6890ff02fb733059d25a2e2fd06c4d33b01c5773
|
|
BLAKE2b-256 checksum How to use checksums |
84c4da3c7a304b2c077d2da88897bcdf20443546a130ead78537275bfccc6da2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / baymax_legal-1.0.0-py3-none-any.whl
| Download URL | baymax_legal-1.0.0-py3-none-any.whl |
|---|---|
| Size | 252.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b07eefa1a5075a480734c5647cd1f123deeb4bf7278ac4e4963fd16e163d93c0
|
|
BLAKE2b-256 checksum How to use checksums |
4aa47c6dd838071d04dea96922f663fe5c07ab9740666d727c57c60b1464a243
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for baymax-legal 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.