Taiwan Legal RAG MCP
A free MCP server for Taiwan law: the agent finds court judgments and statute articles and cites them with checkable links
- 342 ★ on the repository
- Last commit
Extended access
Why this level
- The search string goes to an external server and may be logged, so keep confidential facts out of the query
- An AI answer built on retrieved judgments may misread them
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/taiwan-legal-ragDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The search string goes to an external server and may be logged, so keep confidential facts out of the query
- An AI answer built on retrieved judgments may misread them
This is third-party code. Review the repository files before installing.
What it does
Taiwan Legal RAG connects an agent to the Legal Detective search service over Taiwan case law. The database holds more than 22 million court judgments, plus administrative interpretations, Constitutional Court rulings and current statute texts. Search is semantic, so plain-word queries work, and a full case number automatically triggers an exact lookup. If a case is not found, the service says so rather than padding with similar results. The remote MCP server at https://tlr.dr-legal.com.tw/mcp offers six tools. The main one searches judgments, reads the reasoning right away and returns a bundle with a whitelist of citations the agent may use. Other tools read the reasoning page by page together with related instances and search administrative interpretations. A separate tool returns the text of an article by law name and number. There is also an open CLI, twlegalrag, for the same data. The `twlegalrag pack` command builds a bundle of judgments you can hand to any AI, and `twlegalrag check` verifies an AI's answer: whether every cited case number is in the bundle and whether verbatim quotes appear. For Claude Code the repository includes a skill that wraps `twlegalrag pack` and tells the model to cite only judgments from the bundle. The service calls no language models and gives no legal advice. Your own AI forms the answer.
Who it is for. For lawyers, students and developers who study Taiwan law with Claude, ChatGPT, Gemini CLI or Codex and want to confirm the cited judgments are real.
Good fit when
- You need Taiwan case law for a situation described in plain words, with excerpts from the reasoning
- You need to check that a case with a given number exists and that a higher court has not overturned the judgment
- You need the current text of an article by law name and number rather than the model's memory
- You want to catch an AI answer that cites made-up case numbers or non-existent quotes
- You need to check the status of an administrative interpretation: in force, repealed or replaced
Not a fit when
- You need a legal opinion: the service gives no advice, and results must be read yourself or shown to a lawyer
- You need laws and case law of another country: the database covers Taiwan only
- You need judgments issued in the last few days: data syncs daily with a delay from the judiciary, so check the newest ones on the official site
- You need earlier versions of laws: the service returns only the current text of an article
Example request
Find Taiwan court judgments on overtime pay, read the reasoning of the three closest ones and cite only those in the bundle.MCP
- Transport
- http
- Authentication
- OAuth
Limitations
The service is run by Legal Detective. The search string goes to the tlr.dr-legal.com.tw server. The author warns that queries may be logged with the time and metadata derived from the IP, and asks you not to send personal secrets or confidential facts. Queries are not used to train generative models.
The CLI's citation check is shallow. It confirms that a case number is in the bundle and that a verbatim quote appears somewhere in the bundle, but it does not check that the quote comes from the cited judgment or that the court's holding was understood correctly. A "pass" result does not prove the legal reasoning is right.
The CLI code is under the Elastic License 2.0 from version 2.0.0: you may not offer the software itself to third parties as a hosted service. The hosted API and the judgment corpus are outside the code license; their terms are in the TERMS.md file. The documentation is in Chinese, English and Japanese, with no Russian.
How to disable. Remove the connection in the client: in Claude and ChatGPT it is a connector in the settings, in Gemini CLI the tlr entry in settings.json. The CLI is removed with `pip uninstall twlegalrag`, and the skill goes away with its tw-legal-rag folder in .claude/skills. There are no keys, so nothing to revoke.
FAQ
How do I connect Taiwan Legal RAG to Claude?
In Claude settings open Connectors, add a custom connector and enter https://tlr.dr-legal.com.tw/mcp. OAuth with dynamic registration completes by itself. For Claude Code there is a skill option: place the skills/tw-legal-rag folder in .claude/skills.
Do I need to register or pay for a key?
No. The service is free and works with no signup and no API key. Your own AI bears the model cost, since the service itself calls no language models.
What is in the Taiwan Legal RAG database?
Judgments from courts of all levels, administrative interpretations with validity history, Constitutional Court rulings and current laws. Data syncs daily, and the author keeps the exact figures updated in the documentation.
How is the CLI citation check different from a review by a lawyer?
The `twlegalrag check` command compares case numbers and verbatim quotes with the bundle that `twlegalrag pack` built. It catches citations to judgments outside the bundle and invented phrases, but it does not decide whether the court's holding was understood correctly. Read the judgment in full.
How do I install the twlegalrag CLI?
Run `pip install twlegalrag`. The package depends on httpx, typer and rich and needs no keys. Then `twlegalrag search` runs a search, `twlegalrag pack` builds a bundle and `twlegalrag check` verifies an answer.
Discussion
No questions or reviews yet.
Related
MCP serversMCP for Russian court practice search
atomno-mcp-sudact
An MCP server searching Russian court rulings by text, statute, court and date, returning the full case text, like sudact.ru
An MCP server for Korea's official legal database: search statutes, case law and ordinances, and verify article citations against fabrications
An MCP server with a database of Russian federal laws and codes: full-text article search, citation checks and currency checks
A skill that guides an agent through Chinese legal sources, from statutes to judicial interpretations, into a templated report.
A self-hosted MCP server for Korean law: 18 tools for statute articles, case law and contract review.
A collection of 71 skills for lawyers in China: OCR and transcription of materials, case and judgment analysis, contracts, patents, trademarks
README in short
The documentation shows database coverage in tables by court level, case category and agency. Connection steps cover Claude, ChatGPT, Gemini and Microsoft 365 Copilot.