LexLink-ko-mcp
Click on "Deploy 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., "@LexLink-ko-mcp Search for the English version of the Korean Commercial Act"
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.
๐ Read this in other languages: English | ํ๊ตญ์ด (Korean)
LexLink is an MCP (Model Context Protocol) server that exposes the Korean National Law Information API (open.law.go.kr) to AI agents and LLM applications. It enables AI systems to search, retrieve, and analyze Korean legal information through standardized MCP tools.
Features
54 MCP Tools + 2 MCP Resources for comprehensive Korean law information access
Search and retrieve Korean laws (effective date & announcement date)
Search and retrieve English-translated laws
Search and retrieve administrative rules (ํ์ ๊ท์น)
Query specific articles, paragraphs, and sub-items
Law-ordinance linkage (๋ฒ๋ น-์์น๋ฒ๊ท ์ฐ๊ณ)
Delegated law information (์์๋ฒ๋ น)
Phase 3 - Case Law & Legal Research
Court precedents (ํ๋ก)
Constitutional Court decisions (ํ์ฌ๊ฒฐ์ ๋ก)
Legal interpretations (๋ฒ๋ นํด์๋ก)
Administrative appeal decisions (ํ์ ์ฌํ๋ก)
Phase 4 - Article Citation Extraction
Extract legal citations from any law article (100% accuracy)
NEW: Phase 5 - AI-Powered Search
Semantic search for natural language queries (aiSearch)
Related laws discovery (aiRltLs_search)
MCP Resources - Law ID Cache
Cached mapping of ~20 frequently-used law names to stable ๋ฒ๋ นID codes
Template lookup by Korean name or abbreviation (
lexlink://law/{name})Dynamic caching: search results automatically populate the cache
Smart Features (inspired by korean-law-mcp):
Intelligent Caching - Per-tool TTL caching (search 1hr, articles 24hr, AI search 30min)
Law Name Resolution - Auto-resolves Korean abbreviations (์ํต๋ฒโ์๋ณธ์์ฅ๊ณผ ๊ธ์ตํฌ์์ ์ ๊ดํ ๋ฒ๋ฅ ), 52 seed aliases + dynamic learning
Chain Tools - Multi-step research workflows in one call (Phase 9)
100% Semantic Validation - All Phase 1-5 tools confirmed returning real law data
Error Handling - Actionable error messages with resolution hints
Korean Text Support - Proper UTF-8 encoding for Korean characters
Response Formats - JSON (default), HTML, or XML (multiple formats supported)
Related MCP server: Legal Search MCP
Project Status
๐ Production Ready - Phase 9 Complete!
Metric | Status |
Tools Implemented | 54/54 (100%) โ |
Semantic Validation | 26/26 (Phase 1-5 tools) โ |
MCP Prompts | 9/9 (100%) โ |
MCP Resources | 2 (1 static + 1 template) โ |
API Coverage | ~28% of 191+ endpoints |
LLM Integration | โ Validated (Gemini) |
Code Quality | Clean, documented, tested |
Version | v2.1.0 |
Latest: v2.1.0 โ 54 tools (Phase 9 added), intelligent caching (cache.py), law name resolution (resolver.py), chain tools for multi-step research workflows.
Prerequisites
Python 3.10+
law.go.kr OC identifier: Register at open.law.go.kr
Quick Start
1. Install Dependencies
uv sync2. Configure Your OC Identifier
Option A: Environment Variable (Recommended)
# Set OC in your environment
export OC=your_id_hereOption B: Pass in Tool Arguments
# Override OC in each tool call
eflaw_search(query="๋ฒ๋ น๋ช
", oc="your_id")3. Run the Server
# Stdio transport (for Claude Code, Cursor, etc.)
OC=your_oc uv run stdio
# HTTP transport (for Kakao PlayMCP)
OC=your_oc TRANSPORT=http uv run serveAvailable Tools
Phase 1: Core Law APIs (6 tools)
1. eflaw_search - Search Laws by Effective Date
Search for laws organized by effective date (์ํ์ผ ๊ธฐ์ค).
eflaw_search(
query="์๋์ฐจ๊ด๋ฆฌ๋ฒ", # Search keyword
display=10, # Results per page
type="XML", # Response format
ef_yd="20240101~20241231" # Optional date range
)2. law_search - Search Laws by Announcement Date
Search for laws organized by announcement date (๊ณตํฌ์ผ ๊ธฐ์ค).
law_search(
query="๋ฏผ๋ฒ",
display=10,
type="XML"
)3. eflaw_service - Retrieve Law Content (Effective Date)
Get full law text and articles by effective date.
IMPORTANT: For specific article queries (e.g., "์ 174์กฐ"), use the
joparameter. Some laws have 400+ articles and responses can exceed 1MB withoutjo.
# Get specific article (RECOMMENDED)
eflaw_service(
mst="279823", # Law MST
jo="017400", # Article 174 (์ 174์กฐ)
type="XML"
)
# Get full law (WARNING: large response)
eflaw_service(
id="001823",
type="XML"
)4. law_service - Retrieve Law Content (Announcement Date)
Get full law text and articles by announcement date.
IMPORTANT: For specific article queries (e.g., "์ 174์กฐ"), use the
joparameter. Some laws have 400+ articles and responses can exceed 1MB withoutjo.
# Get specific article (RECOMMENDED)
law_service(
mst="279823", # Law MST
jo="017400", # Article 174 (์ 174์กฐ)
type="XML"
)5. eflaw_josub - Query Article/Paragraph (Effective Date)
Best tool for querying specific articles. Returns only the requested article/paragraph.
eflaw_josub(
mst="279823", # Law MST
jo="017400", # Article 174 (์ 174์กฐ)
type="XML"
)
# jo format: "XXXXXX" where first 4 digits = article (zero-padded), last 2 = branch (00=main)
# Examples: "017400" (์ 174์กฐ), "000300" (์ 3์กฐ), "001502" (์ 15์กฐ์2)6. law_josub - Query Article/Paragraph (Announcement Date)
Best tool for querying specific articles. Returns only the requested article/paragraph.
law_josub(
mst="279823", # Law MST
jo="017200", # Article 172 (์ 172์กฐ)
type="XML"
)Phase 2: Extended APIs (9 tools)
7. elaw_search - Search English-Translated Laws
Search for Korean laws translated to English.
elaw_search(
query="employment",
display=10,
type="XML"
)8. elaw_service - Retrieve English Law Content
Get full English-translated law text.
elaw_service(
id="009589",
type="XML"
)9. admrul_search - Search Administrative Rules
Search administrative rules (ํ๋ น, ์๊ท, ๊ณ ์, ๊ณต๊ณ , ์ง์นจ).
admrul_search(
query="ํ๊ต",
display=10,
type="XML"
)10. admrul_service - Retrieve Administrative Rule Content
Get full administrative rule text with annexes.
admrul_service(
id="62505",
type="XML"
)11. lnkLs_search - Search Law-Ordinance Linkage
Find laws linked to local ordinances.
lnkLs_search(
query="๊ฑด์ถ",
display=10,
type="XML"
)12. lnkLsOrdJo_search - Search Ordinance Articles by Law
Find ordinance articles linked to specific law articles.
lnkLsOrdJo_search(
knd="002118", # Law ID
display=10,
type="XML"
)13. lnkDep_search - Search Law-Ordinance Links by Ministry
Find laws linked to ordinances by government ministry.
lnkDep_search(
org="1400000", # Ministry code
display=10,
type="XML"
)14. drlaw_search - Retrieve Law-Ordinance Linkage Statistics
Get linkage statistics table (HTML format).
drlaw_search(
lid="001823", # Law ID
type="HTML"
)15. lsDelegated_service - Retrieve Delegated Law Information
Get information about delegated laws, rules, and ordinances.
lsDelegated_service(
id="001823",
type="XML"
)Phase 3: Case Law & Legal Research (8 tools - NEW!)
Tip: All
*_servicetools in Phase 3 support asections="summary"parameter to return only a brief summary instead of the full document text.
16. prec_search - Search Court Precedents
Search Korean court precedents from Supreme Court and lower courts.
prec_search(
query="๋ด๋ณด๊ถ",
display=10,
type="XML",
curt="๋๋ฒ์" # Optional: Court name filter
)17. prec_service - Retrieve Court Precedent Full Text
Get complete court precedent text with case details.
prec_service(
id="228541",
type="XML"
)18. detc_search - Search Constitutional Court Decisions
Search Korean Constitutional Court decisions.
detc_search(
query="๋ฒ๊ธ",
display=10,
type="XML"
)19. detc_service - Retrieve Constitutional Court Decision Full Text
Get complete Constitutional Court decision text.
detc_service(
id="58386",
type="XML"
)20. expc_search - Search Legal Interpretations
Search legal interpretation precedents issued by government agencies.
expc_search(
query="์์ฐจ",
display=10,
type="XML"
)21. expc_service - Retrieve Legal Interpretation Full Text
Get complete legal interpretation text.
expc_service(
id="334617",
type="XML"
)22. decc_search - Search Administrative Appeal Decisions
Search Korean administrative appeal decisions.
decc_search(
query="*", # Search all decisions
display=10,
type="XML"
)23. decc_service - Retrieve Administrative Appeal Decision Full Text
Get complete administrative appeal decision text.
decc_service(
id="243263",
type="XML"
)Phase 4: Article Citation Extraction (1 tool - NEW!)
24. article_citation - Extract Citations from Law Article
Extract all legal citations referenced by a specific law article.
# First, search for the law to get MST
eflaw_search(query="๊ฑด์ถ๋ฒ") # Returns MST: 268611
# Then extract citations
article_citation(
mst="268611", # Law MST from search result
law_name="๊ฑด์ถ๋ฒ", # Law name
article=3 # Article number (์ 3์กฐ)
)Response:
{
"success": true,
"law_name": "๊ฑด์ถ๋ฒ",
"article": "์ 3์กฐ",
"citation_count": 12,
"internal_count": 4,
"external_count": 8,
"citations": [
{
"type": "external",
"target_law_name": "ใ๊ตญํ ์ ๊ณํ ๋ฐ ์ด์ฉ์ ๊ดํ ๋ฒ๋ฅ ใ",
"target_article": 56,
"target_paragraph": 1
}
]
}Key Features:
100% accuracy via HTML parsing (not LLM-based)
Zero API cost (no external LLM calls)
~350ms average extraction time
Distinguishes internal vs external citations
Phase 5: AI-Powered Search (2 tools - NEW!)
25. aiSearch - AI-Powered Semantic Law Search
โญ PREFERRED TOOL for vague or natural language queries. Use this FIRST when user's intent is unclear or conversational.
Uses intelligent/semantic search to find relevant law articles with full article text.
aiSearch(
query="๋บ์๋ ์ฒ๋ฒ", # Natural language query
search=0, # 0: law articles, 1: appendix, 2: admin rules, 3: admin appendix
display=20, # Results per page
page=1, # Page number
type="JSON" # Response format (JSON default)
)Best for: Natural language queries like "์์ฃผ์ด์ ๋ฒ๊ธ", "์ดํผ ์ฌ์ฐ๋ถํ ", "์์ ๋ฌธ์ "
26. aiRltLs_search - AI-Powered Related Laws Search
โญ PREFERRED TOOL for discovering related laws from vague topics. Use this when user wants to explore laws around a general subject.
Finds laws semantically related to a given law name or keyword.
aiRltLs_search(
query="๋ฏผ๋ฒ", # Law name or keyword
search=0, # 0: law articles, 1: admin rule articles
type="JSON" # Response format (JSON default)
)Best for: Finding related laws like "๋ฏผ๋ฒ" โ ์๋ฒ, ์๋ฃ๋ฒ, ์์ก์ด์ง๋ฒ
Phase 7: Extended Legal Information (18 tools)
Category | Tools |
์์น๋ฒ๊ท (Local Ordinances) |
|
์กฐ์ฝ (Treaties) |
|
๋ฒ๋ น์ ๋ณด ์ง์๋ฒ ์ด์ค (Knowledge Base) |
|
์์ํ ๊ฒฐ์ ๋ฌธ (Committee Decisions) |
|
์ค์๋ถ์ฒ 1์ฐจ ํด์ (Ministry Interpretations) |
|
ํน๋ณํ์ ์ฌํ (Special Appeals) |
|
Phase 9: Chain Tools (5 tools)
Inspired by korean-law-mcp, these tools run multi-step research workflows in a single call โ eliminating the need for an LLM to orchestrate sequential tool calls manually.
Tool | Description |
| Complete legal research: statutes + precedent analysis + interpretations |
| Revision history + article-level diff across amendments |
| All case law sources across 4 databases (ํ๋ก, ํ์ฌ๊ฒฐ์ ๋ก, ๋ฒ๋ นํด์๋ก, ํ์ ์ฌํ๋ก) |
| Full law hierarchy: delegation tree + admin rules + ordinances |
| Cache and resolver performance monitoring |
Tool Selection Guide
When searching Korean law, select tools based on query clarity:
Query Type | Recommended Tools | Examples |
๐ Vague/Natural language |
| "์์ฃผ์ด์ ์ฒ๋ฒ", "์ดํผ ์ฌ์ฐ๋ถํ " |
๐ Specific law/article |
| "ํ๋ฒ ์ 148์กฐ์2", "๋ฏผ๋ฒ ์์ํธ" |
โ๏ธ Case law |
| "๋๋ฒ์ 2023๋ค12345" |
๐ Related laws |
| "๋ฏผ๋ฒ๊ณผ ๊ด๋ จ๋ ๋ฒ๋ฅ " |
Configuration
Environment Variables
Variable | Default | Description |
| (required) | law.go.kr API identifier (email local part) |
|
| API base URL |
|
| HTTP request timeout in seconds |
| (unset) | Set |
|
| Transport type: |
OC Priority
When resolving the OC identifier:
Tool argument (highest priority) -
ocparameter in tool callEnvironment variable -
OCenv var (set via .env or HTTP header middleware)
Usage Examples
Example 1: Basic Search
# Search for automobile management law
result = eflaw_search(
query="์๋์ฐจ๊ด๋ฆฌ๋ฒ",
display=5,
type="XML"
)
# Returns:
{
"status": "ok",
"request_id": "uuid",
"upstream_type": "XML",
"data": {
# Law search results...
}
}Example 2: Search with Date Range
# Find laws effective in 2024
result = eflaw_search(
query="๊ตํต",
ef_yd="20240101~20241231",
type="XML"
)Example 3: Error Handling
# Missing OC parameter
result = eflaw_search(query="test")
# Returns helpful error:
{
"status": "error",
"error_code": "MISSING_OC",
"message": "OC parameter is required but not provided.",
"hints": [
"1. Tool argument: oc='your_value'",
"2. Environment variable: OC=your_value"
]
}Golden MCP Tool Trajectories
These examples demonstrate real-world conversation flows showing how LLMs interact with LexLink tools to answer legal research questions.
Trajectory 1: Basic Law Research
User Query: "What is Article 20 of the Civil Code?"
Tool Calls:
law_search(query="๋ฏผ๋ฒ", display=50, type="XML")โ Find Civil Code IDlaw_service(id="000021", jo="002000", type="XML")โ Retrieve Article 20 text
Result: LLM provides formatted explanation of Civil Code Article 20 with full legal text and context.
Trajectory 2: Court Precedent Analysis
User Query: "Find recent Supreme Court precedents about security interests"
Tool Calls:
prec_search(query="๋ด๋ณด๊ถ", curt="๋๋ฒ์", display=50, type="XML")โ Search Supreme Court precedentsprec_service(id="228541", type="XML")โ Retrieve top precedent details
Result: LLM summarizes key precedents with case numbers, dates, and holdings related to security interests.
Trajectory 3: Cross-Phase Legal Research
User Query: "How does the Labor Standards Act handle overtime, and are there relevant court precedents?"
Tool Calls:
eflaw_search(query="๊ทผ๋ก๊ธฐ์ค๋ฒ", display=50, type="XML")โ Find Labor Standards Acteflaw_service(id="001234", jo="005000", type="XML")โ Retrieve Article 50 (overtime provisions)prec_search(query="๊ทผ๋ก๊ธฐ์ค๋ฒ ์ฐ์ฅ๊ทผ๋ก", display=30, type="XML")โ Search overtime precedentsprec_service(id="234567", type="XML")โ Retrieve leading precedent
Result: LLM provides comprehensive analysis combining statutory text with judicial interpretation, showing how courts apply the overtime provisions.
Trajectory 4: Constitutional Review
User Query: "Has the Constitutional Court reviewed laws about fines?"
Tool Calls:
detc_search(query="๋ฒ๊ธ", display=50, type="XML")โ Search Constitutional Court decisionsdetc_service(id="58386", type="XML")โ Retrieve decision full textlaw_search(query=<law_name_from_decision>, type="XML")โ Find related law for context
Result: LLM explains Constitutional Court holdings on fine-related provisions and their impact on specific laws.
Trajectory 5: Administrative Law Research
User Query: "What administrative rules exist for schools, and are there related legal interpretations?"
Tool Calls:
admrul_search(query="ํ๊ต", display=50, type="XML")โ Search school-related administrative rulesadmrul_service(id="62505", type="XML")โ Retrieve rule contentexpc_search(query="ํ๊ต", display=30, type="XML")โ Search legal interpretationsexpc_service(id="334617", type="XML")โ Retrieve interpretation details
Result: LLM provides overview of administrative framework for schools with official agency interpretations.
Trajectory 6: Comprehensive Legal Analysis
User Query: "I'm researching rental housing disputes. Show me the relevant law, court precedents, and administrative appeal decisions."
Tool Calls:
eflaw_search(query="์ฃผํ์๋์ฐจ๋ณดํธ๋ฒ", display=50, type="XML")โ Find Housing Lease Protection Acteflaw_service(id="002876", type="XML")โ Retrieve full law textprec_search(query="์ฃผํ์๋์ฐจ", display=50, type="XML")โ Search housing lease precedentsprec_service(id="156789", type="XML")โ Retrieve key precedentdecc_search(query="์ฃผํ์๋์ฐจ", display=30, type="XML")โ Search administrative appeal decisionsdecc_service(id="243263", type="XML")โ Retrieve appeal decision
Result: LLM provides comprehensive legal research report covering statutory framework, judicial interpretation, and administrative precedents for rental housing disputes.
Trajectory 7: Citation Network Analysis (Phase 4)
User Query: "What laws does Article 3 of the Building Act cite?"
Tool Calls:
eflaw_search(query="๊ฑด์ถ๋ฒ", display=50, type="XML")โ Find Building Act, get MSTarticle_citation(mst="268611", law_name="๊ฑด์ถ๋ฒ", article=3)โ Extract all citations
Result: LLM provides complete citation analysis showing 12 citations (8 external laws, 4 internal references) including specific article and paragraph references.
Trajectory 8: AI-Powered Natural Language Search (Phase 5)
User Query: "What's the penalty for hit-and-run accidents?"
Tool Calls:
aiSearch(query="๋บ์๋ ์ฒ๋ฒ", search=0, display=20, type="XML")โ Semantic search for hit-and-run penalties
Result: LLM receives full article text from relevant laws (ํน์ ๋ฒ์ฃ ๊ฐ์ค์ฒ๋ฒ ๋ฑ์ ๊ดํ ๋ฒ๋ฅ ์ 5์กฐ์3) with complete provisions about hit-and-run penalties, enabling comprehensive answer without needing to know specific law names.
Trajectory 9: Discovering Related Laws (Phase 5)
User Query: "What laws are related to the Civil Code?"
Tool Calls:
aiRltLs_search(query="๋ฏผ๋ฒ", search=0, type="XML")โ Find semantically related laws
Result: LLM discovers related laws like ์๋ฒ (Commercial Act), ์๋ฃ๋ฒ (Medical Service Act), ์์ก์ด์ง๋ฒ (Act on Special Cases Concerning Expedition of Litigation), showing connections across legal domains.
Key Patterns
AI Tools for Vague Queries: Use
aiSearchoraiRltLs_searchFIRST when user intent is unclear or conversationalSearch First, Then Retrieve: Always search to find IDs before calling service tools
Use display=50-100 for Law Searches: Ensures exact matches are found due to relevance ranking
Combine Phases: Mix Phase 1 (laws), Phase 2 (administrative rules), Phase 3 (precedents), and Phase 5 (AI search) for complete research
Type Parameter: Default is
type="JSON"; specifytype="XML"if your pipeline requires XMLArticle Numbers: Use 6-digit format (e.g., "002000" for Article 20) when querying specific articles
Development
Project Structure
lexlink-ko-mcp/
โโโ src/lexlink/
โ โโโ server.py # Main MCP server with 54 tools
โ โโโ _helpers.py # Shared helpers: run_search, run_service, TOOL_ANNOTATIONS
โ โโโ cache.py # Intelligent per-tool TTL caching (~183 lines)
โ โโโ resolver.py # Korean law name/abbreviation resolution (~225 lines)
โ โโโ http_server.py # HTTP/SSE server for Kakao PlayMCP
โ โโโ stdio_server.py # Stdio transport entry point
โ โโโ params.py # Parameter resolution & mapping
โ โโโ validation.py # Input validation
โ โโโ parser.py # XML parsing utilities
โ โโโ ranking.py # Relevance ranking
โ โโโ citation.py # Article citation extraction (Phase 4)
โ โโโ client.py # HTTP client for law.go.kr API
โ โโโ errors.py # Error codes & responses
โ โโโ raw_logger.py # PlayMCP traffic logging
โ โโโ log_processor.py # Log format converter
โโโ logs/playmcp/ # PlayMCP traffic logs (daily JSONL)
โโโ pyproject.toml # Project configuration
โโโ README.md # This fileRunning Tests
# Install test dependencies
uv sync
# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov=src/lexlink --cov-report=html
# Run specific test category
uv run pytest -m unit
uv run pytest -m integration
uv run pytest -m e2eAdding New Tools
Current Status: 54/54 tools implemented (Phase 1-9 complete). Phase 1-5 tools validated.
For implementing additional tools from the 124+ remaining APIs:
Follow the pattern established in
src/lexlink/server.pyUse
ctx: Context = Noneparameter for MCP logging/progressUse generic parser functions (
extract_items_list,update_items_list)Add semantic validation tests
Tool Implementation Pattern:
Each tool is a decorated function with MCP schema
Uses
ctx: Context = Noneparameter for MCP context2-tier OC resolution: tool arg > env var
Generic parser functions work with any XML tag
Comprehensive error handling with actionable hints
Deployment
Deploy to Kakao PlayMCP (HTTP Server)
LexLink can also be deployed as an HTTP server for platforms like Kakao PlayMCP.
Important: Kakao PlayMCP does not accept port numbers in URLs. You must use Nginx as a reverse proxy to serve on port 80.
Quick Start (Local Testing):
# Run the HTTP server
OC=your_oc uv run serve
# Server starts at: http://localhost:8000/sseProduction Setup:
Internet โ Nginx (port 80) โ LexLink (port 8000)PlayMCP Registration:
Field | Value |
MCP Endpoint |
|
Authentication | Key/Token (Header: |
For detailed deployment instructions (AWS EC2, Nginx, systemd, HTTPS), see docs/DEPLOYMENT_GUIDE.md.
PlayMCP Traffic Logging
LexLink includes built-in logging for PlayMCP traffic analysis. Logs are saved in dashboard-compatible JSONL format.
Log Location: logs/playmcp/YYYY-MM-DD.jsonl
Log Schema:
{
"rpc_id": "3",
"request_id": "d8ee45eb",
"session_id": "9ff9dc23431848a4901b4cb6326ba5bd",
"timestamp": "2025-12-25T05:40:23.957987",
"duration_ms": 1.52,
"method": "tools/call",
"tool_name": "aiSearch",
"params": { "arguments": {"query": "๋บ์๋ ์ฒ๋ฒ"} },
"client": "PlayMCP",
"client_version": "2025.0.0",
"protocol_version": "2025-06-18",
"client_ip": "220.64.111.219",
"oc": "user_id",
"status": "success",
"status_code": 200,
"result": { ... }
}Features:
Daily log rotation (one file per day)
Dashboard-compatible format for filtering and analysis
Captures request/response pairs with timing
SSE streaming response parsing
Converting Old Raw Logs:
uv run python -m lexlink.log_processor input.jsonl output.jsonlTroubleshooting
"OC parameter is required" error
Solution: Set your OC identifier using one of the three methods above.
Korean characters not displaying correctly
Solution: Ensure your terminal supports UTF-8:
export PYTHONIOENCODING=utf-8"Timeout" errors
Solution: Increase timeout via environment variable:
export LEXLINK_TIMEOUT=90 # Increase from default 60sServer won't start after updating dependencies
Solution: Re-sync dependencies:
uv sync --reinstallContributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Write tests for new functionality
Ensure all tests pass (
uv run pytest)Commit changes (
git commit -m 'Add amazing feature')Push to branch (
git push origin feature/amazing-feature)Open a Pull Request
License
This project is open source. See LICENSE file for details.
Acknowledgments
law.go.kr - Korean National Law Information API
MCP - Model Context Protocol by Anthropic
korean-law-mcp - Inspiration for caching, law name resolution, and chain tools (Phase 9)
Support
Issues: GitHub Issues
law.go.kr API: Official Documentation
Changelog
v2.1.0 - 2026-03-30
New: Caching, Law Name Resolution, Chain Tools (Phase 9)
Added intelligent per-tool TTL caching (
cache.py): search 1hr, articles 24hr, AI search 30minAdded law name/abbreviation resolution (
resolver.py): 52 seed aliases + dynamic learningAdded 5 Phase 9 chain tools:
chain_full_research,chain_amendment_track,chain_dispute_prep,chain_law_system,cache_statsInspired by korean-law-mcp
See CHANGELOG.md for full details
v2.0.0 - 2026-03-30
Major Release: Phase 7 Tools, JSON Default, sections Parameter
Added 18 new Phase 7 tools (์์น๋ฒ๊ท, ์กฐ์ฝ, ๋ฒ๋ น์ ๋ณด ์ง์๋ฒ ์ด์ค, ์์ํ ๊ฒฐ์ ๋ฌธ, ์ค์๋ถ์ฒ ํด์, ํน๋ณํ์ ์ฌํ)
JSON is now the default response format (was XML)
Added
sections="summary"parameter for case law service toolsRefactored shared logic into
_helpers.pySee CHANGELOG.md for full details
v1.5.0 - 2026-02-28
Refactor: Remove Smithery Dependency
Removed
smitherypackage and 8 transitive dependenciesSimplified OC resolution to 2-tier (tool arg > env var)
Added
stdio_server.pyentry point for stdio transportSee CHANGELOG.md for full details
For the full changelog (v1.0.0 โ v2.1.0), see CHANGELOG.md.
Powered by MCP
Available Tools
54 toolsadmrul_searchARead-onlyIdempotent
Search administrative rules (ํ์ ๊ท์น ๋ชฉ๋ก ์กฐํ).
This tool searches Korean administrative rules including ํ๋ น, ์๊ท, ๊ณ ์, ๊ณต๊ณ , ์ง์นจ, etc. Administrative rules are detailed regulations issued by government agencies.
Args:
query: Search keyword (default "*")
display: Number of results per page (max 100, default 20). Recommend 50-100 for law searches (๋ฒ๋ น ๊ฒ์) to ensure exact matches are found.
page: Page number (1-based, default 1)
oc: Optional OC override (defaults to env var)
type: Response format - "JSON" (default), "XML", or "HTML"
nw: 1=ํํ (current), 2=์ฐํ (historical), default 1
search: 1=๊ท์น๋ช
(rule name), 2=๋ณธ๋ฌธ๊ฒ์ (full text), default 1
org: Ministry/department code filter
knd: Rule type - 1=ํ๋ น, 2=์๊ท, 3=๊ณ ์, 4=๊ณต๊ณ , 5=์ง์นจ, 6=๊ธฐํ
date: Promulgation date (YYYYMMDD)
prml_yd: Promulgation date range (YYYYMMDDYYYYMMDD)
mod_yd: Modification date range (YYYYMMDDYYYYMMDD)
sort: Sort order
ctx: MCP context (injected automatically)
Returns: Search results with administrative rules list or error
Examples: Search for "ํ๊ต": >>> admrul_search(query="ํ๊ต", display=10, type="XML")
Search by date:
>>> admrul_search(date=20250501, type="XML")
Inputs: nw, oc, knd, org, +9 more.
admrul_serviceARead-onlyIdempotent
Retrieve administrative rule full text (ํ์ ๊ท์น ๋ณธ๋ฌธ ์กฐํ).
This tool retrieves the complete text of Korean administrative rules. Includes rule content, addenda, and annexes (forms/attachments).
Args: id: Rule sequence number (required if lid/lm not provided) lid: Rule ID (alternative to id) lm: Rule name (exact match search) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" ctx: MCP context (injected automatically)
Returns: Full administrative rule text with content and annexes or error
Examples: Retrieve by ID: >>> admrul_service(id="62505", type="XML")
Retrieve by LID:
>>> admrul_service(lid="10000005747", type="XML")
Inputs: id, lm, oc, lid, +1 more.
aiRltLs_searchARead-onlyIdempotent
โญ PREFERRED TOOL for discovering related laws from vague topics. Use this when user wants to explore laws around a general subject.
์ง๋ฅํ ๋ฒ๋ น๊ฒ์ ์์คํ ์ฐ๊ด๋ฒ๋ น API (AI-powered related laws search).
Finds laws semantically related to a given law name or keyword.
Best for: Finding related laws like "๋ฏผ๋ฒ" โ ์๋ฒ, ์๋ฃ๋ฒ, ์์ก์ด์ง๋ฒ
Args: query: Law name or keyword to find related laws (e.g., "๋ฏผ๋ฒ", "ํ๋ฒ") search: Search scope: - 0: ๋ฒ๋ น์กฐ๋ฌธ (law articles, default) - 1: ํ์ ๊ท์น์กฐ๋ฌธ (administrative rule articles) oc: Optional OC override type: Response format - "JSON" (default), "XML", or "HTML"
Returns: List of semantically related law articles (๋ฒ๋ น์กฐ๋ฌธ items)
Example: >>> aiRltLs_search(query="๋ฏผ๋ฒ") # Returns: ์๋ฒ ์ 54์กฐ (์์ฌ๋ฒ์ ์ด์จ), ์๋ฃ๋ฒ ์ 50์กฐ (ใ๋ฏผ๋ฒใ์ ์ค์ฉ), etc.
Inputs: query (required), oc, type, search.
aiSearchARead-onlyIdempotent
โญ PREFERRED TOOL for vague or natural language queries. Use this FIRST when user's intent is unclear or conversational.
์ง๋ฅํ ๋ฒ๋ น๊ฒ์ ์์คํ ๊ฒ์ API (AI-powered semantic law search).
Uses intelligent/semantic search to find relevant law articles. Returns FULL ARTICLE TEXT (์กฐ๋ฌธ๋ด์ฉ) - more comprehensive than eflaw_search.
Best for: Natural language queries like "๋บ์๋ ์ฒ๋ฒ", "์์ฃผ์ด์ ๋ฒ๊ธ"
Args: query: Search query (natural language supported, e.g., "๋บ์๋ ์ฒ๋ฒ") search: Search scope: - 0: ๋ฒ๋ น์กฐ๋ฌธ (law articles, default) - 1: ๋ฒ๋ น ๋ณํยท์์ (law appendix/forms) - 2: ํ์ ๊ท์น ์กฐ๋ฌธ (administrative rule articles) - 3: ํ์ ๊ท์น ๋ณํยท์์ (administrative rule appendix/forms) display: Results per page (default 20) page: Page number (default 1) oc: Optional OC override type: Response format - "JSON" (default), "XML", or "HTML"
Returns: AI search results with full article text (๋ฒ๋ น์กฐ๋ฌธ items with ์กฐ๋ฌธ๋ด์ฉ)
Example: >>> aiSearch(query="๋บ์๋ ์ฒ๋ฒ", search=0) # Returns: ํน์ ๋ฒ์ฃ ๊ฐ์ค์ฒ๋ฒ ๋ฑ์ ๊ดํ ๋ฒ๋ฅ ์ 5์กฐ์3 (๋์ฃผ์ฐจ๋ ์ด์ ์์ ๊ฐ์ค์ฒ๋ฒ)
Inputs: query (required), oc, page, type, +2 more.
article_amendment_diffARead-onlyIdempotent
Compare how a specific article changed between two law versions (์กฐ๋ฌธ ์ ๊ตฌ๋์กฐ).
Use MST values from law_amendment_summary to compare article text across revisions.
Args: mst_old: MST of the older version (๋ฒ๋ น์ผ๋ จ๋ฒํธ, from law_amendment_summary) mst_new: MST of the newer version article: Article number (e.g., 52 for ์ 52์กฐ) article_branch: Branch number (e.g., 2 for ์ 52์กฐ์2, default 0) oc: Optional OC override type: Response format - "JSON" (default), "XML", or "HTML"
Returns: Side-by-side comparison with line-level diff
Examples: >>> article_amendment_diff(mst_old="269000", mst_new="273000", article=52)
Inputs: article (required), mst_new (required), mst_old (required), oc, +2 more.
article_citationARead-onlyIdempotent
Extract citations from a law article (์กฐ๋ฌธ ์ธ์ฉ ์กฐํ).
This tool extracts all legal citations referenced by a specific law article. It parses the official hyperlinked citations from law.go.kr HTML pages, providing 100% accurate citation data with zero API cost.
The tool identifies:
External citations (references to other laws)
Internal citations (references within the same law)
Article, paragraph, and item level references
Args: mst: Law MST code (๋ฒ๋ น์ผ๋ จ๋ฒํธ) - get this from eflaw_search or law_search results law_name: Law name in Korean (e.g., "์๋ณธ์์ฅ๊ณผ ๊ธ์ตํฌ์์ ์ ๊ดํ ๋ฒ๋ฅ ") article: Article number (์กฐ๋ฒํธ, e.g., 3 for ์ 3์กฐ) article_branch: Article branch number (์กฐ๊ฐ์ง๋ฒํธ, e.g., 2 for ์ 37์กฐ์2, default 0) oc: Optional OC override (defaults to env var)
Returns: Citation extraction result with: - success: Whether extraction succeeded - law_id: MST code - law_name: Law name - article: Article display (e.g., "์ 3์กฐ" or "์ 37์กฐ์2") - citation_count: Total number of citations found - citations: List of citation objects with target law, article, paragraph, item - internal_count: Number of same-law citations - external_count: Number of other-law citations
Examples: Get citations from ์๋ณธ์์ฅ๋ฒ ์ 3์กฐ: >>> article_citation( ... mst="268611", ... law_name="์๋ณธ์์ฅ๊ณผ ๊ธ์ตํฌ์์ ์ ๊ดํ ๋ฒ๋ฅ ", ... article=3 ... )
Get citations from ๊ฑด์ถ๋ฒ ์ 37์กฐ์2:
>>> article_citation(
... mst="270986",
... law_name="๊ฑด์ถ๋ฒ",
... article=37,
... article_branch=2
... )Workflow: 1. First use eflaw_search(query="๋ฒ๋ช ") to find the law and get MST 2. Then use article_citation(mst=..., law_name=..., article=...) to get citations 3. Optionally use eflaw_service to get the full article text
Inputs: mst (required), article (required), law_name (required), oc, +1 more.
cache_statsARead-onlyIdempotent
Show cache and resolver statistics (์บ์ ํต๊ณ).
Returns current cache hit rate, entry count, and law name resolver stats. Useful for monitoring server performance.
Returns: Cache statistics and resolver stats
Inputs: no named parameters.
cgm_expc_searchARead-onlyIdempotent
Search ministry law interpretations (์ค์๋ถ์ฒ 1์ฐจ ํด์ ๋ชฉ๋ก ์กฐํ).
Search law interpretation opinions from Korean central government ministries.
Args: ministry: Ministry name in Korean. Valid values: ๊ณ ์ฉ๋ ธ๋๋ถ, ๊ตญํ ๊ตํต๋ถ, ๊ธฐํ์ฌ์ ๋ถ, ํด์์์ฐ๋ถ, ํ์ ์์ ๋ถ, ๊ธฐํ์๋์งํ๊ฒฝ๋ถ, ๊ด์ธ์ฒญ, ๊ตญ์ธ์ฒญ, ๊ต์ก๋ถ, ๊ณผํ๊ธฐ์ ์ ๋ณดํต์ ๋ถ, ๊ตญ๊ฐ๋ณดํ๋ถ, ๊ตญ๋ฐฉ๋ถ, ๋๋ฆผ์ถ์ฐ์ํ๋ถ, ๋ฌธํ์ฒด์ก๊ด๊ด๋ถ, ๋ฒ๋ฌด๋ถ, ๋ณด๊ฑด๋ณต์ง๋ถ, ์ฐ์ ํต์๋ถ, ์ฑํ๋ฑ๊ฐ์กฑ๋ถ, ์ธ๊ต๋ถ, ์ค์๋ฒค์ฒ๊ธฐ์ ๋ถ, ํต์ผ๋ถ, ๋ฒ์ ์ฒ, ์ํ์์ฝํ์์ ์ฒ, ์ธ์ฌํ์ ์ฒ, ๊ธฐ์์ฒญ, ๊ตญ๊ฐ์ ์ฐ์ฒญ, ๋์ด์งํฅ์ฒญ, ๊ฒฝ์ฐฐ์ฒญ, ๋ฐฉ์์ฌ์ ์ฒญ, ๋ณ๋ฌด์ฒญ, ์ฐ๋ฆผ์ฒญ, ์๋ฐฉ์ฒญ, ์ฌ์ธ๋ํฌ์ฒญ, ์กฐ๋ฌ์ฒญ, ์ง๋ณ๊ด๋ฆฌ์ฒญ, ๊ตญ๊ฐ๋ฐ์ดํฐ์ฒ, ์ง์์ฌ์ฐ์ฒ, ํด์๊ฒฝ์ฐฐ์ฒญ, ํ์ ์ค์ฌ๋ณตํฉ๋์๊ฑด์ค์ฒญ query: Search keyword (default "*") display: Number of results per page (max 100, default 20) page: Page number (1-based, default 1) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" search: 1=์ฌ๊ฑด๋ช (case name), 2=๋ณธ๋ฌธ๊ฒ์ (full text) sort: Sort order gana: Dictionary search ctx: MCP context (injected automatically)
Returns: Ministry interpretation list or error
Examples: Search ๊ณ ์ฉ๋ ธ๋๋ถ interpretations: >>> cgm_expc_search(ministry="๊ณ ์ฉ๋ ธ๋๋ถ", query="ํด์ง๊ธ")
Inputs: ministry (required), oc, gana, page, +5 more.
cgm_expc_serviceARead-onlyIdempotent
Retrieve ministry interpretation full text (์ค์๋ถ์ฒ 1์ฐจ ํด์ ๋ณธ๋ฌธ ์กฐํ).
Args: ministry: Ministry name (same values as cgm_expc_search) id: Interpretation serial number (ํด์๋ก์ผ๋ จ๋ฒํธ) oc: Optional OC override type: Response format - "JSON" (default), "XML", or "HTML" ctx: MCP context (injected automatically)
Returns: Full interpretation text or error
Inputs: id (required), ministry (required), oc, type.
chain_amendment_trackARead-onlyIdempotent
Track law amendment history with optional article-level diff (๋ฒ๋ น ๊ฐ์ ์ถ์ ).
Chains: amendment summary โ article diff between latest two versions. If article=0, returns only the revision list. If article is specified, also diffs that article between the two most recent revisions.
Args: law_name: Law name (e.g., "๊ทผ๋ก๊ธฐ์ค๋ฒ") article: Article number to diff (0 = summary only, e.g., 52 for ์ 52์กฐ) date_from: Start date YYYYMMDD (default "20200101") date_to: End date YYYYMMDD (default "20261231") oc: Optional OC override type: Response format
Returns: Revision history and optional article diff
Examples: >>> chain_amendment_track(law_name="๊ทผ๋ก๊ธฐ์ค๋ฒ") >>> chain_amendment_track(law_name="๊ทผ๋ก๊ธฐ์ค๋ฒ", article=52, date_from="20180101")
Inputs: law_name (required), oc, type, article, +2 more.
chain_dispute_prepARead-onlyIdempotent
Prepare for a legal dispute by gathering all case law (๋ถ์ ์ค๋น ์๋ฃ).
Chains: precedent search + admin appeals + constitutional decisions + special tribunal. Gathers all decision-type legal sources in one call.
Args: query: Dispute topic (e.g., "๋ถ๋นํด๊ณ ", "๊ฐ์ธ์ ๋ณด ์ ์ถ", "์กฐ์ธ ๋ถ๊ณผ ์ทจ์") display: Results per category (default 5) oc: Optional OC override type: Response format
Returns: Precedents, admin appeals, constitutional decisions, and special tribunal decisions
Examples: >>> chain_dispute_prep(query="๋ถ๋นํด๊ณ ") >>> chain_dispute_prep(query="๊ฐ์ธ์ ๋ณด ์ ์ถ ๊ณผ์ง๊ธ")
Inputs: query (required), oc, type, display.
chain_full_researchARead-onlyIdempotent
Complete legal research in one call (์ข ํฉ ๋ฒ๋ฅ ์กฐ์ฌ).
Chains: AI search โ statutes โ precedents with outcome analysis โ interpretations โ citations. This is the most comprehensive single-call research tool.
Args: query: Natural language query (e.g., "์์ฃผ์ด์ ์ฒ๋ฒ ๊ธฐ์ค", "์๋์ฐจ ๋ณด์ฆ๊ธ ๋ฐํ") display: Results per sub-query (default 5) oc: Optional OC override type: Response format
Returns: Combined legal analysis with statutes, precedent statistics, interpretations, and citations
Examples: >>> chain_full_research(query="๋ถ๋นํด๊ณ ๊ตฌ์ ") >>> chain_full_research(query="๊ฐ์ธ์ ๋ณด ์ ์ถ ์ ๊ณ ์๋ฌด")
Inputs: query (required), oc, type, display.
chain_law_systemARead-onlyIdempotent
Map the full law system hierarchy (๋ฒ๋ น ์ฒด๊ณ ์กฐํ).
Chains: law search โ delegation tree โ related admin rules โ linked ordinances. Shows how a law connects to its subordinate regulations.
Args: law_name: Law name (e.g., "๊ฑด์ถ๋ฒ", "๊ทผ๋ก๊ธฐ์ค๋ฒ") oc: Optional OC override type: Response format
Returns: Law hierarchy: parent law, delegated decrees/rules, linked ordinances
Examples: >>> chain_law_system(law_name="๊ฑด์ถ๋ฒ") >>> chain_law_system(law_name="๊ฐ์ธ์ ๋ณด ๋ณดํธ๋ฒ")
Inputs: law_name (required), oc, type.
check_precedent_oddsARead-onlyIdempotent
Find precedent statistics and key outcome factors for a legal question (ํ๋ก ์น๋ฅ ๋ถ์).
Searches court precedents, analyzes outcomes (์ธ์ฉ/๊ธฐ๊ฐ/ํ๊ธฐ), and extracts key factors that influenced decisions. Useful for assessing legal odds.
Args: query: Legal question or keywords (e.g., "ํ๋ฐฐ ํ์ ๋ณด์", "์๋์ฐจ ๋ณด์ฆ๊ธ ๋ฐํ") display: Number of precedents to search (max 100, default 20) top_n: Number of top precedents to analyze in detail (default 5) oc: Optional OC override type: Response format - "JSON" (default), "XML", or "HTML"
Returns: Outcome statistics, key factors, and representative case summaries
Examples: >>> check_precedent_odds(query="ํ๋ฐฐ ํ์ ๋ณด์") >>> check_precedent_odds(query="๋ถ๋นํด๊ณ ", display=50, top_n=10)
Inputs: query (required), oc, type, top_n, +1 more.
committee_searchARead-onlyIdempotent
Search committee decisions (์์ํ ๊ฒฐ์ ๋ฌธ ๋ชฉ๋ก ์กฐํ).
Search decisions from Korean government committees.
Args: committee: Committee name in Korean. Valid values: ๊ฐ์ธ์ ๋ณด๋ณดํธ์์ํ, ๊ณ ์ฉ๋ณดํ์ฌ์ฌ์์ํ, ๊ณต์ ๊ฑฐ๋์์ํ, ๊ตญ๋ฏผ๊ถ์ต์์ํ, ๊ธ์ต์์ํ, ๋ ธ๋์์ํ, ๋ฐฉ์ก๋ฏธ๋์ดํต์ ์์ํ, ์ฐ์ ์ฌํด๋ณด์๋ณดํ์ฌ์ฌ์ฌ์์ํ, ์ค์ํ ์ง์์ฉ์์ํ, ์ค์ํ๊ฒฝ๋ถ์์กฐ์ ์์ํ, ์ฆ๊ถ์ ๋ฌผ์์ํ, ๊ตญ๊ฐ์ธ๊ถ์์ํ query: Search keyword (default "*") display: Number of results per page (max 100, default 20) page: Page number (1-based, default 1) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" search: 1=์๊ฑด๋ช (case name), 2=๋ณธ๋ฌธ๊ฒ์ (full text) sort: Sort order gana: Dictionary search ctx: MCP context (injected automatically)
Returns: Committee decision list or error
Examples: Search ๊ณต์ ๊ฑฐ๋์์ํ decisions: >>> committee_search(committee="๊ณต์ ๊ฑฐ๋์์ํ", query="๋ดํฉ")
Inputs: committee (required), oc, gana, page, +5 more.
committee_serviceARead-onlyIdempotent
Retrieve committee decision full text (์์ํ ๊ฒฐ์ ๋ฌธ ๋ณธ๋ฌธ ์กฐํ).
Args: committee: Committee name (same values as committee_search) id: Decision serial number (๊ฒฐ์ ๋ฌธ์ผ๋ จ๋ฒํธ) oc: Optional OC override type: Response format - "JSON" (default), "XML", or "HTML" ctx: MCP context (injected automatically)
Returns: Full decision text or error
Inputs: id (required), committee (required), oc, type.
decc_searchARead-onlyIdempotent
Search administrative appeal decisions (ํ์ ์ฌํ๋ก ๋ชฉ๋ก ์กฐํ).
This tool searches Korean administrative appeal decisions. Administrative appeals are decisions made by administrative tribunals on appeals against government agency dispositions.
Args:
query: Search keyword (default "*")
display: Number of results per page (max 100, default 20)
page: Page number (1-based, default 1)
oc: Optional OC override (defaults to env var)
type: Response format - "JSON" (default), "XML", or "HTML"
search: 1=์ฌ๊ฑด๋ช
(case name, default), 2=๋ณธ๋ฌธ๊ฒ์ (full text)
cls: Decision type filter (์ฌ๊ฒฐ๊ตฌ๋ถ์ฝ๋)
gana: Dictionary search (ga, na, da, ...)
date: Decision date (YYYYMMDD)
dpa_yd: Disposition date range (YYYYMMDDYYYYMMDD)
rsl_yd: Decision date range (YYYYMMDDYYYYMMDD)
sort: Sort order - "lasc"|"ldes"|"dasc"|"ddes"|"nasc"|"ndes"
pop_yn: Popup flag - "Y" or "N"
ctx: MCP context (injected automatically)
Returns: Search results with administrative appeal decisions list or error
Examples: Search for all decisions: >>> decc_search(type="XML")
Search by keyword:
>>> decc_search(query="๊ณผ์ง๊ธ", display=10, type="XML")
Search by date range:
>>> decc_search(rsl_yd="20200101~20201231", type="XML")
Inputs: oc, cls, date, gana, +9 more.
decc_serviceARead-onlyIdempotent
Retrieve administrative appeal decision full text (ํ์ ์ฌํ๋ก ๋ณธ๋ฌธ ์กฐํ).
This tool retrieves the complete text of Korean administrative appeal decisions. Includes case details, disposition information, decision summary, and reasoning.
Args: id: Decision sequence number (required) lm: Decision name (optional) sections: "summary" to exclude ์ด์ (detailed reasoning), or "full"/None for everything. Returns ์ฌ๊ฑด๋ช , ์ฒญ๊ตฌ์ทจ์ง, ์ฌ๊ฒฐ์์ง, ์ฃผ๋ฌธ in summary mode. oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" ctx: MCP context (injected automatically)
Returns: Full administrative appeal decision text with details or error
Examples: Retrieve by ID: >>> decc_service(id="243263", type="XML")
Retrieve with case name:
>>> decc_service(id="245011", lm="๊ณผ์ง๊ธ ๋ถ๊ณผ์ฒ๋ถ ์ทจ์์ฒญ๊ตฌ", type="XML")
Inputs: id (required), lm, oc, type, +1 more.
detc_searchARead-onlyIdempotent
Search Constitutional Court decisions (ํ์ฌ๊ฒฐ์ ๋ก ๋ชฉ๋ก ์กฐํ).
Search Korean Constitutional Court decisions.
Args: query: Search keyword (default "*" for all) display: Number of results per page (max 100, default 20) page: Page number (1-based, default 1) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" search: Search type (1=decision name, 2=full text, default 1) gana: Dictionary search (ga, na, da, ...) sort: Sort order - "lasc"|"ldes"|"dasc"|"ddes"|"nasc"|"ndes"|"efasc"|"efdes" date: Final date (YYYYMMDD) ed_yd: Final date range (YYYYMMDD~YYYYMMDD) nb: Case number pop_yn: Popup flag ("Y" or "N")
Returns: Search results with Constitutional Court decision list or error
Examples: Search for decisions mentioning "๋ฒ๊ธ": >>> detc_search(query="๋ฒ๊ธ", display=10)
Search by date:
>>> detc_search(date=20150210)
Inputs: nb, oc, date, gana, +8 more.
detc_serviceARead-onlyIdempotent
Retrieve Constitutional Court decision full text (ํ์ฌ๊ฒฐ์ ๋ก ๋ณธ๋ฌธ ์กฐํ).
Args: id: Constitutional Court decision sequence number (ํ์ฌ๊ฒฐ์ ๋ก์ผ๋ จ๋ฒํธ) lm: Decision name (optional) sections: "summary" to exclude ์ ๋ฌธ (full text), or "full"/None for everything. Recommended: "summary" for PlayMCP to stay under 20KB. oc: Optional OC override type: Response format - "JSON" (default), "XML", or "HTML"
Returns: Full Constitutional Court decision text or error
Examples: >>> detc_service(id="58386") >>> detc_service(id="58386", sections="summary")
Inputs: id (required), lm, oc, type, +1 more.
dlytrm_rlt_searchARead-onlyIdempotent
Everyday term to legal term linkage (์ผ์์ฉ์ดโ๋ฒ๋ น์ฉ์ด ์ฐ๊ณ ์กฐํ).
This tool searches the linkage from plain-language (everyday) terms back to their formal legal equivalents. Useful for finding the correct legal terminology when starting from common language.
Args: query: Search keyword (default "*") display: Number of results per page (max 100, default 20) page: Page number (1-based, default 1) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" ctx: MCP context (injected automatically)
Returns: Search results or error
Inputs: oc, page, type, query, +1 more.
dlytrm_searchARead-onlyIdempotent
Search everyday terms (์ผ์์ฉ์ด ์กฐํ).
This tool searches plain-language (everyday) terms and their legal equivalents, helping bridge common language with formal legal terminology.
Args: query: Search keyword (default "*") display: Number of results per page (max 100, default 20) page: Page number (1-based, default 1) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" ctx: MCP context (injected automatically)
Returns: Search results or error
Inputs: oc, page, type, query, +1 more.
drlaw_searchARead-onlyIdempotent
Retrieve law-ordinance linkage statistics (๋ฒ๋ น-์์น๋ฒ๊ท ์ฐ๊ณํํฉ ์กฐํ).
This tool retrieves statistical information about how national laws are linked to local ordinances. Returns HTML visualization/dashboard.
โ ๏ธ Note: This API only supports HTML output format (no XML/JSON). Response schema is not documented by the API provider.
Args: oc: Optional OC override (defaults to env var) ctx: MCP context (injected automatically)
Returns: HTML response with linkage statistics or error
Examples: Get linkage statistics: >>> drlaw_search()
Inputs: oc.
eflaw_josubARead-onlyIdempotent
Query specific article/paragraph by effective date (์ํ์ผ ๊ธฐ์ค ์กฐยทํญยทํธยท๋ชฉ ์กฐํ).
BEST TOOL for querying specific articles like "์ 174์กฐ", "์ 3์กฐ" etc. This returns only the requested article/paragraph, avoiding large full-law responses.
Args: id: Law ID (either id or mst is required) mst: Law serial number (MST) ef_yd: Effective date (YYYYMMDD) - required when using mst jo: Article number in XXXXXX format. Format: first 4 digits = article number (zero-padded), last 2 digits = branch suffix (00=main). Examples: "017400" (์ 174์กฐ), "017200" (์ 172์กฐ), "000300" (์ 3์กฐ), "001502" (์ 15์กฐ์2) hang: Paragraph number (6 digits, e.g., "000100" for ์ 1ํญ) ho: Item number (6 digits, e.g., "000200" for ์ 2ํธ) mok: Subitem (UTF-8 encoded, e.g., "๋ค" for ๋ค๋ชฉ) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML"
Returns: Specific law section content
Examples: Query ์๋ณธ์์ฅ๋ฒ ์ 174์กฐ: >>> eflaw_josub(mst="279823", jo="017400", type="XML")
Query ๊ฑด์ถ๋ฒ ์ 3์กฐ ์ 1ํญ:
>>> eflaw_josub(mst="276925", jo="000300", hang="000100", type="XML")
Inputs: ho, id, jo, oc, +5 more.
eflaw_searchARead-onlyIdempotent
Search current laws by effective date (์ํ์ผ ๊ธฐ์ค ํํ๋ฒ๋ น ๊ฒ์).
This tool searches Korean laws organized by effective date. Use this when you need to find laws that are currently in effect.
Args:
query: Search keyword (law name or content)
display: Number of results per page (max 100, default 20). Recommend 50-100 for law searches (๋ฒ๋ น ๊ฒ์) to ensure exact matches are found.
page: Page number (1-based, default 1)
oc: Optional OC override (defaults to env var)
type: Response format - "JSON" (default), "XML", or "HTML"
sort: Sort order - "lasc"|"ldes"|"dasc"|"ddes"|"nasc"|"ndes"|"efasc"|"efdes"
ef_yd: Effective date range (YYYYMMDDYYYYMMDD, e.g., "2024010120241231")
org: Ministry/department code filter
knd: Law type filter
Returns: Search results with law list or error
Examples: Search for "์๋์ฐจ๊ด๋ฆฌ๋ฒ": >>> eflaw_search(query="์๋์ฐจ๊ด๋ฆฌ๋ฒ", display=10, type="JSON")
Search with date range:
>>> eflaw_search(
... query="์๋์ฐจ",
... ef_yd="20240101~20241231",
... type="JSON"
... )
Inputs: query (required), oc, knd, org, +5 more.
eflaw_serviceARead-onlyIdempotent
Retrieve full law content by effective date (์ํ์ผ ๊ธฐ์ค ๋ฒ๋ น ๋ณธ๋ฌธ ์กฐํ).
Retrieves the complete text of a law organized by effective date.
IMPORTANT: For specific article queries (e.g., "์ 174์กฐ"), ALWAYS use the jo parameter.
Some laws (e.g., ์๋ณธ์์ฅ๋ฒ) have 400+ articles and the full response can exceed 1MB.
Using jo returns only the requested article, which is much faster and cleaner.
Args: id: Law ID (either id or mst is required) mst: Law serial number (MST/lsi_seq) ef_yd: Effective date (YYYYMMDD) - required when using mst jo: REQUIRED for specific articles. Article number in XXXXXX format. Format: first 4 digits = article number (zero-padded), last 2 digits = branch suffix (00=main). Examples: "017400" (์ 174์กฐ), "017200" (์ 172์กฐ), "000300" (์ 3์กฐ), "001502" (์ 15์กฐ์2) chr_cls_cd: Language code - "010202" (Korean, default) or "010201" (Original) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML"
Returns: Full law content or specific article content
Examples: Retrieve specific article (RECOMMENDED): >>> eflaw_service(mst="279823", jo="017400", type="XML") # ์๋ณธ์์ฅ๋ฒ ์ 174์กฐ
Retrieve full law (WARNING: large response for some laws):
>>> eflaw_service(id="1747", type="XML")
Inputs: id, jo, oc, mst, +3 more.
elaw_searchARead-onlyIdempotent
Search English-translated Korean laws (์๋ฌธ๋ฒ๋ น ๋ชฉ๋ก ์กฐํ).
This tool searches Korean laws that have been translated to English. Useful for international users or bilingual legal research.
Args: query: Search keyword (Korean or English, default "*") display: Number of results per page (max 100, default 20). Recommend 50-100 for law searches (๋ฒ๋ น ๊ฒ์) to ensure exact matches are found. page: Page number (1-based, default 1) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" sort: Sort order - "lasc"|"ldes"|"dasc"|"ddes"|"nasc"|"ndes"|"efasc"|"efdes" ef_yd: Effective date range (YYYYMMDD~YYYYMMDD) org: Ministry/department code filter knd: Law type filter ctx: MCP context (injected automatically)
Returns: Search results with English law list or error
Examples: Search for "insurance": >>> elaw_search(query="insurance", display=10, type="XML")
Search for "๊ฐ์ ํญ๋ ฅ๋ฐฉ์ง":
>>> elaw_search(query="๊ฐ์ ํญ๋ ฅ๋ฐฉ์ง", type="XML")
Inputs: oc, knd, org, page, +5 more.
elaw_serviceARead-onlyIdempotent
Retrieve English law full text (์๋ฌธ๋ฒ๋ น ๋ณธ๋ฌธ ์กฐํ).
This tool retrieves the complete text of Korean laws translated to English. Useful for international legal research and cross-border understanding.
Args: id: Law ID (required if mst not provided) mst: Law master number (required if id not provided) lm: Law name (alternative search method) ld: Announcement date (YYYYMMDD) ln: Announcement number oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" ctx: MCP context (injected automatically)
Returns: Full English law text with articles or error
Examples: Retrieve by ID: >>> elaw_service(id="000744", type="XML")
Retrieve by MST:
>>> elaw_service(mst="127280", type="XML")
Inputs: id, ld, lm, ln, +3 more.
expc_searchARead-onlyIdempotent
Search legal interpretations (๋ฒ๋ นํด์๋ก ๋ชฉ๋ก ์กฐํ).
This tool searches Korean legal interpretation precedents issued by government agencies in response to inquiries about how to interpret specific laws.
Args:
query: Search keyword (default "*")
display: Number of results per page (max 100, default 20). Recommend 50-100 for searches to ensure exact matches are found.
page: Page number (1-based, default 1)
oc: Optional OC override (defaults to env var)
type: Response format - "JSON" (default), "XML", or "HTML"
search: 1=๋ฒ๋ นํด์๋ก๋ช
(interpretation name, default), 2=๋ณธ๋ฌธ๊ฒ์ (full text)
inq: Inquiry organization name
rpl: Reply organization code
gana: Dictionary-style search (ga, na, da, ...)
itmno: Item number (e.g., 13-0217 โ 130217)
reg_yd: Registration date range (YYYYMMDDYYYYMMDD)
expl_yd: Interpretation date range (YYYYMMDDYYYYMMDD)
sort: Sort order - "lasc"|"ldes"|"dasc"|"ddes"|"nasc"|"ndes"
pop_yn: Popup mode - "Y" or "N"
ctx: MCP context (injected automatically)
Returns: Search results with legal interpretations list or error
Examples: Search for "์์ฐจ": >>> expc_search(query="์์ฐจ", display=10, type="XML")
Search by date range:
>>> expc_search(query="์๋์ฐจ", expl_yd="20240101~20241231", type="XML")
Inputs: oc, inq, rpl, gana, +10 more.
expc_serviceARead-onlyIdempotent
Retrieve legal interpretation full text (๋ฒ๋ นํด์๋ก ๋ณธ๋ฌธ ์กฐํ).
This tool retrieves the complete text of a legal interpretation precedent, including the question summary, answer, and reasoning.
Args: id: Legal interpretation sequence number (required) lm: Legal interpretation name (optional) sections: "summary" to exclude ์ด์ (detailed reasoning), or "full"/None for everything. Returns ์๊ฑด๋ช , ์ง์์์ง, ํ๋ต in summary mode (~2KB vs ~5KB full). oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" ctx: MCP context (injected automatically)
Returns: Full legal interpretation text with question, answer, and reasoning or error
Examples: Retrieve by ID: >>> expc_service(id="334617", type="XML")
Retrieve with name:
>>> expc_service(id="315191", lm="์ฌ์ฑ๊ฐ์กฑ๋ถ - ๊ฑด๊ฐ๊ฐ์ ๊ธฐ๋ณธ๋ฒ ์ 35์กฐ ์ 2ํญ ๊ด๋ จ", type="XML")
Inputs: id (required), lm, oc, type, +1 more.
jo_rlt_lstrm_searchARead-onlyIdempotent
Article to legal term linkage (์กฐ๋ฌธโ๋ฒ๋ น์ฉ์ด ์ฐ๊ณ ์กฐํ).
This tool searches the linkage from specific law articles to the legal terms defined or used within those articles. Useful for finding all technical terms in a given article.
Args: query: Search keyword (default "*") display: Number of results per page (max 100, default 20) page: Page number (1-based, default 1) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" ctx: MCP context (injected automatically)
Returns: Search results or error
Inputs: oc, page, type, query, +1 more.
law_amendment_summaryARead-onlyIdempotent
List all revisions of a law within a date range (๋ฒ๋ น ๊ฐ์ ์ด๋ ฅ ์กฐํ).
Shows when and how a law was amended over time. Use the MST values from the results with article_amendment_diff to see specific article changes.
Args: law_name: Law name (e.g., "๊ทผ๋ก๊ธฐ์ค๋ฒ") date_from: Start date YYYYMMDD (default "20100101") date_to: End date YYYYMMDD (default "20261231") oc: Optional OC override type: Response format - "JSON" (default), "XML", or "HTML"
Returns: List of revisions with dates, types, and MST identifiers
Examples: >>> law_amendment_summary(law_name="๊ทผ๋ก๊ธฐ์ค๋ฒ", date_from="20200101") >>> law_amendment_summary(law_name="๋ฏผ๋ฒ", date_from="20150101", date_to="20251231")
Inputs: law_name (required), oc, type, date_to, +1 more.
law_josubARead-onlyIdempotent
Query specific article/paragraph by announcement date (๊ณตํฌ์ผ ๊ธฐ์ค ์กฐยทํญยทํธยท๋ชฉ ์กฐํ).
BEST TOOL for querying specific articles like "์ 174์กฐ", "์ 3์กฐ" etc. This returns only the requested article/paragraph, avoiding large full-law responses.
Args: id: Law ID (either id or mst is required) mst: Law serial number (MST) jo: Article number in XXXXXX format. Format: first 4 digits = article number (zero-padded), last 2 digits = branch suffix (00=main). Examples: "017400" (์ 174์กฐ), "017200" (์ 172์กฐ), "000300" (์ 3์กฐ), "001502" (์ 15์กฐ์2) hang: Paragraph number (6 digits, e.g., "000100" for ์ 1ํญ) ho: Item number (6 digits, e.g., "000200" for ์ 2ํธ) mok: Subitem (UTF-8 encoded, e.g., "๋ค" for ๋ค๋ชฉ) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML"
Returns: Specific law section content
Examples: Query ์๋ณธ์์ฅ๋ฒ ์ 174์กฐ: >>> law_josub(mst="279823", jo="017400", type="XML")
Query ๊ฑด์ถ๋ฒ ์ 3์กฐ ์ 1ํญ:
>>> law_josub(mst="276925", jo="000300", hang="000100", type="XML")
Inputs: ho, id, jo, oc, +4 more.
law_searchARead-onlyIdempotent
Search current laws by announcement date (๊ณตํฌ์ผ ๊ธฐ์ค ํํ๋ฒ๋ น ๊ฒ์).
This tool searches Korean laws organized by announcement (publication) date.
Args: query: Search keyword (law name or content) display: Number of results per page (max 100, default 20). Recommend 50-100 for law searches (๋ฒ๋ น ๊ฒ์) to ensure exact matches are found. page: Page number (1-based, default 1) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" sort: Sort order date: Announcement date (YYYYMMDD) org: Ministry/department code filter knd: Law type filter
Returns: Search results with law list or error
Inputs: query (required), oc, knd, org, +5 more.
law_serviceARead-onlyIdempotent
Retrieve full law content by announcement date (๊ณตํฌ์ผ ๊ธฐ์ค ๋ฒ๋ น ๋ณธ๋ฌธ ์กฐํ).
Retrieves the complete text of a law organized by announcement (publication) date.
IMPORTANT: For specific article queries (e.g., "์ 174์กฐ"), ALWAYS use the jo parameter.
Some laws (e.g., ์๋ณธ์์ฅ๋ฒ) have 400+ articles and the full response can exceed 1MB.
Using jo returns only the requested article, which is much faster and cleaner.
Args: id: Law ID (either id or mst is required) mst: Law serial number (MST) lm: Law modification parameter ld: Law date parameter (YYYYMMDD) ln: Law number parameter jo: REQUIRED for specific articles. Article number in XXXXXX format. Format: first 4 digits = article number (zero-padded), last 2 digits = branch suffix (00=main). Examples: "017400" (์ 174์กฐ), "017200" (์ 172์กฐ), "000300" (์ 3์กฐ), "001502" (์ 15์กฐ์2) lang: Language - "KO" (Korean) or "ORI" (Original) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML"
Returns: Full law content or specific article content
Examples: Retrieve specific article (RECOMMENDED): >>> law_service(mst="279823", jo="017400", type="XML") # ์๋ณธ์์ฅ๋ฒ ์ 174์กฐ
Retrieve full law (WARNING: large response for some laws):
>>> law_service(id="009682", type="XML")
Inputs: id, jo, ld, lm, +5 more.
legal_resolverARead-onlyIdempotent
Find all applicable laws, precedents, and interpretations for a situation (๋ฒ๋ฅ ์ข ํฉ ๋ถ์).
Given a plain language description of a legal situation, this tool searches across multiple legal databases in one call: law articles, court precedents, legal interpretations, and citation networks.
Args: situation: Plain language description (e.g., "์ง์์ด ๊ณ ๊ฐ ๋ฐ์ดํฐ๋ฅผ USB์ ๋ด์๊ฐ๋ค") display: Results per sub-query (default 5) oc: Optional OC override type: Response format - "JSON" (default), "XML", or "HTML"
Returns: Comprehensive legal analysis with applicable laws, precedents, interpretations, and citations
Examples: >>> legal_resolver(situation="์ง์ฃผ์ธ์ด ๋ณด์ฆ๊ธ์ ์ ๋๋ ค์ค์") >>> legal_resolver(situation="ํ์ฌ์์ ๊ฐ์๊ธฐ ํด๊ณ ๋นํ์ด์", display=3)
Inputs: situation (required), oc, type, display.
lnkDep_searchARead-onlyIdempotent
Search law-ordinance links by ministry (์ฐ๊ณ ๋ฒ๋ น ์๊ด๋ถ์ฒ๋ณ ๋ชฉ๋ก ์กฐํ).
This tool searches local ordinances linked to laws managed by a specific government ministry or department.
Args: org: Ministry/department code (required, e.g., "1400000") display: Number of results per page (max 100, default 20). Recommend 50-100 for law searches (๋ฒ๋ น ๊ฒ์) to ensure exact matches are found. page: Page number (1-based, default 1) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" sort: Sort order ctx: MCP context (injected automatically)
Returns: Search results with ministry's linked ordinances or error
Examples: Search ordinances linked to ministry 1400000: >>> lnkDep_search(org="1400000", type="XML")
Inputs: org (required), oc, page, sort, +2 more.
lnkLsOrdJo_searchARead-onlyIdempotent
Search ordinance articles linked to law articles (์ฐ๊ณ ๋ฒ๋ น๋ณ ์กฐ๋ก ์กฐ๋ฌธ ๋ชฉ๋ก ์กฐํ).
This tool searches local ordinance articles that are linked to specific national law articles. Shows which local ordinances implement or relate to specific law provisions.
Args: query: Search keyword (default "*") display: Number of results per page (max 100, default 20). Recommend 50-100 for law searches (๋ฒ๋ น ๊ฒ์) to ensure exact matches are found. page: Page number (1-based, default 1) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" knd: Law type code (to filter by specific law) jo: Article number (4 digits, zero-padded). Examples: "0002" (Article 2), "0020" (Article 20), "0100" (Article 100) jobr: Branch article suffix (2 digits, zero-padded). Examples: "00" (main article), "02" (Article X-2) sort: Sort order ctx: MCP context (injected automatically)
Returns: Search results with linked ordinance articles or error
Examples: Search ordinances linked to ๊ฑด์ถ๋ฒ ์ํ๋ น: >>> lnkLsOrdJo_search(knd="002118", type="XML")
Search specific article (์ 20์กฐ):
>>> lnkLsOrdJo_search(knd="002118", jo=20, type="XML")
Inputs: jo, oc, knd, jobr, +5 more.
lnkLs_searchARead-onlyIdempotent
Search laws linked to local ordinances (๋ฒ๋ น-์์น๋ฒ๊ท ์ฐ๊ณ ๋ชฉ๋ก ์กฐํ).
This tool searches Korean laws that have linkages to local ordinances. Useful for understanding how national laws relate to local regulations.
Args: query: Search keyword (default "*") display: Number of results per page (max 100, default 20). Recommend 50-100 for law searches (๋ฒ๋ น ๊ฒ์) to ensure exact matches are found. page: Page number (1-based, default 1) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" sort: Sort order - "lasc"|"ldes"|"dasc"|"ddes"|"nasc"|"ndes" ctx: MCP context (injected automatically)
Returns: Search results with linked laws list or error
Examples: Search for "์๋์ฐจ๊ด๋ฆฌ๋ฒ": >>> lnkLs_search(query="์๋์ฐจ๊ด๋ฆฌ๋ฒ", type="XML")
Inputs: oc, page, sort, type, +2 more.
lsDelegated_serviceARead-onlyIdempotent
Retrieve delegated laws/rules/ordinances (์์ ๋ฒ๋ น ์กฐํ).
This tool retrieves information about laws, administrative rules, and local ordinances that are delegated by a parent law. Shows the delegation hierarchy and which specific articles delegate authority.
โ ๏ธ Note: This API does NOT support HTML format (only XML/JSON).
Args: id: Law ID (required if mst not provided) mst: Law master number (required if id not provided) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default) or "XML" (HTML not available for this endpoint) ctx: MCP context (injected automatically)
Returns: Delegation hierarchy with delegated laws/rules/ordinances or error
Examples: Retrieve delegations for ์ดยท์ค๋ฑ๊ต์ก๋ฒ: >>> lsDelegated_service(id="000900", type="XML")
Inputs: id, oc, mst, type.
ls_rlt_searchARead-onlyIdempotent
Related law search (๊ด๋ จ๋ฒ๋ น ์กฐํ).
This tool searches for laws related to a given query term. Part of the ๋ฒ๋ น์ ๋ณด ์ง์๋ฒ ์ด์ค, it identifies associations between laws based on shared subject matter or cross-references.
Args: query: Search keyword (default "*") display: Number of results per page (max 100, default 20) page: Page number (1-based, default 1) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" ctx: MCP context (injected automatically)
Returns: Search results or error
Inputs: oc, page, type, query, +1 more.
lstrm_ai_searchARead-onlyIdempotent
Search legal terms using AI (๋ฒ๋ น์ฉ์ด AI ์กฐํ).
This tool searches Korean legal terminology using AI-powered semantic matching. Returns definitions and explanations of legal terms.
Args: query: Search keyword (default "*") display: Number of results per page (max 100, default 20) page: Page number (1-based, default 1) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" ctx: MCP context (injected automatically)
Returns: Search results or error
Inputs: oc, page, type, query, +1 more.
lstrm_rlt_jo_searchARead-onlyIdempotent
Legal term to article linkage (๋ฒ๋ น์ฉ์ดโ์กฐ๋ฌธ ์ฐ๊ณ ์กฐํ).
This tool searches the linkage between legal terms and the specific law articles where those terms are used or defined.
Args: query: Search keyword (default "*") display: Number of results per page (max 100, default 20) page: Page number (1-based, default 1) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" ctx: MCP context (injected automatically)
Returns: Search results or error
Inputs: oc, page, type, query, +1 more.
lstrm_rlt_searchARead-onlyIdempotent
Legal term to everyday term linkage (๋ฒ๋ น์ฉ์ดโ์ผ์์ฉ์ด ์ฐ๊ณ ์กฐํ).
This tool searches the linkage between formal legal terms and their plain-language (everyday) equivalents. Useful for finding how legal terminology maps to everyday Korean.
Args: query: Search keyword (default "*") display: Number of results per page (max 100, default 20) page: Page number (1-based, default 1) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" ctx: MCP context (injected automatically)
Returns: Search results or error
Inputs: oc, page, type, query, +1 more.
ordinLsCon_searchARead-onlyIdempotent
Search ordinance-to-law linkage (์์น๋ฒ๊ท ๊ธฐ์ค ๋ฒ๋ น ์ฐ๊ณ ๊ด๋ จ ๋ชฉ๋ก ์กฐํ).
This tool searches national law articles that are referenced or linked by local ordinances. Useful for finding the legal basis (์์ ๋ฒ๋ น) that a specific ordinance is based on.
Args: query: Search keyword (default "*") display: Number of results per page (max 100, default 20) page: Page number (1-based, default 1) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" ctx: MCP context (injected automatically)
Returns: Search results with ordinance-law linkage list or error
Examples: Search for linked laws: >>> ordinLsCon_search(query="๊ฑด์ถ", type="XML")
Inputs: oc, page, type, query, +1 more.
ordin_searchARead-onlyIdempotent
Search local ordinances (์์น๋ฒ๊ท ๋ชฉ๋ก ์กฐํ).
This tool searches Korean local ordinances (์์น๋ฒ๊ท) including ์กฐ๋ก, ๊ท์น, and other local government regulations.
Args:
query: Search keyword (default "*")
display: Number of results per page (max 100, default 20)
page: Page number (1-based, default 1)
oc: Optional OC override (defaults to env var)
type: Response format - "JSON" (default), "XML", or "HTML"
nw: 1=ํํ (current), 2=์ฐํ (historical), default 1
search: 1=์์น๋ฒ๊ท๋ช
(ordinance name), 2=๋ณธ๋ฌธ๊ฒ์ (full text), default 1
sort: Sort order - "lasc"|"ldes"|"dasc"|"ddes"|"nasc"|"ndes"
date: Announcement date (YYYYMMDD)
ef_yd: Effective date range (YYYYMMDDYYYYMMDD)
anc_yd: Announcement date range (YYYYMMDDYYYYMMDD)
anc_no: Announcement number
org: Local government code filter (e.g., "6110000" for Seoul)
sborg: Sub-organization code filter
knd: Ordinance type - 1=์กฐ๋ก, 2=๊ท์น, 3=๊ต์ก๊ท์น
rr_cls_cd: Administrative district classification code
ordin_fd: Ordinance field code
gana: Dictionary search (ga, na, da, ...)
ctx: MCP context (injected automatically)
Returns: Search results with local ordinance list or error
Examples: Search for "์์ธ์ ๊ฑด์ถ ์กฐ๋ก": >>> ordin_search(query="๊ฑด์ถ", org="6110000", knd="1")
Search current ordinances:
>>> ordin_search(query="์ฃผ์ฐจ์ฅ", display=20, type="XML")
Inputs: nw, oc, knd, org, +14 more.
ordin_serviceARead-onlyIdempotent
Retrieve local ordinance full text (์์น๋ฒ๊ท ๋ณธ๋ฌธ ์กฐํ).
This tool retrieves the complete text of a Korean local ordinance.
Args: id: Ordinance ID (either id or mst is required) mst: Ordinance master number (either id or mst is required) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" ctx: MCP context (injected automatically)
Returns: Full ordinance text or error
Examples: Retrieve by ID: >>> ordin_service(id="000001", type="XML")
Retrieve by MST:
>>> ordin_service(mst="123456", type="XML")
Inputs: id, oc, mst, type.
prec_searchARead-onlyIdempotent
Search court precedents (ํ๋ก ๋ชฉ๋ก ์กฐํ).
Search Korean court precedents from Supreme Court and lower courts.
Args: query: Search keyword (default "*" for all) display: Number of results per page (max 100, default 20) page: Page number (1-based, default 1) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" search: Search type (1=case name, 2=full text, default 1) sort: Sort order - "lasc"|"ldes"|"dasc"|"ddes"|"nasc"|"ndes" org: Court type code (400201=Supreme Court, 400202=lower courts) curt: Court name (๋๋ฒ์, ์์ธ๊ณ ๋ฑ๋ฒ์, etc.) jo: Referenced law name (ํ๋ฒ, ๋ฏผ๋ฒ, etc.) gana: Dictionary search (ga, na, da, ...) date: Decision date (YYYYMMDD) prnc_yd: Decision date range (YYYYMMDD~YYYYMMDD) nb: Case number (comma-separated for multiple) dat_src_nm: Data source name (๊ตญ์ธ๋ฒ๋ น์ ๋ณด์์คํ , ๊ทผ๋ก๋ณต์ง๊ณต๋จ์ฐ์ฌํ๋ก, ๋๋ฒ์) pop_yn: Popup flag ("Y" or "N")
Returns: Search results with precedent list or error
Examples: Search for precedents mentioning "๋ด๋ณด๊ถ": >>> prec_search(query="๋ด๋ณด๊ถ", display=10)
Search Supreme Court precedents:
>>> prec_search(query="๋ด๋ณด๊ถ", curt="๋๋ฒ์")
Inputs: jo, nb, oc, org, +12 more.
prec_serviceARead-onlyIdempotent
Retrieve court precedent full text (ํ๋ก ๋ณธ๋ฌธ ์กฐํ).
Args: id: Precedent sequence number (ํ๋ก์ผ๋ จ๋ฒํธ) lm: Precedent name (optional) sections: Response detail level: - "summary": Returns ํ์์ฌํญ, ํ๊ฒฐ์์ง, ์ฐธ์กฐ์กฐ๋ฌธ, ์ฐธ์กฐํ๋ก only (~5KB). Excludes ํ๋ก๋ด์ฉ (full judgment text, often 15-25KB). Recommended for PlayMCP to stay under 20KB limit. - "full" or None: Returns everything including ํ๋ก๋ด์ฉ (default). oc: Optional OC override type: Response format - "JSON" (default), "XML", or "HTML"
Returns: Full precedent text with details or error
Examples: >>> prec_service(id="228541") >>> prec_service(id="228541", sections="summary") # PlayMCP-safe
Inputs: id (required), lm, oc, type, +1 more.
simplify_articleARead-onlyIdempotent
Get a law article with legal terms replaced by everyday Korean (์ฌ์ด ๋ฒ๋ฅ ์ฝ๊ธฐ).
Fetches a law article and annotates legal jargon with plain Korean equivalents using the official ๋ฒ์ ์ฒ legal terminology database.
Args: law_name: Law name (e.g., "๋ฏผ๋ฒ", "๊ทผ๋ก๊ธฐ์ค๋ฒ") article: Article number (e.g., 750 for ์ 750์กฐ) article_branch: Branch number (e.g., 2 for ์ 37์กฐ์2, default 0) oc: Optional OC override type: Response format - "JSON" (default), "XML", or "HTML"
Returns: Original text, simplified text with inline annotations, and term glossary
Examples: >>> simplify_article(law_name="๋ฏผ๋ฒ", article=750) >>> simplify_article(law_name="๊ฑด์ถ๋ฒ", article=37, article_branch=2)
Inputs: article (required), law_name (required), oc, type, +1 more.
special_decc_searchARead-onlyIdempotent
Search special administrative appeal decisions (ํน๋ณํ์ ์ฌํ ๋ชฉ๋ก ์กฐํ).
Search decisions from Korean special administrative appeal tribunals.
Args:
tribunal: Tribunal name in Korean. Valid values:
์กฐ์ธ์ฌํ์, ํด์์์ ์ฌํ์, ๊ตญ๋ฏผ๊ถ์ต์์ํ,
์ธ์ฌํ์ ์ฒ ์์ฒญ์ฌ์ฌ์์ํ
query: Search keyword (default "*")
display: Number of results per page (max 100, default 20)
page: Page number (1-based, default 1)
oc: Optional OC override (defaults to env var)
type: Response format - "JSON" (default), "XML", or "HTML"
search: 1=์ฌ๊ฑด๋ช
(case name), 2=๋ณธ๋ฌธ๊ฒ์ (full text)
sort: Sort order
gana: Dictionary search
cls: ์ฌ๊ฒฐ๋ก์ ํ (decision type classification)
date: Reference date (YYYYMMDD)
dpa_yd: Decision date range (YYYYMMDDYYYYMMDD)
rsl_yd: Resolution date range (YYYYMMDDYYYYMMDD)
ctx: MCP context (injected automatically)
Returns: Special appeal decision list or error
Examples: Search ์กฐ์ธ์ฌํ์ decisions: >>> special_decc_search(tribunal="์กฐ์ธ์ฌํ์", query="๋ถ๊ฐ๊ฐ์น์ธ")
Inputs: tribunal (required), oc, cls, date, +9 more.
special_decc_serviceARead-onlyIdempotent
Retrieve special administrative appeal decision full text (ํน๋ณํ์ ์ฌํ ๋ณธ๋ฌธ ์กฐํ).
Args: tribunal: Tribunal name (same values as special_decc_search) id: Decision serial number (์ฌ๊ฒฐ๋ก์ผ๋ จ๋ฒํธ) oc: Optional OC override type: Response format - "JSON" (default), "XML", or "HTML" ctx: MCP context (injected automatically)
Returns: Full decision text or error
Inputs: id (required), tribunal (required), oc, type.
trty_searchARead-onlyIdempotent
Search international treaties (์กฐ์ฝ ๋ชฉ๋ก ์กฐํ).
This tool searches Korean international treaties concluded and in effect with foreign countries and international organizations.
Args:
query: Search keyword (default "*")
display: Number of results per page (max 100, default 20)
page: Page number (1-based, default 1)
oc: Optional OC override (defaults to env var)
type: Response format - "JSON" (default), "XML", or "HTML"
search: Search type (1=์กฐ์ฝ๋ช
, 2=๋ณธ๋ฌธ๊ฒ์)
sort: Sort order - "lasc"|"ldes"|"dasc"|"ddes"|"nasc"|"ndes"
gana: Dictionary search (ga, na, da, ...)
eft_yd: Effective date range (YYYYMMDDYYYYMMDD)
conc_yd: Conclusion date range (YYYYMMDDYYYYMMDD)
cls: Treaty type - 1=์์ (bilateral), 2=๋ค์ (multilateral)
nat_cd: Country code filter
ctx: MCP context (injected automatically)
Returns: Search results with treaty list or error
Examples: Search bilateral treaties with the US: >>> trty_search(query="๋ฏธํฉ์ค๊ตญ", cls=1)
Search multilateral treaties:
>>> trty_search(cls=2, display=20)
Inputs: oc, cls, gana, page, +8 more.
trty_serviceARead-onlyIdempotent
Retrieve treaty full text (์กฐ์ฝ ๋ณธ๋ฌธ ์กฐํ).
This tool retrieves the complete text of a Korean international treaty.
Args: id: Treaty sequence number (์กฐ์ฝ์ผ๋ จ๋ฒํธ, required) oc: Optional OC override (defaults to env var) type: Response format - "JSON" (default), "XML", or "HTML" ctx: MCP context (injected automatically)
Returns: Full treaty text with details or error
Examples: Retrieve a treaty by ID: >>> trty_service(id="123")
Inputs: id (required), oc, type.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 54 tools
Multiple tools have overlapping purposes, such as eflaw_search/law_search (differing only by effective vs announcement date), and numerous linkage/term tools (lstrm_rlt_search, lstrm_rlt_jo_search, dlytrm_rlt_search, jo_rlt_lstrm_search, ls_rlt_search) that are easily confused. The composite tools (chain_full_research, legal_resolver, check_precedent_odds) also overlap significantly in aggregating legal sources.
Naming conventions are mixed: snake_case (eflaw_search, law_service), camelCase (aiSearch, aiRltLs_search), and bare noun phrases (article_citation, legal_resolver). The suffix pattern is inconsistentโsome use _search, some _service, and some use neither (check_precedent_odds, simplify_article).
At 53 tools (per the list, though the server claims 54), this is far above the typical well-scoped range. The large number reflects the broad legal domain, but it makes the server unwieldy and increases the risk of misselection.
The tool set covers an extensive range of Korean legal resources: statutes, administrative rules, ordinances, treaties, precedents, constitutional decisions, interpretations, administrative appeals, committee decisions, and legal terminology, plus composite research workflows. There are minor gaps (e.g., no update/create operations, but these are read-only by design) and some redundant coverage, but overall the domain is well covered.
Maintenance
Related MCP Connectors
๋ํ๋ฏผ๊ตญ ๋ฒ๋ นยท์กฐ๋ฌธยท๋ณํยท์ฐํยทํ๋กยทํด์๋ก๋ฅผ ๋ฒ์ ์ฒ ๊ตญ๊ฐ๋ฒ๋ น์ ๋ณด OPEN API ๋ก ์ฐพ์๋ณด๋ ์ฝ๊ธฐ ์ ์ฉ MCP ์๋ฒ. ์ฝ์ด 12 + ๋ณด์กฐ 12 ๋๊ตฌ.
Korea Law MCP โ South Korean national statutes via the Ministry of Government Legislation's (๋ฒ์ ์ฒ)โฆ
Korean law: statutes, precedents, ordinances, treaties and citation verification (๋ฒ์ ์ฒ API).
MCP server for Chinese law lookup: statutes, regulations and articles by keyword or law name.
Related MCP Servers
- AlicenseCqualityBmaintenanceEnables searching, comparing, and analyzing Korean laws and public institution regulations through natural language, integrating 110 MCP tools covering statutes, precedents, and internal rules.10056 npm24MIT
- AlicenseAqualityDmaintenanceMCP server that enables AI agents to search Korean laws and retrieve article contents using the Korean Ministry of Legislation's law information API.2MIT
- FlicenseNot gradedqualityDmaintenanceThis MCP server integrates South Korea's national law information, building registers from MOLIT, and KOSIS statistics for housing development research. It enables searching laws, retrieving building details, and accessing statistical data through natural language.-
- AlicenseNot gradedqualityDmaintenanceEnables searching and retrieving Korean statutes, precedents, and constitutional court decisions via MCP, using the National Law Information Center API.4,629 npm1MIT