Korean Law MCP Server
Supports containerized deployment of the Korean law MCP server with Docker images and container runtime.
Uses environment variable configuration for API key management and server settings.
Provides data validation for API requests and responses in the Korean law search tools.
Implements the MCP server runtime and API integration logic using Python.
Uses TOML format for project configuration in pyproject.toml.
Parses XML responses from the National Law Information Center Open API using xml.etree.ElementTree.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
๐๏ธ ํ๊ตญ ๋ฒ๋ฅ /ํ๋ก ๊ฒ์ MCP ์๋ฒ
๊ตญ๊ฐ๋ฒ๋ น์ ๋ณด์ผํฐ Open API๋ฅผ ํ์ฉํ ๊ณ ์ฑ๋ฅ MCP (Model Context Protocol) ์๋ฒ์ ๋๋ค.
AI ์์ด์ ํธ(Claude Desktop, Cursor ๋ฑ)๊ฐ ์ค์๊ฐ์ผ๋ก ํ๊ตญ ๋ฒ๋ น, ํ๋ก, ํ์ ๊ท์น์ ๊ฒ์ํ๊ณ ๋ถ์ํ ์ ์๋๋ก ํฉ๋๋ค.
โจ ์ฃผ์ ๊ธฐ๋ฅ
๐ ๋ฒ๋ น ๊ฒ์
ํค์๋ ๊ธฐ๋ฐ ๋ฒ๋ น ๊ฒ์: ๋ฏผ๋ฒ, ์๋ฒ, ๊ทผ๋ก๊ธฐ์ค๋ฒ ๋ฑ ๋ค์ํ ๋ฒ๋ น ๊ฒ์
๋ฒ๋ น ์์ธ ์กฐํ: ํน์ ๋ฒ๋ น์ ์ ๋ฌธ(์กฐ๋ฌธ) ๋ฐ ์์ธ ์ ๋ณด ์กฐํ
๋ฒ๋ น ๊ธฐ๋ณธ ์ ๋ณด: ์๊ด๋ถ์ฒ, ๊ณตํฌ์ผ์, ์ํ์ผ์, ๊ฐ์ ์ ๋ณด ํฌํจ
โ๏ธ ํ๋ก ๊ฒ์
ํ๋ก ํค์๋ ๊ฒ์: ์ํด๋ฐฐ์, ๊ณ์ฝ, ๋ถ๋นํด๊ณ ๋ฑ ํ๋ก ๊ฒ์
ํ๋ก ์์ธ ์กฐํ: ํ๊ฒฐ์์ง, ํ์์ฌํญ, ํ๋ก ์ ๋ฌธ ์กฐํ
๋ฒ์ ํํฐ๋ง: ๋๋ฒ์, ํ๋ฒ์ฌํ์ ๋ฑ ๋ฒ์๋ณ ํํฐ๋ง ์ง์
์ฐธ์กฐ์กฐ๋ฌธ/ํ๋ก: ๊ด๋ จ ๋ฒ๋ น ๋ฐ ์ฐธ์กฐ ํ๋ก ์ ๋ณด ์ ๊ณต
๐ ํ์ ๊ท์น ๊ฒ์
ํ์ ๊ท์น ๊ฒ์: ๊ฐ ๋ถ์ฒ์ ํ์ ๊ท์น ๊ฒ์
์๊ด๋ถ์ฒ ์ ๋ณด: ์ ์ ์ผ์, ์ํ์ผ์ ๋ฑ ์์ธ ์ ๋ณด
๐ ์ฑ๋ฅ ์ต์ ํ
์ ๋ต์ ์บ์ฑ: ๋ฒ๋ น/ํ๋ก ๋ฐ์ดํฐ๋ฅผ 24์๊ฐ ์บ์ฑํ์ฌ API ํธ์ถ ์ต์ํ
๋น ๋ฅธ ์๋ต ์๋: ์บ์ ๊ธฐ๋ฐ ์ฆ์ ์๋ต
์์ ์ ์ธ ์ด์: ์๋ฌ ํธ๋ค๋ง ๋ฐ ๋ก๊น ์์คํ
Related MCP server: LexGuard MCP
๐ฏ ํ์ฉ ์ฌ๋ก
๋ฒ๋ฅ ์ ๋ฌธ๊ฐ
๊ณ์ฝ์ ๊ฒํ : AI๊ฐ ๊ณ์ฝ์๋ฅผ ๋ถ์ํ๊ณ ๊ด๋ จ ๋ฒ๋ น ๋ฐ ํ๋ก๋ฅผ ์๋ ์ฐธ์กฐ
๋ฒ๋ฅ ์๋ฌธ: ํน์ ์ฌ์์ ๋ํ ๊ด๋ จ ๋ฒ๋ น ๋ฐ ํ๋ก๋ฅผ ์ฆ์ ์กฐํ
ํ๋ก ์ฐ๊ตฌ: ์ ์ฌ ํ๋ก๋ฅผ ๋น ๋ฅด๊ฒ ๊ฒ์ํ๊ณ ๋น๊ต ๋ถ์
๊ธฐ์ ๋ฒ๋ฌดํ
๊ธฐ์ ์ปดํ๋ผ์ด์ธ์ค: ์ฌ์ ๊ด๋ จ ๋ฒ๋ น์ ์ค์๊ฐ ์กฐํ
๋ ธ๋ฌด ๊ด๋ฆฌ: ๊ทผ๋ก๊ธฐ์ค๋ฒ ๋ฑ ๋ ธ๋ ๊ด๋ จ ๋ฒ๋ น ๋ฐ ํ๋ก ๊ฒ์
์์ก ์ค๋น: ๊ด๋ จ ํ๋ก ๋ฐ ๋ฒ๋ น ์๋ ์์ง
์คํํธ์ /๊ฐ๋ฐ์
์๋น์ค ๋ฒ๋ฅ ๊ฒํ : ๊ฐ์ธ์ ๋ณด๋ณดํธ๋ฒ, ์ ์์๊ฑฐ๋๋ฒ ๋ฑ ๊ด๋ จ ๋ฒ๋ น ํ์ธ
์ฝ๊ด ์์ฑ: ๊ด๋ จ ๋ฒ๋ น์ ์ฐธ์กฐํ์ฌ ์ฝ๊ด ์์ฑ
๋ฒ๋ฅ ๋ฆฌ์คํฌ ๋ถ์: AI๊ฐ ์๋น์ค ๊ธฐํ์๋ฅผ ๋ถ์ํ๊ณ ๊ด๋ จ ๋ฒ๋ฅ ๋ฆฌ์คํฌ ํ์
์ผ๋ฐ ์ฌ์ฉ์
๋ฒ๋ฅ ์๋ด: AI ์์ด์ ํธ๋ฅผ ํตํ ๊ธฐ๋ณธ์ ์ธ ๋ฒ๋ฅ ์ ๋ณด ์กฐํ
๊ถ๋ฆฌ ํ์ธ: ์๋น์ ๊ถ๋ฆฌ, ์์ฐจ๊ถ ๋ฑ ๊ด๋ จ ๋ฒ๋ น ๋ฐ ํ๋ก ๊ฒ์
๋ฏผ์ ์ค๋น: ํ์ ์ฌํ, ์์ก ์ค๋น๋ฅผ ์ํ ๋ฒ๋ฅ ์ ๋ณด ์์ง
๐ ๏ธ ๊ธฐ์ ์คํ
MCP Framework: FastMCP
Data Validation: Pydantic
HTTP Client: Requests
XML Parsing: xml.etree.ElementTree
Caching: cachetools (24์๊ฐ TTL)
Async Processing: asyncio
Environment: Python-dotenv
๐ฆ ์ค์น ๋ฐ ์ค์
1) ์์กด์ฑ ์ค์น
pip install -r requirements.txt๐ก
uv๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ:uv sync
2) API ํค ๋ฐ๊ธ
๊ตญ๊ฐ๋ฒ๋ น์ ๋ณด์ผํฐ Open API ํค๋ฅผ ๋ฐ๊ธ๋ฐ์์ผ ํฉ๋๋ค:
ํ์๊ฐ์ ๋ฐ ๋ก๊ทธ์ธ
๊ณต๋ํ์ฉ ์๋น์ค > Open API ๋ฉ๋ด์์ API ์ ์ฒญ
์น์ธ ํ ์ธ์ฆํค(OC) ๋ฐ๊ธ๋ฐ๊ธฐ
๐ ์ฐธ๊ณ : API ํค ๋ฐ๊ธ์ ๋ณดํต ์ฆ์ ์น์ธ๋๋ฉฐ, ๋ฌด๋ฃ๋ก ์ด์ฉ ๊ฐ๋ฅํฉ๋๋ค.
3) ํ๊ฒฝ ๋ณ์ ์ค์
ํ๋ก์ ํธ ๋ฃจํธ์ .env ํ์ผ์ ์์ฑํ๊ณ API ํค๋ฅผ ์ค์ ํฉ๋๋ค:
cp env.law.example .env.env ํ์ผ ๋ด์ฉ:
LAW_API_KEY=your_law_api_key_here
LOG_LEVEL=INFO
PORT=80964) ์๋ฒ ์คํ
python -m src.law_main๋๋ HTTP ์๋ฒ๋ก ์คํ:
python src/law_main.py๐ณ Docker ์คํ
Docker๋ฅผ ์ฌ์ฉํ์ฌ ๊ฐํธํ๊ฒ ์คํํ ์ ์์ต๋๋ค:
# ์ด๋ฏธ์ง ๋น๋
docker build -t korean-law-mcp:latest .
# ์ปจํ
์ด๋ ์คํ
docker run --rm \
-e LAW_API_KEY=your_law_api_key_here \
-p 8096:8096 \
korean-law-mcp:latest๐งฐ ์ฌ์ฉ ๊ฐ๋ฅํ ๋๊ตฌ (Tools)
1. health
์ค๋ช : ์๋น์ค ์ํ ๋ฐ API ํค ์ค์ ํ์ธ
ํ๋ผ๋ฏธํฐ: ์์
๋ฐํ: ์๋น์ค ์ํ ๊ฐ์ฒด
2. search_law_tool
์ค๋ช : ๋ฒ๋ น์ ํค์๋๋ก ๊ฒ์
ํ๋ผ๋ฏธํฐ:
query(string, ํ์): ๊ฒ์ํ ๋ฒ๋ น ํค์๋ (์: '๋ฏผ๋ฒ', '์๋ฒ')page(integer, ์ ํ): ํ์ด์ง ๋ฒํธ (๊ธฐ๋ณธ๊ฐ: 1)page_size(integer, ์ ํ): ํ์ด์ง๋น ๊ฒฐ๊ณผ ์ (๊ธฐ๋ณธ๊ฐ: 10, ์ต๋: 50)
๋ฐํ: ๊ฒ์๋ ๋ฒ๋ น ๋ชฉ๋ก (๋ฒ๋ น๋ช , ์๊ด๋ถ์ฒ, ๊ณตํฌ์ผ์, ์ํ์ผ์ ๋ฑ)
์์ ์๋ต:
{
"total": 152,
"page": 1,
"page_size": 10,
"laws": [
{
"๋ฒ๋ นID": "001122",
"๋ฒ๋ น๋ช
": "๋ฏผ๋ฒ",
"๋ฒ๋ น๊ตฌ๋ถ": "๋ฒ๋ฅ ",
"์๊ด๋ถ์ฒ": "๋ฒ๋ฌด๋ถ",
"๊ณตํฌ์ผ์": "19580222",
"์ํ์ผ์": "19600101"
}
]
}3. get_law_detail_tool
์ค๋ช : ํน์ ๋ฒ๋ น์ ์์ธ ์ ๋ณด ๋ฐ ์ ๋ฌธ(์กฐ๋ฌธ) ์กฐํ
ํ๋ผ๋ฏธํฐ:
law_id(string, ํ์): ๋ฒ๋ น ID (๋ฒ๋ น ๊ฒ์ ๊ฒฐ๊ณผ์์ ์ป์ ๋ฒ๋ นID)
๋ฐํ: ๋ฒ๋ น์ ์์ธ ์ ๋ณด์ ๋ชจ๋ ์กฐ๋ฌธ ๋ด์ฉ
์์ ์๋ต:
{
"๋ฒ๋ นID": "001122",
"๋ฒ๋ น๋ช
": "๋ฏผ๋ฒ",
"๋ฒ๋ น๊ตฌ๋ถ": "๋ฒ๋ฅ ",
"์๊ด๋ถ์ฒ": "๋ฒ๋ฌด๋ถ",
"๊ณตํฌ์ผ์": "19580222",
"์ํ์ผ์": "19600101",
"์กฐ๋ฌธ์": 1118,
"์กฐ๋ฌธ": [
{
"์กฐ๋ฌธ๋ฒํธ": "์ 1์กฐ",
"์กฐ๋ฌธ์ ๋ชฉ": "๋ฒ์",
"์กฐ๋ฌธ๋ด์ฉ": "๋ฏผ์ฌ์ ๊ดํ์ฌ ๋ฒ๋ฅ ์ ๊ท์ ์ด ์์ผ๋ฉด..."
}
]
}4. search_precedent_tool
์ค๋ช : ํ๋ก๋ฅผ ํค์๋๋ก ๊ฒ์
ํ๋ผ๋ฏธํฐ:
query(string, ํ์): ๊ฒ์ํ ํ๋ก ํค์๋ (์: '์ํด๋ฐฐ์', '๊ณ์ฝ')page(integer, ์ ํ): ํ์ด์ง ๋ฒํธ (๊ธฐ๋ณธ๊ฐ: 1)page_size(integer, ์ ํ): ํ์ด์ง๋น ๊ฒฐ๊ณผ ์ (๊ธฐ๋ณธ๊ฐ: 10, ์ต๋: 50)court(string, ์ ํ): ๋ฒ์ ๊ตฌ๋ถ (์: '๋๋ฒ์', 'ํ๋ฒ์ฌํ์')
๋ฐํ: ๊ฒ์๋ ํ๋ก ๋ชฉ๋ก
์์ ์๋ต:
{
"total": 2453,
"page": 1,
"page_size": 10,
"precedents": [
{
"ํ๋ก์ผ๋ จ๋ฒํธ": "202012345",
"์ฌ๊ฑด๋ช
": "์ํด๋ฐฐ์(๊ธฐ)",
"์ฌ๊ฑด๋ฒํธ": "2020๋ค123456",
"์ ๊ณ ์ผ์": "20201015",
"์ ๊ณ ": "ํ๊ธฐํ์ก",
"๋ฒ์๋ช
": "๋๋ฒ์",
"์ฌ๊ฑด์ข
๋ฅ๋ช
": "๋ฏผ์ฌ",
"ํ์์ฌํญ": "...",
"ํ๊ฒฐ์์ง": "..."
}
]
}5. get_precedent_detail_tool
์ค๋ช : ํน์ ํ๋ก์ ์์ธ ์ ๋ณด ์กฐํ
ํ๋ผ๋ฏธํฐ:
precedent_id(string, ํ์): ํ๋ก ์ผ๋ จ๋ฒํธ
๋ฐํ: ํ๋ก์ ์์ธ ์ ๋ณด (ํ๊ฒฐ์์ง, ์ฐธ์กฐ์กฐ๋ฌธ, ํ๋ก ์ ๋ฌธ ๋ฑ)
์์ ์๋ต:
{
"ํ๋ก์ผ๋ จ๋ฒํธ": "202012345",
"์ฌ๊ฑด๋ช
": "์ํด๋ฐฐ์(๊ธฐ)",
"์ฌ๊ฑด๋ฒํธ": "2020๋ค123456",
"์ ๊ณ ์ผ์": "20201015",
"์ ๊ณ ": "ํ๊ธฐํ์ก",
"๋ฒ์๋ช
": "๋๋ฒ์",
"ํ์์ฌํญ": "...",
"ํ๊ฒฐ์์ง": "...",
"์ฐธ์กฐ์กฐ๋ฌธ": "๋ฏผ๋ฒ ์ 750์กฐ, ์ 751์กฐ",
"์ฐธ์กฐํ๋ก": "๋๋ฒ์ 2019๋ค234567...",
"ํ๋ก๋ด์ฉ": "ใ์ ๋ฌธใ..."
}6. search_administrative_rule_tool
์ค๋ช : ํ์ ๊ท์น์ ํค์๋๋ก ๊ฒ์
ํ๋ผ๋ฏธํฐ:
query(string, ํ์): ๊ฒ์ํ ํ์ ๊ท์น ํค์๋page(integer, ์ ํ): ํ์ด์ง ๋ฒํธ (๊ธฐ๋ณธ๊ฐ: 1)page_size(integer, ์ ํ): ํ์ด์ง๋น ๊ฒฐ๊ณผ ์ (๊ธฐ๋ณธ๊ฐ: 10, ์ต๋: 50)
๋ฐํ: ๊ฒ์๋ ํ์ ๊ท์น ๋ชฉ๋ก
๐ก ์ฌ์ฉ ์์
Claude Desktop์์ ์ฌ์ฉ
Claude Desktop ์ค์ ํ์ผ (
claude_desktop_config.json) ์์ :
{
"mcpServers": {
"korean-law": {
"command": "python",
"args": ["-m", "src.law_main"],
"env": {
"LAW_API_KEY": "your_api_key_here"
}
}
}
}Claude Desktop ์ฌ์์
Claude์๊ฒ ์ง๋ฌธ:
"๋ฏผ๋ฒ ์ 750์กฐ์ ๋ํด ์๋ ค์ค"
"๋ถ๋นํด๊ณ ๊ด๋ จ ํ๋ก ์ฐพ์์ค"
"๊ฐ์ธ์ ๋ณด๋ณดํธ๋ฒ ๊ฒ์ํด์ค"
Cursor์์ ์ฌ์ฉ
Cursor์ MCP ์ค์ ์์ ์์ ๋์ผํ๊ฒ ์ถ๊ฐํ๋ฉด ๋ฉ๋๋ค.
๐ ํ๋ก์ ํธ ๊ตฌ์กฐ
korean-law-mcp/
โโโ src/
โ โโโ __init__.py
โ โโโ law_main.py # MCP ์๋ฒ ๋ฉ์ธ ํ์ผ
โ โโโ law_tools.py # ๋ฒ๋ฅ API ํธ์ถ ๋๊ตฌ
โโโ .env # ํ๊ฒฝ ๋ณ์ ํ์ผ (API ํค ๋ฑ)
โโโ env.law.example # ํ๊ฒฝ ๋ณ์ ์์ ํ์ผ
โโโ requirements.txt # Python ์์กด์ฑ
โโโ README_LAW.md # ํ๋ก์ ํธ ๋ฌธ์ (์ด ํ์ผ)
โโโ pyproject.toml # ํ๋ก์ ํธ ์ค์ ๐ ๋ก๋๋งต
๋ฒ๋ น ๊ฐ์ ์ด๋ ฅ ์กฐํ
๋ฒ๋ น/ํ๋ก ์ ๋ฌธ PDF ๋ค์ด๋ก๋
์์ฐ์ด ๊ธฐ๋ฐ ๋ฒ๋ น ํด์
๋ฒ๋ น ๋น๊ต ๋ถ์ ๊ธฐ๋ฅ
ํ๋ก ์ ์ฌ๋ ๋ถ์
๋ฒ๋ฅ ์ฉ์ด ์ฌ์
๐ฐ ๋น์ฆ๋์ค ๋ชจ๋ธ
์ด MCP ์๋ฒ๋ ํ๋งค์ฉ ์ ํ์ผ๋ก ๊ฐ๋ฐ๋์์ต๋๋ค:
ํ๊ฒ ๊ณ ๊ฐ
๐ข ๋ฒ๋ฅ ์ฌ๋ฌด์/๋กํ: ๋ฒ๋ฅ ๋ฆฌ์์น ์๋ํ
๐ญ ๊ธฐ์ ๋ฒ๋ฌดํ: ์ปดํ๋ผ์ด์ธ์ค ๊ด๋ฆฌ
๐ ์คํํธ์ : ๋ฒ๋ฅ ๋ฆฌ์คํฌ ๋ถ์
๐ ๋ฒํ ์ฐ๊ตฌ์: ํ๋ก ์ฐ๊ตฌ ๋๊ตฌ
๊ฐ๊ฒฉ ์ฑ ์ (์ฐธ๊ณ )
Basic: 30๋ง์ (๊ธฐ๋ณธ ๊ฒ์ ๊ธฐ๋ฅ)
Pro: 100๋ง์ (AI ๋ถ์ ๊ธฐ๋ฅ ์ถ๊ฐ)
Enterprise: 200๋ง์+ (์ปค์คํฐ๋ง์ด์ง, ๊ธฐ์ ์ง์)
์ฐจ๋ณํ ํฌ์ธํธ
โ ๊ตญ๊ฐ ๊ณต์ ๋ฐ์ดํฐ ํ์ฉ
โ AI ์์ด์ ํธ ์ง์ ํตํฉ
โ ์ค์๊ฐ ์ต์ ๋ฒ๋ น/ํ๋ก ์กฐํ
โ ํ๊ตญ์ด ์๋ฒฝ ์ง์
โ ๋ณต์กํ API ์ฒ๋ฆฌ ์๋ํ
โ ๏ธ ์ ์ฅ์ ์ด์ ์๋ด (Repository Moved)
๋ณธ ํ๋ก์ ํธ๋ ๋ ํ์ฅ๋ ๊ตฌ์กฐ์ ๋ช
ํํ ๋ชฉ์ ์ ๋ฐ์ํ์ฌ
์๋ ์ ์ฅ์๋ก ์ด์ ๋ฐ ๊ณ์ ๊ฐ๋ฐ๋๊ณ ์์ต๋๋ค.
๐ LexGuard MCP
https://github.com/SeoNaRu/lexguard-mcp
์ด ์ ์ฅ์(korean-law-mcp)๋ ๋ ์ด์ ์ ์ง๋ณด์๋์ง ์์ต๋๋ค.
์ต์ ๊ธฐ๋ฅ ๋ฐ ์
๋ฐ์ดํธ๋ ์๋ก์ด ์ ์ฅ์๋ฅผ ์ด์ฉํด์ฃผ์ธ์.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
Korean law: statutes, precedents, ordinances, treaties and citation verification (๋ฒ์ ์ฒ API).
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.
Korean statutes, precedents, local business-district stats and public procurement for AI agents.
Related MCP Servers
- FlicenseAqualityBmaintenanceEnables AI systems to search, retrieve, and analyze Korean legal information from the National Law Information API (law.go.kr), including laws, administrative rules, English translations, and law-ordinance linkages.262-
- 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.133-
- 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.1082 PyPI5MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search, retrieve, and analyze South Korean legal documents including statutes, precedents, constitutional decisions, and administrative rulings via the Ministry of Government Legislation Open API. Provides 89 specialized tools with features like legal abbreviation auto-recognition, annex extraction, and complex research chain workflows.MIT