Skip to main content
MCP server CX Codex

tw-legal-rag — Claude Code MCP server: Taiwan court judgment search

Connects an AI assistant to semantic search over Taiwan court judgments and administrative interpretations, with citation checks on every bundle.

Install into Claude Code · Platform CLI: remote server All methods and platforms ↓
claude mcp add --transport http tw-legal-rag https://tlr.dr-legal.com.tw/mcp
Open on GitHub

What tw-legal-rag does

The server searches a structured corpus of Taiwan court decisions by meaning, so a query does not have to match the wording used in the judgment. You can also pull a case by its full citation, see the appeal chain with flags for reversed or dismissed rulings, and look up administrative interpretations together with their validity status. Statutory text comes back by law name and article number.

Citation discipline is the core idea. Each result bundle carries an allowed_citations whitelist of judgments whose reasoning was actually read, plus verification instructions for the downstream model. The CLI check compares a model answer against that bundle as strings: it flags case numbers that are not in the bundle and quoted sentences that do not appear anywhere in it. That catches one of the nastiest failure modes in legal AI, a real citation attached to an invented holding.

What check cannot do is tell whether the model read the holding correctly, whether a quote comes from the specific judgment the answer names, or whether a party's argument was mistaken for the court's reasoning. Those need a human reading the full text. Setup in Claude is one command pointing at https://tlr.dr-legal.com.tw/mcp, no signup or API key, and the server itself calls no LLM. The separate CLI installs with pip install twlegalrag and needs httpx, typer and rich. Very fresh rulings reach the corpus after a delay, so the official court site stays ahead of it.

What it helps with

  • Find judgments by concept when you do not know the exact phrasing
  • Pull a case by citation and check whether a higher court reversed it
  • Verify that an article exists and read its current wording
  • Catch fabricated case numbers in a model's draft answer
  • Check the validity status of an administrative interpretation before citing it

Example prompts for the agent

  • Find judgments on overtime pay disputes and show which ones were reversed on appeal
  • Pull the case by its citation and summarise what each instance decided
  • Look up article 184 of the Civil Code and quote the text

How to install tw-legal-rag

Platform CLI: remote server

claude mcp add --transport http tw-legal-rag https://tlr.dr-legal.com.tw/mcp

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about tw-legal-rag

How do I install tw-legal-rag in Claude Code?

Run claude mcp add --transport http tw-legal-rag https://tlr.dr-legal.com.tw/mcp. No API key or account is needed.

What does tw-legal-rag do?

It runs semantic search over Taiwan court judgments and administrative interpretations, packages results with excerpts and citation instructions, and the CLI audits model answers against that package.

Does the citation check guarantee a correct answer?

No. It confirms that a case number appears in the bundle and that a quoted sentence exists somewhere in its text. It does not tell whether the court's reasoning was read correctly or whether the quote comes from the judgment named.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor