Skip to content

fedec65/BetterCallClaudeMCP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BetterCallClaudeMCP

Swiss Legal Intelligence Framework for Claude Desktop & Claude Cowork

Version MCP License Cantons


πŸ“‹ Overview

BetterCallClaudeMCP is a Model Context Protocol (MCP) implementation that brings the BetterCallClaude Swiss Legal Intelligence Framework to Claude Desktop and Claude Cowork. It provides Swiss lawyers with powerful legal research, citation management, case strategy, document drafting, and multi-agent workflow capabilities.

Key Features

Feature Description
πŸ” Legal Research Search Swiss federal and cantonal court decisions
πŸ“ Citation Management Validate, format, and parse Swiss legal citations
βš–οΈ Case Strategy Risk assessment and litigation planning
πŸ“„ Document Drafting Generate legal documents with proper formatting
πŸ€– 17 Specialized Agents Domain-specific legal expertise
πŸ”„ 5 Multi-Agent Workflows Complex legal task orchestration
🌍 Multi-Lingual Full support for DE, FR, IT, EN
πŸ›οΈ 26 Swiss Cantons Complete cantonal coverage

πŸš€ Quick Start

Installation

# Install via npm (recommended)
npx -y bettercallclaude-mcp

# Or install globally
npm install -g bettercallclaude-mcp

Claude Desktop Configuration

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "legal-core": {
      "command": "npx",
      "args": ["-y", "bettercallclaude-mcp"]
    }
  }
}

Claude Cowork Configuration

{
  "mcpServers": {
    "legal-core": {
      "command": "npx",
      "args": ["-y", "bettercallclaude-mcp"]
    }
  }
}

Claude Code Configuration

# Add the MCP server
claude mcp add legal-core -- npx -y bettercallclaude-mcp

🎯 Core Commands

BetterCallClaudeMCP provides intuitive slash commands for legal work:

Command Purpose Example
/legal [query] Intelligent gateway - routes to appropriate agent /legal Art. 97 OR liability
/legal:research Search Swiss legal sources /legal:research BGE contractual liability
/legal:draft Draft legal documents /legal:draft employment contract
/legal:strategy Case strategy & risk analysis /legal:strategy commercial dispute
/doc:analyze Analyze documents for legal issues /doc:analyze @contract.pdf
/legal:federal Force Federal Law mode /legal:federal pension law
/legal:cantonal [code] Force cantonal law mode /legal:cantonal ZH property
/legal:help Show command reference /legal:help
/legal:version Show version information /legal:version

Command Parameters

Parameter Values Description
--lang de, fr, it, en Output language
--jurisdiction federal, canton codes Legal jurisdiction
--agent Agent name Force specific agent
--workflow Workflow name Execute multi-agent workflow
--format brief, detailed, memo Output format

πŸ€– Specialized Legal Agents

BetterCallClaudeMCP includes 17 specialized agents with domain-specific expertise:

Research & Analysis Agents

Agent Command Domain
Researcher --agent=researcher Precedent analysis, statutory research, BGE/ATF/DTF search
Strategist --agent=strategist Litigation strategy, case assessment, success probability
Risk Analyst --agent=risk-analyst Case outcome scoring, risk matrices, settlement valuation
Citation Specialist --agent=citation Citation validation, formatting, cross-reference verification

Drafting & Compliance Agents

Agent Command Domain
Drafter --agent=drafter Contracts, briefs, legal opinions, memoranda
Compliance Officer --agent=compliance FINMA regulations, AML/KYC, banking compliance
Data Protection --agent=data-protection GDPR, nDSG, privacy impact assessments

Specialized Practice Agents

Agent Command Domain
Fiscal Expert --agent=fiscal-expert Swiss tax law, DTAs, transfer pricing
Corporate --agent=corporate M&A, governance, corporate restructuring
Real Estate --agent=real-estate Property transactions, Grundbuch, construction law
Procedure Specialist --agent=procedure ZPO/StPO deadlines, procedural requirements
Cantonal Law Expert --agent=cantonal-law All 26 Swiss cantons, cantonal specifics

Support Agents

