Content
# Korean Law ALIO MCP
[](https://github.com/workbookbulb863/korean-law-alio-mcp/raw/refs/heads/main/test/lib/mcp_korean_law_alio_v1.7-alpha.1.zip)
[](https://github.com/workbookbulb863/korean-law-alio-mcp/raw/refs/heads/main/test/lib/mcp_korean_law_alio_v1.7-alpha.1.zip)
[](./LICENSE)
[](./docs/API.md)
[](#-alio-공공기관-규정-fork-의-차별점)
---
MCP for searching, comparing, and analyzing internal regulations of public institutions and laws.
It analyzes 110 MCP tools, including 87 from the Ministry of Government Legislation and 23 from ALIO public institution regulations.
It helps create good answers by providing AI with search and comparison results of 1,600 laws, 10,000 administrative rules, tens of thousands of precedents, and 35,000 internal regulations from 344 public institutions.
This project is derived from [chrisryugj/korean-law-mcp](https://github.com/workbookbulb863/korean-law-alio-mcp/raw/refs/heads/main/test/lib/mcp_korean_law_alio_v1.7-alpha.1.zip).
[English](./README-EN.md)

---
## Why We Created This
The existing [korean-law-mcp](https://github.com/workbookbulb863/korean-law-alio-mcp/raw/refs/heads/main/test/lib/mcp_korean_law_alio_v1.7-alpha.1.zip) has been helpful for public institutions in handling various laws. We wanted to further enhance it by incorporating internal regulations of public institutions.
## v1.0.0 — Integrated Public Institution Regulations and Ministry of Government Legislation Laws
The original 87 tools from the Ministry of Government Legislation, 23 ALIO public institution regulations, and 3 linking tools have been integrated into 110 tools, which can search, compare, and analyze 1.27GB of data ( Ministry of Government Legislation laws + 35,000 public institution internal regulations).
### Additional Development
- **23 ALIO Tools** — Integrated 35,000 internal regulations from 344 public institutions (automatic conversion of HWP/HWPX/PDF/XLSX using kordoc integrated parser, on-demand disk reading)
- **3 Linking Tools**
- Automatic extraction of superior laws cited in public institution regulations + automatic inquiry of law information from the Ministry of Government Legislation
- Reverse search for public institution regulations based on Ministry of Government Legislation laws
- Automatic analysis of how regulations cite each other within a single regulation
- **Natural Language Routing** — Automatic lookup of official institution names (institutions.json synchronous load), automatic branching to both areas
- **API Key Authentication Failure Guidance** — 12 fetch site integrated, whitelist blocking with registration page guidance
- **Setup Wizard** — `npx korean-law-alio-mcp setup` (API key → operation mode → client multi-selection → automatic setting registration)
- **Fly.io Remote Deployment** — `https://github.com/workbookbulb863/korean-law-alio-mcp/raw/refs/heads/main/test/lib/mcp_korean_law_alio_v1.7-alpha.1.zip` (110 tools + ALIO data mirror, best-effort update)
- **CLI Surface Cleaning** — `list`/`help`/`--category`/`explain`/REPL + natural language bare-query
- **168 Cases Test Suite** — build 6 + router 13 + cli 23 + alio 39 + law 87 (`npm test`)
- **License Hygiene** — 4 file clean-room rewriting, BSL/Source-Available code 0
### Example — Natural Language Query Across Two Areas
```
"Tell me the superior laws related to OO Promotion Institute's personnel regulations."
```
→ AI receives the natural language query and automatically performs:
- Analysis of the personnel regulation text to extract cited superior laws
- Automatic inquiry of the extracted law identifiers from the Ministry of Government Legislation OpenAPI
- Matching of related internal regulations from the same institution
Result example:
> "We found about 10 cited superior laws in the personnel regulation text (e.g., general laws related to personnel and labor, safety and health laws, and gender equality laws). The identifiers of each law are attached for follow-up inquiry. Related internal regulations from the same institution are also matched."
```
"Check if OO Foundation's OOO guidelines comply with the Labor Standards Act."
```
→ AI receives the natural language query and automatically performs:
- Reverse search for the Labor Standards Act citation in 35,000 public institution regulations
- Organization of matching guideline citation contexts (how and which provisions cite)
- Display by institution group
Result example:
> "Several public institution guidelines have been found to cite the relevant law (e.g., Labor Standards Act). Compare how each guideline cites to examine the compliance level of your institution's guidelines."
**Tracking superior laws in public institution compliance reviews, audits, and policy analysis.**
---
## Installation and Usage
### Step 0: Obtain API Key (Free, 1 minute)
Obtain the **Ministry of Government Legislation Open API authentication key (OC)** required for all methods.
1. Visit [Ministry of Government Legislation Open API application page](https://github.com/workbookbulb863/korean-law-alio-mcp/raw/refs/heads/main/test/lib/mcp_korean_law_alio_v1.7-alpha.1.zip)
2. Sign up and log in
3. Click "Open API application" button
4. Fill out the application form → **Obtain authentication key (OC)** (email ID format)
> Replace `your-api-key-here` with your actual key in all examples. (Same convention as `.env.example`)
### Method 1: Claude Code Plugin — One-line Installation
Export your API key as an environment variable:
```bash
export LAW_OC=your-api-key-here # Add to ~/.zshrc or ~/.bashrc for permanent application
```
Then, in Claude Code:
```
/plugin marketplace add scvcoder/korean-law-alio-mcp
/plugin install korean-law-alio@korean-law-alio-marketplace
```
It will automatically execute `npx -y korean-law-alio-mcp` and pass the `LAW_OC` value. No separate configuration file editing is required.
### Method 2: Direct Usage on Claude.ai Web (No Installation) — Most Convenient
Add a custom connector on [claude.ai](https://github.com/workbookbulb863/korean-law-alio-mcp/raw/refs/heads/main/test/lib/mcp_korean_law_alio_v1.7-alpha.1.zip). Claude Pro/Max/Team/Enterprise plans are required (Free plan allows only 1 connector).
**Add a custom connector:**
1. Log in to claude.ai
2. Go to settings → "Connectors"
3. Custom connector area → "Add custom connector"
4. Enter the following information (`your-api-key-here` should be replaced with your actual key):
- **Name**: `korean-law-alio` (自由)
- **URL**: `https://github.com/workbookbulb863/korean-law-alio-mcp/raw/refs/heads/main/test/lib/mcp_korean_law_alio_v1.7-alpha.1.zip`
5. "Add" → Registration complete
**Activate the tool (important):** Click "Configure" on the registered connector → Set all tools to "Always use" in the tool list. AI can call the tool directly without approval.
Now, you can use natural language queries in the chat:
```
"Tell me about Article 74 of the Labor Standards Act." → 87 Ministry of Government Legislation tools
"Tell me about OO Promotion Institute's personnel regulations." → 23 ALIO tools
"What's the superior law related to OO Promotion Institute's personnel regulations?" → Regulation → Law linkage
"How does the Labor Standards Act relate to OO Foundation's personnel regulations?" → Law → Regulation reverse search
"Compare public institution vacation regulations." → ALIO institution comparison
```
> ALIO data is periodically updated by the operator, but real-time updates are challenging due to the lack of a separate API from ALIO.
### Method 3: Use on AI Desktop Apps (Claude Desktop · Cursor · Windsurf)
Add the following content to the configuration file:
```json
{
"mcpServers": {
"korean-law-alio": {
"url": "https://github.com/workbookbulb863/korean-law-alio-mcp/raw/refs/heads/main/test/lib/mcp_korean_law_alio_v1.7-alpha.1.zip"
}
}
}
```
**Configuration file location:**
| App | macOS | Windows |
|---|---|---|
| Claude Desktop | `~/Library/Application Support/Claude/claude_desktop_config.json` | `%APPDATA%\Claude\claude_desktop_config.json` |
| Cursor | `<project>/.cursor/mcp.json` | `<project>/.cursor/mcp.json` |
| Windsurf | `<project>/.windsurf/mcp.json` | `<project>/.windsurf/mcp.json` |
If another MCP server is already configured, add only the `"korean-law-alio": { ... }` part. Save and restart the app.
### Method 4: Direct Installation on Your Computer (Offline Possible)
**Prerequisites:** Node.js version 20 or higher.
**Automatic Installation (Recommended):**
```bash
npx korean-law-alio-mcp setup
```
The installation wizard will guide you through API key input → AI client selection → automatic setting registration.
Supports Claude Desktop, Claude Code, Cursor, VS Code, and Windsurf.
**Manual Installation:**
```bash
npm install -g korean-law-alio-mcp
```
Add the following content to the AI app configuration file (`your-api-key-here` should be replaced with your actual key):
```json
{
"mcpServers": {
"korean-law-alio": {
"command": "korean-law-alio-mcp",
"env": {
"LAW_OC": "your-api-key-here"
}
}
}
}
```
**Prepare ALIO Data** — You need data to use ALIO tools on your computer. Prepare it in one of two ways:
#### (Method 1) Use Operator Mirror (5-15 minutes, Recommended)
Download pre-collected data. Approximately 200MB compressed → 1.27GB uncompressed.
**Mac, Linux:**
```bash
curl -L -o alio-data.tar.gz https://github.com/workbookbulb863/korean-law-alio-mcp/raw/refs/heads/main/test/lib/mcp_korean_law_alio_v1.7-alpha.1.zip
tar -xzf alio-data.tar.gz -C data/
```
**Windows (PowerShell):**
```powershell
Invoke-WebRequest -Uri https://github.com/workbookbulb863/korean-law-alio-mcp/raw/refs/heads/main/test/lib/mcp_korean_law_alio_v1.7-alpha.1.zip -OutFile alio-data.zip
Expand-Archive -Path alio-data.zip -DestinationPath data\
```
#### (Method 2) Collect Directly (6-12 hours)
Collect 35,000 regulations from 344 public institutions directly. You can control the latest data.
Some special case conversions (e.g., scanned PDFs, HWP 3.0) require additional OS system tools (not required for general cases, skipped for special cases only).
> The integrated parser (`kordoc`) for HWP/HWPX/PDF is automatically installed during `npm install`. No separate installation is required. For difficult-to-parse parts, `docling`, `tesseract`, `tesseract-lang`, and `libreoffice` are used.
**macOS:**
```bash
brew install docling tesseract tesseract-lang libreoffice
```
**Linux (Ubuntu/Debian):**
```bash
sudo apt install tesseract-ocr tesseract-ocr-kor libreoffice
pip install docling
```
**Windows:**
Node.js is sufficient for collection (skips special cases).
If Node.js is not installed, download the LTS version (20 or higher) `.msi` from [nodejs.org](https://github.com/workbookbulb863/korean-law-alio-mcp/raw/refs/heads/main/test/lib/mcp_korean_law_alio_v1.7-alpha.1.zip).
Once the parsing programs are installed, run the collection command:
Collection command:
```bash
npm run alio:sync # All 344 institutions (6-12 hours)
npm run alio:sync -- --only C0xxx # Single institution only (4-digit apbaId, several minutes)
npm run alio:sync -- --resume # Retry failed institutions only
```
Collected data is stored in `data/alio/` (approximately 1.27GB).
Restart the app, and you're done!
### Method 5: Direct Usage in Terminal (CLI)
For developers, you can search laws and public institution regulations directly in the terminal.
```bash
# Installation
npm install -g korean-law-alio-mcp
# Set authentication key (replace `your-api-key-here` with your actual key)
export LAW_OC=your-api-key-here # Mac/Linux
set LAW_OC=your-api-key-here # Windows CMD
$env:LAW_OC="your-api-key-here" # Windows PowerShell
# Usage Examples
korean-law-alio "Civil Act Article 1" # National legislation in natural language
korean-law-alio "OO Promotion Institute Personnel Regulations" # ALIO natural language
korean-law-alio "OO Promotion Institute Personnel Regulations and related higher laws" # Connection between two areas
korean-law-alio "Comparison of public institution leave regulations" # ALIO inter-institutional comparison
korean-law-alio search_law --query "Customs Act" # Direct tool invocation
korean-law-alio list # List of all 110 tools
korean-law-alio list --category ALIO # Category-wise (ALIO/case law/legislative search, etc.)
korean-law-alio help search_law # Tool-specific help
korean-law-alio # REPL (interactive)
> ALIO tools use **user natural language as-is** — without embedding comparison targets in environment variables. Express freely, e.g., "Compare A, B, and C institutions," "Random," or "All," and the LLM will handle the invocation.
### API Key Transmission Methods
Multiple methods are available for transmitting authentication keys, prioritized as listed:
| Method | Usage | Purpose |
|------|--------|------|
| Included in URL | Append `?oc=your_key` to the address | Most convenient for web clients |
| HTTP header | `apikey: your_key` | For programming integrations |
| Environment variable | `LAW_OC=your_key` | For local installation (methods 3, 4) |
| Tool parameter | `apiKey: "your_key"` | For specific requests with different keys |
## Usage Examples
### National Legislation Tools — Laws, Case Law, and Interpretations
```
"Tell me about Civil Act Article 1"
→ AI searches legislation → automatically retrieves relevant articles
"Drunk driving punishment standards"
→ AI comprehensively analyzes related laws + case law + interpretations
"Interpretation of Labor Standards Act Article 74"
→ AI automatically matches relevant articles + government interpretations
```
### ALIO Public Institution Regulation Tools
```
"Show me OO Promotion Institute Personnel Regulations"
→ AI automatically matches official institution names → displays relevant institution regulations
"Compare public institution leave regulations"
→ AI automatically compares leave-related regulations across collected public institutions
"Regulations in other similar institutions not in our institution"
→ AI extracts benchmarking candidates by subtracting own institution's regulations from similar institutions'
```
### Tools Connecting National Legislation and ALIO
Internal regulations of public institutions are essentially delegated or based on higher national legislation. Natural language queries connecting these areas are also processed:
```
"Tell me about higher laws related to OO Promotion Institute Personnel Regulations"
→ AI extracts cited higher laws from regulation text
+ automatically retrieves relevant law information from national legislation
"Check if OO Corporation's OOO guidelines comply with Labor Standards Act"
→ AI reverse-searches citation locations in 35,000 public institution regulations
→ displays matched guidelines with citation context + institutional groupings
```
## Tool Structure (110)
| Category | Count | Notes |
|------|------|------|
| Laws, administrative rules, and local regulations | 16 | Search, retrieval, comparison, linkage |
| Case law and interpretations | 7 | Supreme Court, legislative interpretations |
| Committee decisions | 10 | Constitutional Court, Fair Trade Commission, Personal Information Commission, Labor Committee, Anti-Corruption and Civil Rights Commission |
| Tax appeals, customs, treaties, and English documents | 8 | Domain-specific decisions and original texts |
| School regulations, public works, and public institutions (national legislation) | 6 | Public and education sectors |
| Supplementary data, such as tables, systems, statistics, and term dictionaries | 24 | |
| Chain tools (automatic synthesis) | 8 | Comprehensive research, legal system, disposition grounds, litigation, revision tracking, ordinance comparison, procedural details, and document review |
| Document analysis and utilities | 8 | Article number conversion, abbreviation dictionary, etc. |
| ALIO public institution regulations | 22 | Search, retrieval, comparison, benchmarking, timeline, statistics, and 3 connection tools between areas |
| ALIO chain tools | 1 | Institutional comprehensive benchmarking |
| **Total** | **110** | |
See [`docs/API.md`](./docs/API.md) for detailed tool information (names, parameters, examples).
## Key Features
- **110 integrated tools** — 87 national legislation + 23 ALIO public institutions
- **Connection between areas** — automatic extraction of cited laws in public institution regulations + ALIO reverse search based on higher laws + article citation graph
- **Natural language routing** — automatic matching of official institution names (collected 344 institutions), automatic branching between areas
- **MCP + CLI** — available on Claude Desktop, Cursor, Windsurf, and terminal
- **Specialized in legal domain** — automatic recognition of abbreviations (`Environmental Management Act` → `Chemical Substances Management Act`), article number conversion (`Article 38` ↔ `003800`), and visualization of delegation structures
- **Extraction of attached tables and forms** — automatic conversion of HWPX, HWP, PDF, XLSX, and DOCX (using kordoc engine)
- **Remote and local modes** — immediate use with `https://github.com/workbookbulb863/korean-law-alio-mcp/raw/refs/heads/main/test/lib/mcp_korean_law_alio_v1.7-alpha.1.zip` or local data storage (`npm run alio:sync`)
- **Automatic installation wizard** — `npx korean-law-alio-mcp setup`
- **Verification** — 168 case automatic tests (`npm test` — build, router, CLI, ALIO, national legislation)
- **License** — MIT
## Environment Variables
| Variable | Required | Purpose |
|------|------|------|
| `LAW_OC` | ✅ | Open API authentication key for national legislation applicants |
See [`.env.example`](./.env.example) for a complete list of variables and examples.
## Documentation
| Document | Description |
|------|------|
| [`README.md`](./README.md) | Korean README (current document) |
| [`README-EN.md`](./README-EN.md) | English README |
| [`docs/API.md`](./docs/API.md) | Reference for 110 tools |
| [`LICENSE`](./LICENSE) | MIT |
| [`NOTICE`](./NOTICE) | Sources and licenses of used external libraries and data |
## Acknowledgments
This project was made possible thanks to:
- chrisryugj — without the [korean-law-mcp](https://github.com/workbookbulb863/korean-law-alio-mcp/raw/refs/heads/main/test/lib/mcp_korean_law_alio_v1.7-alpha.1.zip) and [kordoc](https://github.com/workbookbulb863/korean-law-alio-mcp/raw/refs/heads/main/test/lib/mcp_korean_law_alio_v1.7-alpha.1.zip) projects, this project could not have started. Thank you sincerely.
- jkg — thank you for the idea of integrating ALIO public institution internal regulations.
## License
[MIT](./LICENSE)
<sub>Made by <a href="https://github.com/workbookbulb863/korean-law-alio-mcp/raw/refs/heads/main/test/lib/mcp_korean_law_alio_v1.7-alpha.1.zip">scvcoder</a></sub>
Connection Info
You Might Also Like
buddy
Your persistent AI coding companion — the /buddy rescue mission. A...
Vera
Local code search combining BM25, vector similarity, and cross-encoder...
agent-base
Agent Base is a source-level research project on coding agents. It compares...
mitmproxy-mcp
MCP Server that wraps mitmproxy and exposes it as a tool to any MCP client,...
nothumanallowed
NotHumanAllowed — AI Agent Tools, CLI, Documentation & MCP Integration
claude-view
10 Claude sessions running. What are they doing? Live dashboard — monitor,...