korean-law-mcp 2.1.6 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +307 -279
- package/build/cli.js +3 -303
- package/build/lib/api-client.js +5 -3
- package/build/lib/cli-executor.d.ts +16 -0
- package/build/lib/cli-executor.js +189 -0
- package/build/lib/cli-format.d.ts +39 -0
- package/build/lib/cli-format.js +155 -0
- package/build/lib/date-parser.d.ts +18 -0
- package/build/lib/date-parser.js +172 -0
- package/build/lib/query-router.d.ts +3 -0
- package/build/lib/query-router.js +18 -0
- package/build/lib/risk-rules.d.ts +52 -0
- package/build/lib/risk-rules.js +452 -0
- package/build/lib/xml-parser.d.ts +23 -1
- package/build/lib/xml-parser.js +41 -9
- package/build/server/sse-server.js +13 -9
- package/build/tool-registry.js +153 -4
- package/build/tools/admin-appeals.js +3 -14
- package/build/tools/admin-rule.d.ts +13 -0
- package/build/tools/admin-rule.js +84 -14
- package/build/tools/advanced-search.js +2 -7
- package/build/tools/annex.js +2 -4
- package/build/tools/article-compare.js +2 -7
- package/build/tools/article-detail.d.ts +22 -0
- package/build/tools/article-detail.js +134 -0
- package/build/tools/article-history.js +2 -7
- package/build/tools/article-link-parser.js +2 -7
- package/build/tools/article-with-precedents.js +2 -7
- package/build/tools/autocomplete.js +2 -7
- package/build/tools/batch-articles.js +2 -7
- package/build/tools/chains.d.ts +7 -1
- package/build/tools/chains.js +84 -0
- package/build/tools/committee-decisions.d.ts +32 -0
- package/build/tools/committee-decisions.js +29 -62
- package/build/tools/comparison.js +2 -7
- package/build/tools/constitutional-decisions.js +3 -14
- package/build/tools/customs-interpretations.js +16 -57
- package/build/tools/document-analysis.d.ts +20 -0
- package/build/tools/document-analysis.js +112 -0
- package/build/tools/english-law.js +17 -50
- package/build/tools/external-links.js +2 -7
- package/build/tools/historical-law.js +3 -14
- package/build/tools/institutional-rules.d.ts +98 -0
- package/build/tools/institutional-rules.js +152 -0
- package/build/tools/interpretations.d.ts +2 -0
- package/build/tools/interpretations.js +25 -19
- package/build/tools/knowledge-base.js +8 -28
- package/build/tools/law-history.js +2 -7
- package/build/tools/law-linkage.d.ts +45 -0
- package/build/tools/law-linkage.js +105 -0
- package/build/tools/law-statistics.js +2 -7
- package/build/tools/law-system-tree.js +2 -7
- package/build/tools/law-text.js +2 -7
- package/build/tools/law-tree.js +2 -7
- package/build/tools/legal-terms.js +14 -51
- package/build/tools/life-law.js +48 -96
- package/build/tools/ordinance-search.js +24 -51
- package/build/tools/ordinance.js +2 -7
- package/build/tools/precedent-keywords.js +2 -7
- package/build/tools/precedent-summary.js +2 -7
- package/build/tools/precedents.d.ts +2 -0
- package/build/tools/precedents.js +34 -39
- package/build/tools/search-all.js +2 -7
- package/build/tools/search.js +2 -7
- package/build/tools/similar-precedents.js +2 -7
- package/build/tools/special-admin-appeals.d.ts +70 -0
- package/build/tools/special-admin-appeals.js +151 -0
- package/build/tools/tax-tribunal-decisions.js +3 -14
- package/build/tools/three-tier.js +2 -7
- package/build/tools/treaties.d.ts +45 -0
- package/build/tools/treaties.js +134 -0
- package/build/tools/utils.d.ts +14 -0
- package/build/tools/utils.js +55 -5
- package/package.json +78 -78
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Chris
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Chris
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,279 +1,307 @@
|
|
|
1
|
-
# Korean Law MCP
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[](LICENSE)
|
|
8
|
-
[](https://www.typescriptlang.org/)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
korean-law
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
korean-law
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
korean-law
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
| `
|
|
142
|
-
| `
|
|
143
|
-
| `
|
|
144
|
-
| `
|
|
145
|
-
| `
|
|
146
|
-
| `
|
|
147
|
-
| `
|
|
148
|
-
| `
|
|
149
|
-
| `
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
|
156
|
-
|
|
157
|
-
| `
|
|
158
|
-
| `
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
|
163
|
-
|
|
164
|
-
| `
|
|
165
|
-
| `
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
|
172
|
-
|
|
173
|
-
| `
|
|
174
|
-
| `
|
|
175
|
-
| `
|
|
176
|
-
| `
|
|
177
|
-
| `
|
|
178
|
-
| `
|
|
179
|
-
| `
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
| `
|
|
187
|
-
| `
|
|
188
|
-
| `
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
| `
|
|
196
|
-
| `
|
|
197
|
-
| `
|
|
198
|
-
| `
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
| `
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
|
210
|
-
|
|
211
|
-
| `
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
|
227
|
-
|
|
228
|
-
| `
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
|
255
|
-
|
|
256
|
-
| `
|
|
257
|
-
| `
|
|
258
|
-
| `
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
1
|
+
# Korean Law MCP
|
|
2
|
+
|
|
3
|
+
**87 tools to search, retrieve, and analyze Korean law** — statutes, precedents, ordinances, treaties, and more.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/korean-law-mcp)
|
|
6
|
+
[](https://modelcontextprotocol.io)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
[](https://www.typescriptlang.org/)
|
|
9
|
+
|
|
10
|
+
> MCP server + CLI for Korea's official legal database (법제처 Open API). Works with Claude Desktop, Cursor, Windsurf, Zed, and any MCP-compatible client.
|
|
11
|
+
|
|
12
|
+
[한국어](./README-KR.md)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Why this exists
|
|
17
|
+
|
|
18
|
+
South Korea has **1,600+ active laws**, **10,000+ administrative rules**, and a precedent system spanning Supreme Court, Constitutional Court, tax tribunals, and customs rulings. All of this lives behind a clunky government API with zero developer experience.
|
|
19
|
+
|
|
20
|
+
This project wraps that entire legal system into **87 structured tools** that any AI assistant or script can call. Built by a Korean civil servant who got tired of manually searching [법제처](https://www.law.go.kr) for the hundredth time.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Features
|
|
25
|
+
|
|
26
|
+
- **87 Legal Tools** — Statutes, precedents, admin rules, ordinances, constitutional decisions, tax rulings, customs interpretations, treaties, institutional rules, legal terminology
|
|
27
|
+
- **MCP + CLI** — Use from Claude Desktop or from your terminal. Same 87 tools.
|
|
28
|
+
- **Korean Law Intelligence** — Auto-resolves abbreviations (`화관법` → `화학물질관리법`), converts article numbers (`제38조` ↔ `003800`), visualizes 3-tier delegation
|
|
29
|
+
- **Annex Extraction** — Downloads HWPX/HWP annexes and converts tables to Markdown automatically
|
|
30
|
+
- **8 Chain Tools** — Composite research workflows in a single call (e.g. `chain_full_research`: AI search → statutes → precedents → interpretations)
|
|
31
|
+
- **Caching** — 1-hour search cache, 24-hour article cache
|
|
32
|
+
- **Remote Endpoint** — Use without installation via `https://korean-law-mcp.fly.dev/mcp`
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Quick Start
|
|
37
|
+
|
|
38
|
+
### Option 1: MCP Server (Claude Desktop / Cursor / Windsurf)
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm install -g korean-law-mcp
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Add to your MCP client config:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"mcpServers": {
|
|
49
|
+
"korean-law": {
|
|
50
|
+
"command": "korean-law-mcp",
|
|
51
|
+
"env": {
|
|
52
|
+
"LAW_OC": "your-api-key"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Get your free API key at [법제처 Open API](https://open.law.go.kr/LSO/openApi/guideResult.do).
|
|
60
|
+
|
|
61
|
+
| Client | Config File |
|
|
62
|
+
|--------|------------|
|
|
63
|
+
| Claude Desktop | `%APPDATA%\Claude\claude_desktop_config.json` (Win) / `~/Library/Application Support/Claude/claude_desktop_config.json` (Mac) |
|
|
64
|
+
| Cursor | `.cursor/mcp.json` |
|
|
65
|
+
| Windsurf | `.windsurf/mcp.json` |
|
|
66
|
+
| Continue | `~/.continue/config.json` |
|
|
67
|
+
| Zed | `~/.config/zed/settings.json` |
|
|
68
|
+
|
|
69
|
+
### Option 2: Remote (No Install)
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"mcpServers": {
|
|
74
|
+
"korean-law": {
|
|
75
|
+
"url": "https://korean-law-mcp.fly.dev/mcp"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Option 3: CLI
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npm install -g korean-law-mcp
|
|
85
|
+
export LAW_OC=your-api-key
|
|
86
|
+
|
|
87
|
+
korean-law search_law --query "관세법"
|
|
88
|
+
korean-law get_law_text --mst 160001 --jo "제38조"
|
|
89
|
+
korean-law search_precedents --query "부당해고"
|
|
90
|
+
korean-law list # all 87 tools
|
|
91
|
+
korean-law list --category 판례 # filter by category
|
|
92
|
+
korean-law help search_law # tool help
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Option 4: Docker
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
docker build -t korean-law-mcp .
|
|
99
|
+
docker run -e LAW_OC=your-api-key -p 3000:3000 korean-law-mcp
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Tool Categories (87 total)
|
|
105
|
+
|
|
106
|
+
### Search (11)
|
|
107
|
+
|
|
108
|
+
| Tool | Description |
|
|
109
|
+
|------|-------------|
|
|
110
|
+
| `search_law` | Search statutes (auto-resolves abbreviations) |
|
|
111
|
+
| `search_admin_rule` | Search administrative rules |
|
|
112
|
+
| `search_ordinance` | Search local ordinances |
|
|
113
|
+
| `search_precedents` | Search court precedents |
|
|
114
|
+
| `search_interpretations` | Search legal interpretations |
|
|
115
|
+
| `search_all` | Unified search across all categories |
|
|
116
|
+
| `suggest_law_names` | Law name autocomplete |
|
|
117
|
+
| `advanced_search` | Advanced search with date/keyword filters |
|
|
118
|
+
| `get_law_history` | Law amendment history by date |
|
|
119
|
+
| `get_annexes` | Retrieve annexes + extract HWPX/HWP to Markdown |
|
|
120
|
+
| `parse_jo_code` | Article number ↔ JO code conversion |
|
|
121
|
+
|
|
122
|
+
### Retrieve (9)
|
|
123
|
+
|
|
124
|
+
| Tool | Description |
|
|
125
|
+
|------|-------------|
|
|
126
|
+
| `get_law_text` | Full statute text |
|
|
127
|
+
| `get_admin_rule` | Full administrative rule |
|
|
128
|
+
| `get_ordinance` | Full local ordinance |
|
|
129
|
+
| `get_precedent_text` | Full precedent text |
|
|
130
|
+
| `get_interpretation_text` | Full interpretation text |
|
|
131
|
+
| `get_batch_articles` | Batch article retrieval (multiple laws) |
|
|
132
|
+
| `get_article_with_precedents` | Article + related precedents |
|
|
133
|
+
| `compare_old_new` | Old vs. new law comparison |
|
|
134
|
+
| `get_three_tier` | Law → Decree → Rule 3-tier comparison |
|
|
135
|
+
|
|
136
|
+
### Analyze (10)
|
|
137
|
+
|
|
138
|
+
| Tool | Description |
|
|
139
|
+
|------|-------------|
|
|
140
|
+
| `compare_articles` | Cross-law article comparison |
|
|
141
|
+
| `get_law_tree` | Delegation structure tree |
|
|
142
|
+
| `get_article_history` | Article amendment history |
|
|
143
|
+
| `summarize_precedent` | Precedent summary |
|
|
144
|
+
| `extract_precedent_keywords` | Precedent keyword extraction |
|
|
145
|
+
| `find_similar_precedents` | Similar precedent search |
|
|
146
|
+
| `get_law_statistics` | Law statistics |
|
|
147
|
+
| `parse_article_links` | Parse in-text legal references |
|
|
148
|
+
| `get_external_links` | Generate external links |
|
|
149
|
+
| `analyze_document` | Document analysis with legal context |
|
|
150
|
+
|
|
151
|
+
### Specialized: Tax & Customs (4)
|
|
152
|
+
|
|
153
|
+
| Tool | Description |
|
|
154
|
+
|------|-------------|
|
|
155
|
+
| `search_tax_tribunal_decisions` | Tax tribunal decision search |
|
|
156
|
+
| `get_tax_tribunal_decision_text` | Tax tribunal decision full text |
|
|
157
|
+
| `search_customs_interpretations` | Customs interpretation search |
|
|
158
|
+
| `get_customs_interpretation_text` | Customs interpretation full text |
|
|
159
|
+
|
|
160
|
+
### Specialized: Constitutional & Admin Appeals (4)
|
|
161
|
+
|
|
162
|
+
| Tool | Description |
|
|
163
|
+
|------|-------------|
|
|
164
|
+
| `search_constitutional_decisions` | Constitutional Court decision search |
|
|
165
|
+
| `get_constitutional_decision_text` | Constitutional Court decision full text |
|
|
166
|
+
| `search_admin_appeals` | Administrative appeal decision search |
|
|
167
|
+
| `get_admin_appeal_text` | Administrative appeal decision full text |
|
|
168
|
+
|
|
169
|
+
### Specialized: Committee Decisions (8)
|
|
170
|
+
|
|
171
|
+
| Tool | Description |
|
|
172
|
+
|------|-------------|
|
|
173
|
+
| `search_ftc_decisions` | Fair Trade Commission decision search |
|
|
174
|
+
| `get_ftc_decision_text` | Fair Trade Commission decision full text |
|
|
175
|
+
| `search_pipc_decisions` | Privacy Commission decision search |
|
|
176
|
+
| `get_pipc_decision_text` | Privacy Commission decision full text |
|
|
177
|
+
| `search_nlrc_decisions` | Labor Relations Commission decision search |
|
|
178
|
+
| `get_nlrc_decision_text` | Labor Relations Commission decision full text |
|
|
179
|
+
| `search_acr_decisions` | Board of Audit & Inspection decision search |
|
|
180
|
+
| `get_acr_decision_text` | Board of Audit & Inspection decision full text |
|
|
181
|
+
|
|
182
|
+
### Specialized: Special Admin Appeals (4) `NEW`
|
|
183
|
+
|
|
184
|
+
| Tool | Description |
|
|
185
|
+
|------|-------------|
|
|
186
|
+
| `search_acr_special_appeals` | Special administrative appeal search |
|
|
187
|
+
| `get_acr_special_appeal_text` | Special administrative appeal full text |
|
|
188
|
+
| `search_appeal_review_decisions` | Appeal review decision search |
|
|
189
|
+
| `get_appeal_review_decision_text` | Appeal review decision full text |
|
|
190
|
+
|
|
191
|
+
### Law-Ordinance Linkage (4) `NEW`
|
|
192
|
+
|
|
193
|
+
| Tool | Description |
|
|
194
|
+
|------|-------------|
|
|
195
|
+
| `get_linked_ordinances` | Find ordinances linked to a law |
|
|
196
|
+
| `get_linked_ordinance_articles` | Get linked ordinance article details |
|
|
197
|
+
| `get_delegated_laws` | Find laws delegating to ordinances |
|
|
198
|
+
| `get_linked_laws_from_ordinance` | Find parent laws from an ordinance |
|
|
199
|
+
|
|
200
|
+
### Treaties (2) `NEW`
|
|
201
|
+
|
|
202
|
+
| Tool | Description |
|
|
203
|
+
|------|-------------|
|
|
204
|
+
| `search_treaties` | Treaty search |
|
|
205
|
+
| `get_treaty_text` | Treaty full text |
|
|
206
|
+
|
|
207
|
+
### Institutional Rules (6) `NEW`
|
|
208
|
+
|
|
209
|
+
| Tool | Description |
|
|
210
|
+
|------|-------------|
|
|
211
|
+
| `search_school_rules` | School rule search |
|
|
212
|
+
| `get_school_rule_text` | School rule full text |
|
|
213
|
+
| `search_public_corp_rules` | Public corporation rule search |
|
|
214
|
+
| `get_public_corp_rule_text` | Public corporation rule full text |
|
|
215
|
+
| `search_public_institution_rules` | Public institution rule search |
|
|
216
|
+
| `get_public_institution_rule_text` | Public institution rule full text |
|
|
217
|
+
|
|
218
|
+
### Knowledge Base (7)
|
|
219
|
+
|
|
220
|
+
| Tool | Description |
|
|
221
|
+
|------|-------------|
|
|
222
|
+
| `get_legal_term_kb` | Legal terminology search |
|
|
223
|
+
| `get_legal_term_detail` | Term definition |
|
|
224
|
+
| `get_daily_term` | Everyday language search |
|
|
225
|
+
| `get_daily_to_legal` | Everyday → legal term mapping |
|
|
226
|
+
| `get_legal_to_daily` | Legal → everyday term mapping |
|
|
227
|
+
| `get_term_articles` | Articles using a term |
|
|
228
|
+
| `get_related_laws` | Related laws |
|
|
229
|
+
|
|
230
|
+
### Chain Tools (8)
|
|
231
|
+
|
|
232
|
+
Composite research workflows — multiple tools in a single call.
|
|
233
|
+
|
|
234
|
+
| Tool | Workflow |
|
|
235
|
+
|------|----------|
|
|
236
|
+
| `chain_law_system` | Search → 3-tier comparison → batch articles |
|
|
237
|
+
| `chain_action_basis` | Law system → interpretations → precedents → appeals |
|
|
238
|
+
| `chain_dispute_prep` | Precedents + appeals + specialized decisions |
|
|
239
|
+
| `chain_amendment_track` | Old/new comparison + article history |
|
|
240
|
+
| `chain_ordinance_compare` | Parent law → nationwide ordinance search |
|
|
241
|
+
| `chain_full_research` | AI search → statutes → precedents → interpretations |
|
|
242
|
+
| `chain_procedure_detail` | Law system → annexes → enforcement rule annexes |
|
|
243
|
+
| `chain_document_review` | Document analysis → related laws → precedents |
|
|
244
|
+
|
|
245
|
+
### Other (10)
|
|
246
|
+
|
|
247
|
+
| Tool | Description |
|
|
248
|
+
|------|-------------|
|
|
249
|
+
| `search_ai_law` | Natural language AI search |
|
|
250
|
+
| `search_english_law` | English law search |
|
|
251
|
+
| `get_english_law_text` | English law full text |
|
|
252
|
+
| `search_historical_law` | Historical law search |
|
|
253
|
+
| `get_historical_law` | Historical law full text |
|
|
254
|
+
| `search_legal_terms` | Legal dictionary search |
|
|
255
|
+
| `get_law_system_tree` | Law system tree visualization |
|
|
256
|
+
| `get_law_abbreviations` | Law abbreviation list |
|
|
257
|
+
| `get_article_detail` | Single article detail retrieval |
|
|
258
|
+
| `compare_admin_rule_old_new` | Admin rule old vs. new comparison |
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Usage Examples
|
|
263
|
+
|
|
264
|
+
```
|
|
265
|
+
User: "관세법 제38조 알려줘"
|
|
266
|
+
→ search_law("관세법") → get_law_text(mst, jo="003800")
|
|
267
|
+
|
|
268
|
+
User: "화관법 최근 개정 비교"
|
|
269
|
+
→ "화관법" → "화학물질관리법" auto-resolved → compare_old_new(mst)
|
|
270
|
+
|
|
271
|
+
User: "근로기준법 제74조 해석례"
|
|
272
|
+
→ search_interpretations("근로기준법 제74조") → get_interpretation_text(id)
|
|
273
|
+
|
|
274
|
+
User: "산업안전보건법 별표1 내용"
|
|
275
|
+
→ get_annexes("산업안전보건법 별표1") → HWPX download → Markdown table
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Environment Variables
|
|
281
|
+
|
|
282
|
+
| Variable | Required | Default | Description |
|
|
283
|
+
|----------|----------|---------|-------------|
|
|
284
|
+
| `LAW_OC` | Yes | — | 법제처 API key ([get one free](https://open.law.go.kr/LSO/openApi/guideResult.do)) |
|
|
285
|
+
| `PORT` | No | 3000 | HTTP server port |
|
|
286
|
+
| `CORS_ORIGIN` | No | `*` | CORS allowed origin |
|
|
287
|
+
| `RATE_LIMIT_RPM` | No | 60 | Requests per minute per IP |
|
|
288
|
+
|
|
289
|
+
## Documentation
|
|
290
|
+
|
|
291
|
+
- [docs/API.md](docs/API.md) — 87-tool reference
|
|
292
|
+
- [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) — System design
|
|
293
|
+
- [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md) — Development guide
|
|
294
|
+
|
|
295
|
+
## Credits
|
|
296
|
+
|
|
297
|
+
- [법제처](https://www.law.go.kr) Open API — Korea's official legal database
|
|
298
|
+
- [Anthropic](https://anthropic.com) — Model Context Protocol
|
|
299
|
+
- [kordoc](https://github.com/chrisryugj/kordoc) — HWP/HWPX parser (same author)
|
|
300
|
+
|
|
301
|
+
## License
|
|
302
|
+
|
|
303
|
+
[MIT](./LICENSE)
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
<sub>Made by a Korean civil servant @ 광진구청 AI동호회 AI.Do</sub>
|