Mike → Mitch: Swiss legal pivot merges BetterCallClaude in one 1,159-line commit

Commit 6595dfb drops four new modules that reorient the entire Mike codebase toward Swiss jurisdiction: an MCP HTTP client, nine legal tool definitions, an attorney-client privilege scanner, and five prebuilt Swiss workflows. The system prompt is fully replaced with a multi-page Swiss legal identity.

i18ncompliance

The MCP client in backend/src/lib/mcp/client.ts (~116 lines) speaks JSON-RPC over HTTP to seven hardcoded servers under mcp.bettercallclaude.ch: entscheidsuche, BGE search, fedlex-sparql, onlinekommentar, legal-citations, legal-persona, and TAS jurisprudence. The tool layer in mcp/tools.ts (257 lines) wraps nine legal operations (search_bge, get_bge_decision, search_swiss_decisions, verify_citation, search_federal_legislation, search_commentary, legal_strategy, legal_draft, legal_analyze) in OpenAI-style definitions.

Before any content hits those external servers, it passes through backend/src/lib/privacy.ts. This 356-line Anwaltsgeheimnis scanner checks for strong markers (terms like anwaltsgeheimnis, Art. 321 StGB, secret professionnel, segreto professionale) that always block, and weak markers (vertraulich, confidentiel, confidential) that block only when combined with client/case context words. Local document tools are exempt. When a block fires, the LLM gets a privilege warning in place of the database result.

Five prebuilt Swiss workflows land in builtinWorkflows.ts: litigation prep, contract review, due diligence, legal opinion, compliance check. The system prompt in chatTools.ts is rewritten from "You are Mike" to a multi-page Swiss identity covering Gutachtenstil reasoning, BGE/ATF/DTF citation standards, all 26 cantons, and DE/FR/IT/EN language handling.

The MCP server endpoints are fedec65's private infrastructure on Railway (EU region), rate-limited at 60 req/min per IP with no availability contract for third parties. Anyone adopting the client pattern must point it at their own servers.

So what Worth a look if you want a pattern for wiring external MCP servers into the Mike chat tool loop - the client is small and the separation is clean. The privilege scanner is the more portable idea: a configurable pre-flight content classifier that gates outbound calls before anything leaves the backend. That template applies to any privileged-content scenario (HIPAA, attorney-client, trade secret). The Swiss-specific prompts, tool names, and workflow content don't travel.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

1 commit from fedec65/bettercallmitch, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
6595dfbf feat: merge BetterCallClaude into Mitch - Swiss legal intelligence platform Federico Cesconi 2026-05-05 ↗ GitHub
commit body
- Add MCP HTTP client for 7 Swiss legal databases (BGE, entscheidsuche,
  fedlex, onlinekommentar, legal-citations, legal-persona, tas-jurisprudence)
- Integrate 9 MCP tools into chat tool loop (search_bge, search_swiss_decisions,
  verify_citation, search_federal_legislation, search_commentary,
  legal_strategy, legal_draft, legal_analyze)
- Replace generic system prompt with Swiss legal identity:
  Gutachtenstil reasoning, cantonal awareness, multi-language support (DE/FR/IT/EN),
  BGE/ATF/DTF citation standards
- Add Anwaltsgeheimnis privacy scanner (Art. 321 StGB / Art. 13 BGFA)
  blocking privileged content before external MCP calls
- Add 5 Swiss legal built-in workflows:
  litigation prep, contract review, due diligence, legal opinion, compliance check
- Rebrand frontend from Mike to Mitch across all user-facing surfaces
- Add Swiss quick-action buttons and Swiss Legal Intelligence badge
- Add COMPLIANCE.md with data residency and professional disclaimers
- Update README with Swiss capabilities and MCP integration docs

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-66.md from inside the repo you want the changes in.

⬇ Download capture-thread-66.md