finalchild/law-mcp
If you are the rightful owner of law-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This server allows users to search and retrieve Korean laws and ordinances using the Model Context Protocol (MCP) with data provided by the National Law Information Center API.
Korean Law MCP Server
ํ๊ตญ ๋ฒ๋ น ๋ฐ ์์น๋ฒ๊ท(์กฐ๋ก)๋ฅผ ์กฐํํ ์ ์๋ Model Context Protocol (MCP) ์๋ฒ์ ๋๋ค. ๋ฒ์ ์ฒ์ ๊ตญ๊ฐ๋ฒ๋ น์ ๋ณด์ผํฐ(open.law.go.kr) API๋ฅผ ํตํด ๋ฐ์ดํฐ๋ฅผ ์ ๊ณตํฉ๋๋ค.
โ ๏ธ ์คํ์ ๊ตฌํ ์๋ด
ํ์ฌ ์ด MCP ์๋ฒ๋ Claude Code์ ํ์ผ ์ฝ๊ธฐ ๊ธฐ๋ฅ์ ์์กดํ๋ ์คํ์ ๊ตฌํ์ ๋๋ค.get_law_details
๋๊ตฌ๊ฐ ๋ฒ๋ น ์ ๋ณด๋ฅผ ํ์ผ๋ก ์ ์ฅํ ํ, Claude Code๊ฐ CLI ๋๊ตฌ๋ฅผ ์ฌ์ฉํด ํด๋น ํ์ผ์ ์ฝ๋ ๋ฐฉ์์ผ๋ก ๋์ํฉ๋๋ค. ๋ฐ๋ผ์ Claude Desktop ๋ฑ ์ผ๋ฐ MCP ํด๋ผ์ด์ธํธ์์๋ ์ ์์ ์ผ๋ก ์ฌ์ฉํ ์ ์์ผ๋ฉฐ, Claude Code ํ๊ฒฝ์์๋ง ์จ์ ํ ์๋ํฉ๋๋ค.
๐ API ๋ฌธ์
open.law.go.kr์ API ๋ฌธ์๋ฅผ ๋ค์ด๋ก๋ํ๋ ๋ฐฉ๋ฒ์ ๋ฅผ ์ฐธ์กฐํ์ธ์.
์ฃผ์ ๊ธฐ๋ฅ
- ๋ฒ๋ น ๋ฐ ์์น๋ฒ๊ท(์กฐ๋ก) ๊ฒ์ ์ง์
- ๋ฒ๋ น๋ช ๋๋ ๋ณธ๋ฌธ ๋ด์ฉ์ผ๋ก ๊ฒ์
- ํ์ด์ง๋ค์ด์ ๋ฐ ๋ค์ํ ์ ๋ ฌ ์ต์
- ๋ฒ๋ น/์์น๋ฒ๊ท ์์ธ ์ ๋ณด ์กฐํ ๋ฐ ์๋ ํ์ผ ์ ์ฅ (JSON/Markdown)
- ์กฐ๋ฌธ, ๋ถ์น, ๊ฐ์ ๋ฌธ, ์ ๊ฐ์ ์ด์ ํฌํจ
์ค์น ๋ฐ ์คํ
Claude Code์์ ์ฌ์ฉํ๊ธฐ
-
๋จผ์ ๋ฐ์ด๋๋ฆฌ ๋น๋:
# ํ์ฌ ํ๋ซํผ์ฉ ๋น๋ deno task build:current
-
Claude Code ์ค์ ํ์ผ ์ด๊ธฐ:
macOS:
code ~/Library/Application\ Support/Code/User/globalStorage/claude.claude-code/settings.json
Linux:
code ~/.config/Code/User/globalStorage/claude.claude-code/settings.json
-
MCP ์๋ฒ ์ค์ ์ถ๊ฐ:
{ "mcpServers": { "law-mcp": { "command": "/path/to/law-mcp/build/law-mcp", "env": { "LAW_API_OC": "your-email-id" } } } }
macOS ARM64 (Apple Silicon)์ ๊ฒฝ์ฐ:
{ "mcpServers": { "law-mcp": { "command": "/path/to/law-mcp/build/law-mcp-darwin-arm64", "env": { "LAW_API_OC": "your-email-id" } } } }
-
VS Code ์ฌ์์ ํ Claude Code์์ ์ฌ์ฉ ๊ฐ๋ฅ
ํ๊ฒฝ ๋ณ์ ์ค์
# open.law.go.kr API ์ธ์ฆ์ ์ํ OC ๊ฐ (์ด๋ฉ์ผ ID ๋ถ๋ถ)
export LAW_API_OC="your-email-id"
๊ฐ๋ฐ์์ฉ ์คํ ๋ฐฉ๋ฒ
# ๊ฐ๋ฐ ๋ชจ๋ (์๋ ์ฌ์์)
deno task dev
# ํ๋ก๋์
๋ชจ๋
deno task start
# ํ
์คํธ ์คํ
deno task test
# DXT ๋น๋
deno task build
์ฌ์ฉ ๊ฐ๋ฅํ ๋๊ตฌ
search_laws
ํ๊ตญ ๋ฒ๋ น ๋ฐ ์์น๋ฒ๊ท๋ฅผ ๊ฒ์ํฉ๋๋ค.
ํ๋ผ๋ฏธํฐ:
query
(ํ์): ๊ฒ์ํ ๋ฒ๋ น๋ช ๋๋ ๋ด์ฉtype
: ๊ฒ์ ์ ํ - "law"=๋ฒ๋ น(๊ธฐ๋ณธ๊ฐ), "ordinance"=์์น๋ฒ๊ท(์กฐ๋ก)page
: ํ์ด์ง ๋ฒํธ (๊ธฐ๋ณธ๊ฐ: 1)display
: ํ์ด์ง๋น ๊ฒฐ๊ณผ ์, ์ต๋ 100 (๊ธฐ๋ณธ๊ฐ: 20)search
: ๊ฒ์ ๋ฒ์ - 1=๋ฒ๋ น๋ช (๊ธฐ๋ณธ๊ฐ), 2=๋ณธ๋ฌธ๊ฒ์sort
: ์ ๋ ฌ ์ต์ lasc
: ๋ฒ๋ น๋ช ์ค๋ฆ์ฐจ์ (๊ธฐ๋ณธ๊ฐ)ldes
: ๋ฒ๋ น๋ช ๋ด๋ฆผ์ฐจ์dasc
: ๊ณตํฌ์ผ์ ์ค๋ฆ์ฐจ์ddes
: ๊ณตํฌ์ผ์ ๋ด๋ฆผ์ฐจ์nasc
: ๊ณตํฌ๋ฒํธ ์ค๋ฆ์ฐจ์ndes
: ๊ณตํฌ๋ฒํธ ๋ด๋ฆผ์ฐจ์efasc
: ์ํ์ผ์ ์ค๋ฆ์ฐจ์efdes
: ์ํ์ผ์ ๋ด๋ฆผ์ฐจ์
get_law_details
ํน์ ๋ฒ๋ น ๋๋ ์์น๋ฒ๊ท์ ์์ธ ์ ๋ณด๋ฅผ ์กฐํํ๊ณ ํ์ผ๋ก ์ ์ฅํฉ๋๋ค.
ํ๋ผ๋ฏธํฐ:
lawId
๋๋mst
(๋ ์ค ํ๋ ํ์):lawId
: ๋ฒ๋ น/์์น๋ฒ๊ท ID (์: '001638' - ๋๋ก๊ตํต๋ฒ, '2026666' - ์์น๋ฒ๊ท)mst
: ๋ฒ๋ น/์์น๋ฒ๊ท ์ผ๋ จ๋ฒํธ (์: '266639' - ๋ฒ๋ น, '1316146' - ์์น๋ฒ๊ท)
type
: ์กฐํ ์ ํ - "law"=๋ฒ๋ น(๊ธฐ๋ณธ๊ฐ), "ordinance"=์์น๋ฒ๊ท(์กฐ๋ก)
๋ฐํ ๊ฒฐ๊ณผ:
- JSON ํ์ผ: ์ ์ฒด ์์ธ ์ ๋ณด (์กฐ๋ฌธ, ๋ถ์น, ๊ฐ์ ์ด๋ ฅ ๋ฑ)
- Markdown ํ์ผ: ์ฝ๊ธฐ ์ฌ์ด ํ์์ผ๋ก ๋ณํ๋ ๋ฒ๋ น ์ ๋ณด
Desktop Extension (DXT) ์ง์
์ด ํ๋ก์ ํธ๋ MCP Desktop Extension์ผ๋ก ํจํค์งํ ์ ์์ต๋๋ค:
- ํ๋ซํผ๋ณ ๋ฐ์ด๋๋ฆฌ ๋น๋ ์ง์ (Windows, macOS, Linux)
- ์ฌ์ฉ์ ์ค์ ๊ฐ๋ฅํ API OC ํ๋ผ๋ฏธํฐ
- ์์ธํ ๋ด์ฉ์
DXT_BUILD_GUIDE.md
๋ฐDXT_README.md
์ฐธ์กฐ
๋ผ์ด์ ์ค
ISC License