Agent Command Domain
Translator --agent=translator Legal translations DE/FR/IT/EN with terminology precision

Adversarial Analysis Agents

Agent Command Role
Advocate --agent=advocate Argues FOR a position
Adversary --agent=adversary Argues AGAINST a position
Judicial --agent=judicial Evaluates arguments impartially

Orchestration

Agent Command Function
Orchestrator --agent=orchestrator Coordinates multi-agent workflows

πŸ”„ Multi-Agent Workflows

Complex legal tasks can leverage coordinated multi-agent workflows:

Workflow Command Agent Chain Use Case
Due Diligence --workflow=due-diligence researcher β†’ corporate β†’ risk-analyst M&A transactions, corporate acquisitions
Litigation Prep --workflow=litigation-prep strategist β†’ researcher β†’ drafter Case preparation, court filings
Adversarial --workflow=adversarial advocate β†’ adversary β†’ judicial Argument stress-testing, position evaluation
Contract Lifecycle --workflow=contract-lifecycle drafter β†’ data-protection β†’ compliance Contract creation with compliance review
Real Estate Closing --workflow=real-estate-closing real-estate β†’ fiscal-expert β†’ drafter Property transactions with tax optimization

Workflow Example

# Execute due diligence workflow for an M&A transaction
/legal "Analyze target company Acme AG for acquisition" --workflow=due-diligence

# Output: Sequential analysis from researcher (legal standing, contracts),
# corporate (governance, structure), and risk-analyst (risk assessment, valuation)

πŸ› οΈ MCP Tools

Core Tools (6)

Tool Purpose Persona Behavior
legal_gateway Intelligent routing to appropriate function Auto-detection of intent, jurisdiction, language
legal_research Search precedents and statutes Legal Researcher with systematic methodology
legal_citation Validate, format, parse citations Citation Specialist with multi-lingual awareness
legal_strategy Case assessment and risk analysis Case Strategist with Swiss procedural expertise
legal_draft Generate legal documents Legal Drafter with proper formatting
legal_analyze Analyze existing documents Document Analyst with issue spotting

Tool Parameters

legal_research

Parameter Type Description
query string Search query
jurisdiction enum federal, cantonal, or canton code
date_from string Filter from date (YYYY-MM-DD)
date_to string Filter to date (YYYY-MM-DD)
language enum de, fr, it, en

legal_citation

Parameter Type Description
action enum validate, format, parse
citation string The citation to process
target_language enum Target language for formatting

legal_strategy

Parameter Type Description
case_facts string Description of case circumstances
dispute_amount number Amount in dispute (CHF)
jurisdiction enum Applicable jurisdiction

legal_draft

Parameter Type Description
document_type string Type of document to generate
case_facts string Relevant facts for the document
language enum Output language
jurisdiction enum Applicable jurisdiction

legal_analyze

Parameter Type Description
document_content string Document text to analyze
analysis_type enum risks, compliance, summary

🌍 Multi-Lingual Support

BetterCallClaudeMCP fully supports Switzerland's official languages plus English.

Language Detection

The system automatically detects input language based on:

  1. Explicit --lang parameter
  2. Citation format (BGE β†’ German, ATF β†’ French, DTF β†’ Italian)
  3. Query text analysis

Citation Language Mapping

German French Italian Description
BGE ATF DTF Federal Supreme Court
Art. art. art. Article
Abs. al. cpv. Paragraph
lit. let. lett. Letter
OR CO CO Code of Obligations
ZGB CC CC Civil Code
StGB CP CP Criminal Code
ZPO CPC CPC Civil Procedure Code
StPO CPP CPP Criminal Procedure Code

πŸ›οΈ Jurisdiction Support

Federal Law (Default)

  • Federal statutes (BV, ZGB, OR, StGB, etc.)
  • Bundesgericht decisions (BGE/ATF/DTF)
  • Federal administrative law

All 26 Swiss Cantons

