# Tw Legal Rag

> Tw Legal Rag is a free MCP server for legal and government. Taiwan law MCP server: court judgments, statutes, agency rulings, citation checks. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Free
- **Platforms:** API, CLI, Web
- **Website:** https://dr-legal.com.tw
- **Repository:** https://github.com/aa0101181514/tw-legal-rag
- **MCP Registry name:** io.github.aa0101181514/tw-legal-rag
- **Categories:** legal and government, knowledge and memory
- **Listing updated:** 2026-11-14

## About

Behind the endpoint is the Dr.Legal (Legal Detective) database. The README counts 22,795,389 court judgments as of 2026-11-11, plus 872 constitutional interpretations and rulings, 1,022 laws, 7,255 regulations and 107,889 administrative rules from 107 agencies, with a record of which rulings were repealed or superseded.

The server is free and needs no API key, but connecting opens a login page for a free Dr.Legal account. It gives six tools: judgment search, full text with appeal links, a bundle with a citation allowlist, current statute lookup, administrative ruling lookup by number and semantic ruling search.

The author says the companion CLI does not generate legal advice or call a language model, and its citation check only confirms that cited judgments belong to the retrieved bundle. Judgments sync daily with a lag of several days.

## Features

- **Judgment search:** Retrieves Taiwanese court rulings semantically and by case number.
- **Appeal chains:** Attaches higher-court history and outcome flags.
- **Citation bundles:** Returns a whitelist of judgments for checking citations.
- **Statute lookup:** Looks up current articles by law name and number.
- **Agency rulings:** Searches administrative interpretations and their validity.

## Good for

- Research precedent for a Taiwanese case
- Verify that cited judgments were retrieved
- Look up a current statute article
- Find agency interpretations on a topic

## Install

### Claude Code (Terminal)

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

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://tlr.dr-legal.com.tw/mcp
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "tw-legal-rag": {
      "url": "https://tlr.dr-legal.com.tw/mcp"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "tw-legal-rag": {
      "type": "http",
      "url": "https://tlr.dr-legal.com.tw/mcp"
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "tw-legal-rag": {
      "serverUrl": "https://tlr.dr-legal.com.tw/mcp"
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "tw-legal-rag": {
      "type": "http",
      "url": "https://tlr.dr-legal.com.tw/mcp"
    }
  }
}
```

## Tools

- `get_law_article`: Looks up a current statute article by law name and article number.

## FAQ

### Is it free?

Yes, no API key; you sign in with a free account.

### How recent are the judgments?

Synced daily, but very new rulings can lag by several days.

### Does it give legal advice?

No. It retrieves material for your own AI tools.

### Is Tw Legal Rag free?

Yes. Tw Legal Rag is free to use.

### How do I add Tw Legal Rag to Claude Code?

Run this command in your terminal: claude mcp add --transport http tw-legal-rag https://tlr.dr-legal.com.tw/mcp

### What are the best alternatives to Tw Legal Rag?

The closest alternatives to Tw Legal Rag are Codebase Memory, XERJ, Claude Code Ultimate Guide, Nautilus Compass Memory and note1.

## Alternatives

- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Nautilus Compass Memory](https://ai-powered.com/mcp/nautilus-compass-memory): Nautilus Compass Memory is an open-source MCP server for knowledge and memory.
- [note1](https://ai-powered.com/mcp/note1): note1 is an MCP server for productivity.
- [NY LLC Publication (FileMyPublication)](https://ai-powered.com/mcp/ny-llc-publication-filemypublication): NY LLC Publication (FileMyPublication) is a free MCP server for legal and government.
- [TribuJus](https://ai-powered.com/mcp/tribujus): TribuJus is an open-source MCP server for legal and government.
- [SupplyClub Catalog](https://ai-powered.com/mcp/supplyclub-catalog): SupplyClub Catalog is a free MCP server for legal and government.

---
Source: https://ai-powered.com/mcp/tw-legal-rag
