MCP Taiwan Legal DB — Data skill for Claude Code
台灣司法院判決 + 全國法規資料庫 MCP server · Query Taiwan legal data from any MCP AI agent.
How to install MCP Taiwan Legal DB
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open lawchat-oss/mcp-taiwan-legal-db and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What MCP Taiwan Legal DB does
台灣司法院判決 + 全國法規資料庫 MCP server · Query Taiwan legal data from any MCP AI agent.
Alternatives in Data
- Private GPT — Complete API layer for private AI applications on local models: RAG, skills, tools, MCP, text-to-sql, and more 57.5k ★
- MCP Server Chart — 🤖 A visualization mcp & skills contains 25+ visual charts using @antvis 4k ★
- MCP Server Supabase — Supabase database and auth integration 2.6k ★
README
mcp-taiwan-legal-db
[English](https://github.com/lawchat-oss/mcp-taiwan-legal-db/blob/main/README.en.md) · **繁體中文**
台灣法規、裁判書、憲法法庭裁判 — MCP Server。
讓任何 MCP 相容的 AI 助手直接存取台灣公開法律資料:
- 司法院裁判書 — judgment.judicial.gov.tw(全文搜尋 + 取得)
- 全國法規資料庫 — law.moj.gov.tw(11,700+ 部法規)
- 憲法法庭 — cons.judicial.gov.tw(868 筆大法官解釋 + 憲判字,含理由書全文,離線快取)
以 Python 搭配 [FastMCP](https://github.com/modelcontextprotocol/python-sdk) 寫成。純工具 wrapper,只連線台灣政府官方來源(詳見下方「資料來源與統計」),不發送任何其他網路請求;憲法法庭資料為內建離線打包。
特色
| 功能 | 說明 |
|---|---|
| 8 個 MCP 工具 | 裁判書搜尋/全文、法規查詢、釋字/憲判字查詢、引用關係圖譜 |
| 離線快取 | 868 筆大法官解釋與憲判字(含理由書/意見書全文)從本地 JSON 即時回傳 |
| 引用關係圖譜 | 從理由書抽取所有引用的釋字/憲判字,追溯憲法學說演變 |
| 全文搜尋 | 裁判書關鍵字搜尋 + 釋字爭點/理由書全文搜尋 |
| 混合請求策略 | 預設用 httpx 直打(~0.25s),觸發司法院 F5 WAF 時自動以 Playwright 刷 cookie 後繼續 |
⚡ 安裝(PyPI,推薦)
pip install mcp-taiwan-legal-db
**Debian / Ubuntu / WSL 注意**:系統 Python 受 PEP 668 保護,直接 `pip install` 會被擋。請改用:
pipx install mcp-taiwan-legal-db(推薦,自動建隔離 venv,CLI tool 標準裝法)- 或
pip install --user --break-system-packages mcp-taiwan-legal-db
裝完後 entry point `mcp-taiwan-legal-db` 會在 PATH 上。**接到 Claude Code**(任何專案都能用):
claude mcp add taiwan-legal-db mcp-taiwan-legal-db --scope user
接著 `/mcp` 重啟連線、Claude 就會在自然語言查詢時自動用 8 個 MCP tool。
**選擇性 — F5 WAF fallback**:
playwright install chromium # 僅在司法院 WAF 觸發時用,平時 idle
開發環境設置
下面是 clone 來修程式 / 跑測試的流程:
# 1. Clone repo
git clone https://github.com/lawchat-oss/mcp-taiwan-legal-db.git
cd mcp-taiwan-legal-db
# 2. 建立並初始化虛擬環境
python3 -m venv .venv
.venv/bin/pip install --upgrade pip
.venv/bin/pip install -e .
# 3. 安裝 Playwright Chromium(僅在司法院 WAF 觸發時使用,一般查詢不會啟動)
.venv/bin/playwright install chromium
# 4. 驗證伺服器可以啟動並註冊 8 個工具
.venv/bin/python -c "
import asyncio
from mcp_server.server import mcp
print('Server:', mcp.name)
tools = asyncio.run(mcp.list_tools())
print('Tools:', [t.name for t in tools])
assert len(tools) == 8, f'Expected 8 tools, got {len(tools)}'
Related Skills
Suganthans BigQuery MCP Server
BigQuery MCP server for Claude — query any BigQuery dataset in natural language, with built-in SEO analysis to
Atribu Attribution Skill
Opinionated Claude Code skill for the Atribu MCP server (mcp.atribu.app). Teaches your AI client to query iden
AI Legal Agents Skills OS
AI Legal Agents OS - an agentic operating system for legal work: one master agent, nine specialist skills, MCP
Mysh
A safer MySQL CLI for AI coding agents: connection profiles, SSH tunnels, and automatic sensitive-data masking
Jinguyuan Dumpling Skill
Connect your AI assistant to Jinguyuan Dumpling Restaurant data to query store information, check operating ho
Reddit MCP Buddy
Clean, LLM-optimized Reddit MCP server. Browse posts, search content, analyze users. No fluff, just Reddit dat
Related Agents
Case Law Researcher
Searches relevant case law (judgments, decisions, opinions) for issues from a memo plan. Routes US case law to
Fullstack Implementer
Use to implement a planned feature end-to-end in a Next.js + TypeScript + MongoDB app - schema, service, serve
Eval Best No Type Rules
Eval arm best-no-type-rules (best without render_chart's per-type rules; Q23 arm C). Answers one building-data