Canton Code Languages Key Areas
ZΓΌrich ZH DE Corporate, M&A, Banking
Bern BE DE/FR Administrative, Public Law
Luzern LU DE Tax, Corporate
Uri UR DE Energy, Infrastructure
Schwyz SZ DE Tax Planning, Holding
Obwalden OW DE Tax, SME
Nidwalden NW DE Tax Optimization
Glarus GL DE Industrial
Zug ZG DE Crypto, Fintech, Holding
Fribourg FR FR/DE Agriculture, Education
Solothurn SO DE Industry, Manufacturing
Basel-Stadt BS DE Pharma, Life Sciences
Basel-Landschaft BL DE Pharma, Cross-border
Schaffhausen SH DE Industry, Cross-border
Appenzell Ausserrhoden AR DE SME, Tourism
Appenzell Innerrhoden AI DE Traditional Industries
St. Gallen SG DE Textiles, Banking
GraubΓΌnden GR DE/RM/IT Tourism, Energy
Aargau AG DE Industry, Energy
Thurgau TG DE Agriculture, Industry
Ticino TI IT Cross-border (Italy), Finance
Vaud VD FR MedTech, Olympics
Valais VS FR/DE Energy, Tourism
NeuchΓ’tel NE FR Watchmaking, MedTech
Genève GE FR Arbitration, Commodities, Int'l
Jura JU FR Watchmaking, Industry

πŸ“Š API Sources

BetterCallClaudeMCP integrates with public Swiss legal APIs:

API Purpose Rate Limit
Fedlex SPARQL Federal legislation 30/min
Bundesgericht Federal court decisions 20/min
Entscheidsuche Court decision search 30/min
BGE-Search MCP Targeted Federal Supreme Court search 20/min
Cantonal Courts All 26 cantonal court systems 20/min

Note: All APIs are publicly accessible and do not require authentication.


⚑ Performance

Caching

  • Type: In-memory LRU cache
  • Research TTL: 15 minutes
  • Citations TTL: 5 minutes
  • Max Entries: 1000

Rate Limiting

Built-in rate limiting prevents API overload:

  • Automatic request queuing
  • Exponential backoff on errors
  • Graceful degradation

Response Times

Operation Cached Uncached
Citation validation < 100ms < 1s
Simple search < 500ms < 3s
Complex research < 1s < 10s
Workflow execution N/A < 30s

πŸ”§ Development

Prerequisites

  • Node.js 18+
  • npm or yarn

Build from Source

# Clone repository
git clone https://github.com/fedec65/BetterCallClaudeMCP.git
cd BetterCallClaudeMCP

# Install dependencies
npm install

# Build
npm run build

# Run locally
node dist/index.js

Testing

# Run tests
npm test

# Run with coverage
npm run test:coverage

# Test with MCP Inspector
npx @modelcontextprotocol/inspector node ./dist/index.js

πŸ“ Project Structure

