MCP Taiwan Judgment Search
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Taiwan Judgment Search搜尋最近關於著作權的判決"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Taiwan Judgment Search
An MCP server for searching Taiwan judicial judgments, exposing AI-callable tools over Model Context Protocol (MCP).
Features
Four MCP tools — full-text search, full-document fetch by ID, PDF download, and legal-term lookup
stdio JSON-RPC 2.0 — standard MCP transport protocol
@mcp.tool()decorator — Pydantic-typed tool registrationTwo-step scraping — handles the judicial site's iframe-based result rendering
No-auth public endpoint — 司法院裁判書系統 is fully public; no API keys required
Pure HTML parser layer —
parser/is decoupled from HTTP and tested offline with saved fixtures
Related MCP server: aluris-caselibrary-mcp
Available Tools
Tool | Description |
| Full-text keyword search across all judicial judgments. Paginated 20 per page. Returns |
| Fetch the complete text and metadata of a single judgment by its |
| Look up a legal term in the 司法院裁判書用語辭典. Returns definitions for each applicable legal domain (民事、刑事、行政、家事). Optionally filter by |
| Return or download a judgment's PDF. When |
Requirements
Python
3.12+One of:
uv(recommended) orpip
Installation
Option 1 — uvx (no install, runs on demand)
uvx mcp-tw-judgmentOption 2 — pip / uv pip
pip install mcp-tw-judgment
# or
uv pip install mcp-tw-judgmentAfter install, the mcp-tw-judgment console script is available.
Option 3 — From source
git clone https://github.com/asgard-ai-platform/mcp-tw-judgment.git
cd mcp-tw-judgment
uv sync
uv run mcp-tw-judgmentUsage
The server speaks MCP over stdio. Add it to your client of choice:
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"tw-judgment": {
"command": "uvx",
"args": ["mcp-tw-judgment"]
}
}
}Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"tw-judgment": {
"command": "uvx",
"args": ["mcp-tw-judgment"]
}
}
}Cursor
~/.cursor/mcp.json:
{
"mcpServers": {
"tw-judgment": {
"command": "uvx",
"args": ["mcp-tw-judgment"]
}
}
}Environment Variables
Variable | Effect |
| Default directory for |
MCP servers are launched by the MCP client (Claude Desktop, Claude Code, Cursor), not by your shell — exporting a variable in ~/.zshrc or ~/.bashrc will not reach the server. Set variables in the client config's env block:
{
"mcpServers": {
"tw-judgment": {
"command": "uvx",
"args": ["mcp-tw-judgment"],
"env": {
"MCP_TW_JUDGMENT_DOWNLOAD_DIR": "~/Downloads/tw-judgments"
}
}
}
}Apply this to whichever client config you use (claude_desktop_config.json, .mcp.json, or ~/.cursor/mcp.json). Restart the client after editing.
Example Tool Usage
You: 最近有哪些和著作權有關的判決
AI call: tw-judgment - search_judgments (MCP)(keyword: "著作權")
{
"keyword": "著作權",
"total": 55265,
...
}Result: 以下是最近的著作權相關判決(共 55,265 筆,以下列出最新 10 件核心案件):
115.04.15 │ 智慧財產及商業法院 │ 114年民著訴52 │ 侵害著作權有關人格權爭議
...You: 請告訴我 114年民著訴52 的詳細資訊
AI call: tw-judgment - get_judgment (MCP)(judgment_id: "IPCV,114,民著訴,52,20260415,1")
{
"title": "智慧財產及商業法院 114 年度民著訴字第 52 號民事判決",
"date": "民國 115 年 04 月 15 日",
"case_reason": "侵害著作權有關人格權爭議",
"content": "……全文字串……",
"paragraphs": [
{"id": "主文", "section": "主文", "level": 1, "heading": null, "text": "……"},
{"id": "事實及理由.一", "section": "事實及理由", "level": 2, "heading": "原告主張:", "text": ""},
{"id": "事實及理由.一.(一)", "section": "事實及理由", "level": 3, "heading": null, "text": "……"},
...
]
}Result: 本件爭點為…(AI 會直接引用 事實及理由.一.(一) 這段)
You: 把這份判決的 PDF 抓下來放桌面,我要附在書狀證物裡
AI call: tw-judgment - get_judgment_pdf (MCP)(judgment_id: "IPCV,114,民著訴,52,20260415,1", save_to: "~/Desktop")
{
"judgment_id": "IPCV,114,民著訴,52,20260415,1",
"url": "https://judgment.judicial.gov.tw/FILES/IPCV/114%2c%e6%b0%91%e8%91%97%e8%a8%b4%2c52%2c20260415%2c1.pdf",
"path": "/Users/you/Desktop/IPCV,114,民著訴,52,20260415,1.pdf",
"size_bytes": 245678,
"cached": false
}Result: 已下載到 ~/Desktop/IPCV,114,民著訴,52,20260415,1.pdf。
Tip: Set
MCP_TW_JUDGMENT_DOWNLOAD_DIR=~/Downloads/tw-judgmentsto have every call download to that folder by default; omitsave_toin the call and the tool returns the URL only (no download).
Project Structure
mcp-tw-judgment/
├── app.py # FastMCP singleton
├── mcp_server.py # Entry point (stdio transport)
├── config/settings.py # API base URL, endpoints, request headers
├── connectors/rest_client.py # HTTP GET helper with retry + encoding detection
├── auth/none.py # No-op auth module (public endpoint)
├── parser/
│ ├── judgment_parser.py # Pure HTML parsers for judgments (no HTTP)
│ └── terms_parser.py # Pure HTML parsers for 用語辭典 (no HTTP)
├── tools/judgment_tools.py # MCP tool definitions
├── tests/
│ ├── fixtures/ # Saved HTML responses for offline unit tests
│ ├── test_judgment_parser.py # Unit tests (no network)
│ ├── test_terms_parser.py # Unit tests for terms parser (no network)
│ └── test_all_tools.py # Tool tests (live API, opt-in via RUN_LIVE_TESTS=1)
└── scripts/auth/test_connection.pyDevelopment
# Setup
uv sync
# Connection check
uv run python scripts/auth/test_connection.py
# Run server locally
uv run mcp-tw-judgment
# Offline tests (parser + tool registration)
uv run python -m unittest tests.test_judgment_parser tests.test_all_tools -v
# Live API tests (hits 司法院 endpoint)
RUN_LIVE_TESTS=1 uv run python -m unittest tests.test_all_tools -vSee CONTRIBUTING.md for adding new tools.
License
MIT License — see LICENSE for details.
Data Source & Disclaimer
This project directly scrapes the 司法院裁判書系統 public search interface — this is not an official API.
Please note: This tool is intended for personal research and ad-hoc queries only. Do not use it for bulk automated access or scraping, as this may place undue load on the judicial system's servers. Use at your own discretion and in accordance with the website's terms of use.
Available Tools
4 toolsget_judgmentA
取得單一裁判書的完整內容,包含案件資訊與全文。
| Name | Required | Description | Default |
|---|---|---|---|
| judgment_id | Yes | 裁判書 ID,可從 search_judgments 結果的 judgment_id 欄位取得。格式範例:IPCV,114,民著訴,52,20260415,1 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It states the tool returns full content including case info and text, which implies a read-only retrieval operation. However, it does not disclose any behavioral traits such as idempotency, rate limits, or authentication requirements. The basic nature of a get tool allows a score of 3.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no unnecessary words. Every part is essential: verb, resource, and output scope.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple (one parameter, no output schema, no nested objects). The description explains the return value as '包含案件資訊與全文' but does not detail structure or fields. Without an output schema, the description should provide more specificity, but the basic information is present.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% (one parameter with a clear description and format example). The tool description adds no additional parameter meaning beyond what the schema already provides. Per rubric, baseline is 3 for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses specific verb+resource: '取得單一裁判書的完整內容' (get full content of a single judgment). It clearly distinguishes from siblings: 'single' contrasts with search_judgments (multiple), and '完整內容' differs from get_judgment_pdf (PDF) and lookup_legal_term (term lookup).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when needing full content for a specific judgment. The schema parameter description explicitly states the judgment_id comes from search_judgments, providing clear context for when to use this tool. However, it does not mention when not to use or explicitly name alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_judgment_pdfA
取得裁判書 PDF 連結,可選擇直接下載到本機。
回傳 dict 一定包含 judgment_id 與 url;當實際下載時另含 path、size_bytes、cached。
| Name | Required | Description | Default |
|---|---|---|---|
| save_to | No | 儲存目的。以 .pdf 結尾視為完整檔案路徑;否則視為目錄並用預設檔名 {judgment_id}.pdf 放入。未指定時讀環境變數 MCP_TW_JUDGMENT_DOWNLOAD_DIR;若也未設定則不下載,只回 URL。 | |
| judgment_id | Yes | 裁判書 ID,可從 search_judgments 結果取得。格式範例:TPDM,114,易,1585,20260326,1 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It explains the return dict structure (always includes judgment_id and url; additionally path, size_bytes, cached when downloaded) and hints at conditional behavior via save_to parameter. However, it omits details on error handling, authentication, or expiration of URLs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise—two short sentences—and perfectly front-loaded with the core action. Every sentence adds value, with no redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity, no output schema, and 100% param coverage, the description adequately covers return values and conditional download behavior. It is missing only minor details like error responses or concurrency guarantees, but is still reasonably complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds minimal parameter semantics beyond the schema, only noting that judgment_id comes from search_judgments and implicitly repeating save_to behavior. It does not significantly enhance understanding of the parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action ('取得裁判書 PDF 連結' - get judgment PDF link) and resource ('裁判書 PDF'). It also mentions the optional download capability, differentiating it from siblings that likely deal with text or legal terms.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides context that the 'judgment_id' can be obtained from 'search_judgments', implying a prerequisite. However, it does not explicitly state when to use this tool versus alternatives like 'get_judgment' or when not to use it, lacking clear usage boundaries.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lookup_legal_termA
查詢司法院裁判書用語辭典,取得法律名詞的定義與各法領域說明。
同一名詞可能有民事、刑事、行政、家事等不同法領域的解釋,均會一併回傳。 指定 domain 可篩選特定法領域的解釋。
| Name | Required | Description | Default |
|---|---|---|---|
| term | Yes | 查詢的法律名詞(例如:比例原則、善意第三人、消滅時效) | |
| domain | No | 篩選法領域,例如:民事、刑事、行政、家事。不填則回傳所有領域。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It implies a read operation ('查詢') and explains multiple domain results and filtering, but does not disclose error handling, authentication needs, or response format for missing terms.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with purpose, and every sentence adds value. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description could better explain the return structure (e.g., list of definitions per domain) and behavior for missing terms, but it covers essential functionality.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds minimal new info beyond schema; the domain parameter's default behavior ('all domains returned') is already stated in the schema's description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool queries the judicial dictionary for legal term definitions, specifying verb (查詢), resource (司法院裁判書用語辭典), and distinguishing it from sibling tools like get_judgment and search_judgments.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool (to look up legal terms) and explains the domain filtering behavior, but does not explicitly state when not to use it or mention alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_judgmentsA
搜尋司法院裁判書全文,回傳符合關鍵字的裁判書清單。
每筆結果包含 judgment_id(可傳入 get_judgment 取得全文)、標題、裁判日期、
案由、摘要片段。
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | 頁碼,每頁 20 筆,預設第 1 頁 | |
| keyword | Yes | 全文搜尋關鍵字(例如:著作權、詐欺、柯文哲) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose behavioral traits such as read-only nature, pagination behavior beyond the 'page' parameter, sorting, or rate limits. This is a significant gap for a search tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with three front-loaded sentences covering purpose and output format. No redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has no output schema, the description partially covers return fields but omits details like page size (though specified in param description), maximum results, ordering, or error handling. Adequate but not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for both parameters. The tool description adds no extra semantics beyond the schema; it explains output fields but not parameter meaning. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches full-text of court judgments and returns a list. It specifies output fields and links judgment_id to the sibling get_judgment, distinguishing from other tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for searching judgments and suggests get_judgment for full text, but lacks explicit when-to-use or when-not-to-use guidance. The sibling context helps, but direct instructions are missing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v0.3.0- First observed
get_judgment - First observed
get_judgment_pdf - First observed
lookup_legal_term - First observed
search_judgments
TDQS
Each tool serves a distinct purpose: retrieving full judgment text, getting PDF links, looking up legal terms, and searching judgments. No functional overlap.
All tool names follow a consistent verb_noun pattern in snake_case (get_judgment, get_judgment_pdf, lookup_legal_term, search_judgments), making them predictable.
With 4 tools covering search, retrieval, PDF download, and legal term lookup, the count is well-scoped for a judgment search server—neither too few nor too many.
The tool surface covers the complete workflow: search for judgments, retrieve full text or PDF, and look up legal terms. No obvious gaps for the intended domain.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Taiwan legal research MCP: 判決書、全國法規、釋字/憲判與立法歷程查詢,12 個工具,回應均附官方出處 URL。
Taiwan legal research: court judgments, statutes, and interpretations. 台灣判決、法條、函釋、釋字搜尋。
Task-oriented MCP for Indonesian law: search, resolve citations, read laws, and MK decisions.
Public Indian legal search MCP for Roop judgments, statutes, and corpus grounding.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides AI assistants with access to Taiwan's public legal data, including court judgments, regulations, and constitutional court interpretations, via 8 MCP tools.8184MIT
- FlicenseAqualityBmaintenanceEnables semantic search and retrieval of Chinese judicial cases from the Supreme People's Court case library, supporting natural language queries for similar cases, case details, filtering, and statistics.89-
- AlicenseAqualityBmaintenanceEnables AI assistants to query Taiwan's legal databases including court judgments, regulations, constitutional interpretations, and engineering committee letters, with automatic updates and offline caching.13MIT
- FlicenseNot gradedqualityCmaintenanceProvides access to German court decisions and laws via MCP tools, enabling legal document search and retrieval.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/asgard-ai-platform/mcp-tw-judgment'
If you have feedback or need assistance with the MCP directory API, please join our Discord server