LexLink
LexLink is an MCP server that wraps the Korean National Law Information API, letting AI agents search, read, and analyze Korean laws, precedents, interpretations, and related legal material.
Search current Korean laws by effective date (
eflaw_search) or announcement date (law_search), with filters for date ranges, ministry, law type, sorting, and pagination.Retrieve a full law or just a specific article/paragraph/item (
eflaw_service,law_service,eflaw_josub,law_josub).Search and read English translations of Korean laws (
elaw_search,elaw_service).Search administrative rules (훈령, 예규, 고시, 공고, 지침) and fetch their full text (
admrul_search,admrul_service).Explore law–local ordinance linkages: linked laws, linked ordinance articles, links by ministry, and linkage statistics (
lnkLs_search,lnkLsOrdJo_search,lnkDep_search,drlaw_search).Retrieve delegated laws, rules, and ordinances under a parent law (
lsDelegated_service).Search court precedents and Constitutional Court decisions, then read full texts (
prec_search,prec_service,detc_search,detc_service).Search legal interpretations and administrative appeal decisions, then read full texts (
expc_search,expc_service,decc_search,decc_service).Extract internal and external citations from a law article (
article_citation).Run AI/semantic search for vague natural-language queries and discover related laws (
aiSearch,aiRltLs_search).Per the README, the full server also offers 68 tools covering treaties, committee/special tribunal decisions,
law_as_ofhistorical versions, amendment tracking and comparison, legal-term dictionaries, chain workflows, 9 prompts, 2 resources, and per-tool caching.
Used in HTML parsing for article citation extraction, identifying citation types through CSS class selectors (sfon1-4 classes).
Supports environment variable configuration for API credentials and server settings through .env files.
Version control for the project repository, required for deployment workflows to Smithery and GitHub.
Enables deployment through GitHub repository integration with Smithery platform for hosting the MCP server.
Supports deployment to Kakao PlayMCP platform via HTTP/SSE server, enabling Korean legal information access through Kakao's MCP infrastructure.
Used as reverse proxy for production deployment, routing traffic from port 80 to the LexLink HTTP server for Kakao PlayMCP integration.
Provides parameter validation and type checking for all 24 MCP tools, ensuring proper data handling for Korean legal API requests.
Supports comprehensive testing framework with unit, integration, and end-to-end tests for validating tool functionality and API responses.
Core implementation language for the MCP server, requiring Python 3.10+ for all functionality.
Comprehensive documentation providing setup instructions, tool descriptions, and usage examples for the MCP server.
Displays project badges for MCP compatibility, Python version, and Smithery status in the repository.
Format for project logo image displayed in README documentation.
Configuration format for pyproject.toml file managing project dependencies and metadata.
Primary response format for Korean National Law Information API, with built-in XML parsing and validation for legal document retrieval.
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 find the latest version of the Personal Information Protection 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 wraps the Korean National Law Information API (open.law.go.kr) so AI agents can search and read Korean laws, case law, interpretations and related material.
What it provides
68 tools, 9 prompts and 2 resources (v2.2.0, plus the Unreleased changes listed in CHANGELOG.md).
Laws by effective date or announcement date, single articles (
jo), English translations, administrative rules, local ordinances, treaties.Court precedents, Constitutional Court decisions, legal interpretations, administrative appeals, committee decisions, ministry interpretations, special tribunals.
law_as_of: the version of a law (or one article) in force on a given date.article_citation: citations referenced by one article, extracted from law.go.kr HTML (no LLM). Edge cases (ranges, deleted articles) are listed under limitations in the API reference.AI/semantic search (
aiSearch,aiRltLs_search) and one-call chain tools (chain_*).Per-tool TTL cache and Korean law-name abbreviation resolution (e.g. 자통법).
JSON by default;
type="XML"or"HTML"on request.Errors come back as
{status: "error", error_code, message, hints, request_id}.
All tool names and arguments are in the API reference.
Related MCP server: Korean Law MCP Server
Tool groups
Group | Tools |
Laws |
|
Admin rules, ordinances, linkage |
|
Case law and decisions |
|
Treaties |
|
AI search and knowledge base |
|
History, comparison, appendix, dictionary |
|
Analysis |
|
Chains and ops |
|
Which tool to start with:
You have | Start with |
A vague question in plain Korean |
|
A law name and article number |
|
"What did the law say on date D?" |
|
Old/new article text of an amendment |
|
Law, 시행령 and 시행규칙 side by side |
|
What a legal term means |
|
A topic for case law |
|
For article text always pass jo (e.g. 35, "35의5", "제35조의5", "003505"; normalized to 6 digits). Without it some laws return a very large body.
Prompts: search-korean-law, get-law-article, get-article-with-citations, analyze-law-citations, search-admin-rules, tool-selection-guide, analyze-legal-situation, explain-legal-document, check-legal-precedent.
Resources: lexlink://laws/frequently-used (about 20 common law names mapped to 법령ID) and the template lexlink://law/{name} (read it as e.g. lexlink://law/자통법, without braces; the name is URL-decoded, resolver aliases are applied, and one live law_search exact-name lookup is the fallback).
Quick start
Requires Python 3.10+ and uv. You also need an OC from open.law.go.kr: the part of your registered email before the @. law.go.kr checks the OC together with the caller's IP, so the machine running LexLink may need its IP registered there.
uv sync
# stdio (Claude Code, Cursor, other local MCP clients)
OC=<OC> uv run stdio
# Streamable HTTP at /mcp (HTTP mode refuses to start without auth settings)
OC=<OC> LEXLINK_AUTH_TOKENS=local:<TOKEN> TRANSPORT=http uv run serveThe server does not read .env by itself. Export the variables, or run uv run --env-file .env stdio.
OC is resolved as: tool argument oc first, then the OC environment variable. In HTTP mode the oc argument is ignored and the server's OC is always used.
For HTTP deployment (auth, TLS proxy, rate limits, logging) see docs/OPERATIONS.md.
Environment variables
Variable | Default | Description |
| (required) | law.go.kr API identifier |
|
| Upstream base URL |
|
| Upstream request timeout (seconds) |
| unset |
|
|
| HTTP server only: |
The HTTP-only variables (HOST, PORT, LEXLINK_AUTH_TOKENS, rate limits, logging, ...) are in docs/OPERATIONS.md.
Example
eflaw_search(query="자동차관리법", display=5)
# {"status": "ok", "request_id": "...", "upstream_type": "JSON", "ranked_data": ..., "raw_content": ...}
eflaw_josub(mst="<MST from the search>", jo="제3조")Error codes: VALIDATION_ERROR, TIMEOUT, UPSTREAM_ERROR, INTERNAL_ERROR, NOT_FOUND, ARTICLE_NOT_FOUND, EMPTY_RESPONSE, API_NOT_SUBSCRIBED, UPSTREAM_HTML_ERROR. See the API reference.
Documentation
Doc | For |
Index | |
Tool list, arguments, upstream API catalog, limitations | |
HTTP server: deploy, auth, TLS proxy, logging (Korean) | |
Code layout, tests, adding tools | |
Release history, Unreleased changes | |
Notes for coding agents |
Contributing
Fork, branch, add tests, run uv run pytest tests/, open a pull request. Details in docs/DEVELOPMENT.md.
License
No LICENSE file is included in this repository.
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
Support
Issues: GitHub Issues
law.go.kr API: open.law.go.kr
Available Tools
26 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 - "HTML" or "XML" (default "XML", JSON not supported by API)
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: query, display, page, oc, +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 - "HTML" or "XML" (default "XML", JSON not supported by API) 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, lid, lm, oc, +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 - XML only (JSON not supported)
Returns: List of semantically related law articles (법령조문 items)
Example: >>> aiRltLs_search(query="민법") # Returns: 상법 제54조 (상사법정이율), 의료법 제50조 (「민법」의 준용), etc.
Inputs: query (required), search, oc, type.
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 - XML only (JSON not supported)
Returns: AI search results with full article text (법령조문 items with 조문내용)
Example: >>> aiSearch(query="뺑소니 처벌", search=0) # Returns: 특정범죄 가중처벌 등에 관한 법률 제5조의3 (도주차량 운전자의 가중처벌)
Inputs: query (required), search, display, page, +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), law_name (required), article (required), article_branch, +1 more.
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 - "HTML" or "XML" (default "XML", JSON not supported by API)
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: query, display, page, oc, +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) oc: Optional OC override (defaults to env var) type: Response format - "HTML" or "XML" (default "XML", JSON not supported by API) 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.
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 - "HTML" or "XML" (default "XML") 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: query, display, page, oc, +8 more.
detc_serviceARead-onlyIdempotent
Retrieve Constitutional Court decision full text (헌재결정례 본문 조회).
Args: id: Constitutional Court decision sequence number (헌재결정례일련번호) lm: Decision name (optional) oc: Optional OC override type: Response format - "HTML" or "XML" (default "XML")
Returns: Full Constitutional Court decision text or error
Examples: >>> detc_service(id="58386")
Inputs: id (required), lm, oc, type.
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 - "HTML" or "XML" (default "XML", JSON not supported by API)
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: id, mst, ef_yd, jo, +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 - "HTML" or "XML" (default "XML", JSON not supported by API)
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), display, page, oc, +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 - "HTML" or "XML" (default "XML", JSON not supported by API)
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, mst, ef_yd, jo, +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 - "HTML" or "XML" (default "XML", JSON not supported by API) 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: query, display, page, oc, +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 - "HTML" or "XML" (default "XML", JSON not supported by API) 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, mst, lm, ld, +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 - "HTML" or "XML" (default "XML", JSON not supported by API)
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: query, display, page, oc, +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) oc: Optional OC override (defaults to env var) type: Response format - "HTML" or "XML" (default "XML", JSON not supported by API) 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.
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 - "HTML" or "XML" (default "XML", JSON not supported by API)
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: id, mst, jo, hang, +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 - "HTML" or "XML" (default "XML", JSON not supported by API) 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), display, page, oc, +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 - "HTML" or "XML" (default "XML", JSON not supported by API)
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, mst, lm, ld, +5 more.
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 - "HTML" or "XML" (default "XML", JSON not supported by API) 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), display, page, oc, +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 - "HTML" or "XML" (default "XML", JSON not supported by API) 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: query, display, page, oc, +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 - "HTML" or "XML" (default "XML", JSON not supported by API) 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: query, display, page, oc, +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 - "XML" only (JSON not supported by API, HTML not available) 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, mst, oc, 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 - "HTML" or "XML" (default "XML") 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: query, display, page, oc, +12 more.
prec_serviceARead-onlyIdempotent
Retrieve court precedent full text (판례 본문 조회).
Args: id: Precedent sequence number (판례일련번호) lm: Precedent name (optional) oc: Optional OC override type: Response format - "HTML" or "XML" (default "XML")
Returns: Full precedent text with details or error
Examples: >>> prec_service(id="228541")
Inputs: id (required), lm, oc, type.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 26 tools
The tools are organized into clear categories like laws, administrative rules, precedents, and interpretations, which helps distinguish them. However, there is significant overlap within categories, such as multiple search tools for laws (eflaw_search, law_search, aiSearch, aiRltLs_search) that could confuse agents about which to use first. The descriptions provide guidance (e.g., 'PREFERRED TOOL' notes), but the redundancy creates ambiguity.
Naming is inconsistent across the toolset. Some tools use snake_case (admrul_search, eflaw_service), others use camelCase (aiRltLs_search, lnkDep_search), and some mix styles (drlaw_search). There is no uniform verb_noun pattern; for example, search tools vary (search vs. service suffixes), and tools like article_citation deviate entirely. This inconsistency makes the set harder to navigate.
With 26 tools, the count is excessive for a legal search server, leading to complexity and potential confusion. While the domain (Korean legal research) is broad, many tools are redundant (e.g., eflaw_search and law_search for similar law searches) or highly specialized (e.g., drlaw_search for linkage statistics). A more streamlined set of 10-15 tools could cover the same functionality more coherently.
The toolset is highly complete for Korean legal research, covering laws, administrative rules, precedents, interpretations, English translations, and linkages. Each category typically includes search and retrieval tools (e.g., search and service pairs), providing good lifecycle coverage. Minor gaps exist, such as no tool for comparing law versions over time, but overall, the surface is comprehensive for the domain.
Maintenance
Related MCP Connectors
Korean law: statutes, precedents, ordinances, treaties and citation verification (법제처 API).
Official English text of Korean laws (law.go.kr): search by name, get articles; flags outdated texts
Korean fact-verification tools for AI agents: business registration, address, DART, apt prices, laws
Korean company facts in English for AI agents: ~830 KOSPI-listed companies (DART profiles, KRW financials, recent filings) and ~110,000 corporate public procurement suppliers (12-month KONEPS contract awards), plus live National Tax Service business status checks. 4 tools, keyless, read-only.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceEnables searching and retrieving Korean legal information including laws, court precedents, legal interpretations, and local ordinances from the Korean National Law Information Center API with intelligent search ranking.-
- FlicenseNot gradedqualityDmaintenanceEnables real-time search and analysis of Korean laws, legal precedents, and administrative rules through the National Law Information Center Open API, allowing AI agents to access official legal information for contract review, compliance, and legal research.74-
- FlicenseNot gradedqualityCmaintenanceEnables AI to search and retrieve South Korean legal information from the National Law Information Center. It allows users to look up specific laws, articles, and detailed legal provisions using natural language queries.135-
- AlicenseAqualityDmaintenanceEnables users to search and retrieve South Korean statutes, precedents, and administrative rules via the National Law Information Center API. It supports deep legal chain analysis, legislative history tracking, and legal terminology lookups through natural language.10134 PyPI5MIT