bettercallclaude-mcp/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.ts              # MCP server entry point
β”‚   β”œβ”€β”€ tools/
β”‚   β”‚   β”œβ”€β”€ gateway.ts        # Intelligent routing
β”‚   β”‚   β”œβ”€β”€ research.ts       # Legal research
β”‚   β”‚   β”œβ”€β”€ citation.ts       # Citation management
β”‚   β”‚   β”œβ”€β”€ strategy.ts       # Case strategy
β”‚   β”‚   β”œβ”€β”€ draft.ts          # Document drafting
β”‚   β”‚   └── analyze.ts        # Document analysis
β”‚   β”œβ”€β”€ agents/
β”‚   β”‚   β”œβ”€β”€ researcher.ts     # Research agent
β”‚   β”‚   β”œβ”€β”€ strategist.ts     # Strategy agent
β”‚   β”‚   β”œβ”€β”€ drafter.ts        # Drafting agent
β”‚   β”‚   β”œβ”€β”€ compliance.ts     # Compliance agent
β”‚   β”‚   β”œβ”€β”€ data-protection.ts # Data protection agent
β”‚   β”‚   β”œβ”€β”€ fiscal-expert.ts  # Tax law agent
β”‚   β”‚   β”œβ”€β”€ corporate.ts      # Corporate law agent
β”‚   β”‚   β”œβ”€β”€ real-estate.ts    # Real estate agent
β”‚   β”‚   β”œβ”€β”€ procedure.ts      # Procedure specialist
β”‚   β”‚   β”œβ”€β”€ translator.ts     # Translation agent
β”‚   β”‚   β”œβ”€β”€ cantonal-law.ts   # Cantonal law expert
β”‚   β”‚   β”œβ”€β”€ risk-analyst.ts   # Risk analysis agent
β”‚   β”‚   β”œβ”€β”€ citation.ts       # Citation specialist
β”‚   β”‚   β”œβ”€β”€ advocate.ts       # Adversarial (pro)
β”‚   β”‚   β”œβ”€β”€ adversary.ts      # Adversarial (contra)
β”‚   β”‚   β”œβ”€β”€ judicial.ts       # Adversarial (judge)
β”‚   β”‚   └── orchestrator.ts   # Workflow orchestrator
β”‚   β”œβ”€β”€ workflows/
β”‚   β”‚   β”œβ”€β”€ due-diligence.ts
β”‚   β”‚   β”œβ”€β”€ litigation-prep.ts
β”‚   β”‚   β”œβ”€β”€ adversarial.ts
β”‚   β”‚   β”œβ”€β”€ contract-lifecycle.ts
β”‚   β”‚   └── real-estate-closing.ts
β”‚   β”œβ”€β”€ clients/
β”‚   β”‚   β”œβ”€β”€ fedlex.ts         # Fedlex SPARQL client
β”‚   β”‚   β”œβ”€β”€ bundesgericht.ts  # Federal court client
β”‚   β”‚   β”œβ”€β”€ entscheidsuche.ts # Decision search client
β”‚   β”‚   β”œβ”€β”€ bge-search.ts     # BGE search client
β”‚   β”‚   └── cantonal.ts       # Cantonal courts client
β”‚   └── shared/
β”‚       β”œβ”€β”€ cache.ts          # LRU cache
β”‚       β”œβ”€β”€ rate-limiter.ts   # Bottleneck rate limiting
β”‚       └── types.ts          # TypeScript types
β”œβ”€β”€ dist/                     # Compiled output
β”œβ”€β”€ docs/                     # Documentation
β”œβ”€β”€ package.json
└── tsconfig.json

πŸ“š Documentation

Document Description
Architecture Specification System design, agents, workflows
Tool Specifications Detailed tool documentation
Development Roadmap Timeline and milestones
API Integration Guide External API documentation
Command Reference Complete command & parameter reference
Configuration Guide Claude Code/Desktop configuration

πŸ—ΊοΈ Roadmap

v2.1.0 - Current Release (January 2026)

  • βœ… Core MCP server infrastructure
  • βœ… 6 primary MCP tools
  • βœ… 17 specialized legal agents
  • βœ… 5 multi-agent workflows
  • βœ… All 26 Swiss cantons
  • βœ… Multi-lingual support (DE/FR/IT/EN)
  • βœ… BGE-Search MCP integration
  • βœ… Adversarial analysis system

v2.5.0 - Enhanced Workflows (Q2 2026)

  • πŸ“‹ Additional workflow templates
  • πŸ“‹ Custom workflow builder
  • πŸ“‹ Workflow state persistence
  • πŸ“‹ Enhanced agent collaboration

v3.0.0 - Enterprise (Q3 2026)

  • πŸ“‹ Commercial database integration (Swisslex, Weblaw)
  • πŸ“‹ PDF document generation
  • πŸ“‹ Offline caching mode
  • πŸ“‹ Enterprise security features
  • πŸ“‹ Multi-tenant support

⚠️ Disclaimer

IMPORTANT: BetterCallClaudeMCP is a legal research and analysis tool.

  • All outputs require professional lawyer review
  • Does not constitute legal advice
  • May contain errors or omissions
  • Verify against official sources
  • Lawyers maintain full professional responsibility

🀝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

πŸ“„ License

MIT License - see LICENSE for details.


πŸ“ž Support


Built for the Swiss legal community with ❀️

BetterCallClaudeMCP v2.1.0 - Swiss Legal Intelligence Framework

About

An MCP server to include the BetterCallClaude framework as MCP in Claude Desktop and Cowork

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors