Loading...
Loading...
MCP server providing access to 41 Korean legal APIs (법제처) with citation verification, impact analysis, and time-travel diff capabilities
npx skill4agent add aradotso/mcp-skills korean-law-mcpSkill by ara.so — MCP Skills collection.
claude_desktop_config.json{
"mcpServers": {
"korean-law": {
"command": "npx",
"args": [
"-y",
"korean-law-mcp"
],
"env": {
"MOLEG_API_KEY": "your-api-key-here"
}
}
}
}npm install -g korean-law-mcp
korean-law-mcpgit clone https://github.com/chrisryugj/korean-law-mcp.git
cd korean-law-mcp
npm install
npm run build
npm start# 법제처 Open API key (required)
MOLEG_API_KEY=your_api_key_here# Server configuration
PORT=3000 # HTTP server port (default: 3000)
TRUST_PROXY=1 # Trust X-Forwarded-For (default: 1)
LAW_USER_AGENT=Mozilla/5.0 # Custom User-Agent for API calls
# Rate limiting (per IP)
RATE_LIMIT_WINDOW_MS=60000 # Window in ms (default: 60000)
RATE_LIMIT_MAX_REQUESTS=100 # Max requests per window (default: 100)verify_citations// Natural language trigger
"민법 제750조에 따라 불법행위 손해배상을 청구하고, 형법 제9999조는 가중처벌을 정한다"
// Tool input
{
"userText": "민법 제750조에 따라 불법행위 손해배상을 청구하고, 형법 제9999조는 가중처벌을 정한다"
}
// Response structure
{
"citations": [
{
"lawName": "민법",
"article": "750",
"status": "verified",
"exists": true,
"title": "불법행위의 내용"
},
{
"lawName": "형법",
"article": "9999",
"status": "invalid",
"exists": false,
"reason": "해당 조문 없음 (존재 범위: 제1조~제372조)"
}
],
"summary": "검증 결과: 2건 중 ✓ 1건 실존, ✗ 1건 환각"
}impact_map// Natural language trigger
"민법 제103조 인용한 판례"
// Tool input
{
"lawName": "민법",
"article": "103"
}
// Response includes Mermaid graph code
{
"graph": "graph LR\n 민법_제103조[\"⚖️ 민법 제103조\"] --> P[\"📚 대법원 판례\"]\n ...",
"precedents": [...],
"constitutionalDecisions": [...],
"localOrdinances": [...]
}time_travel// Natural language trigger
"개인정보보호법 2020-01-01 vs 2025-11-01"
// Tool input
{
"lawName": "개인정보보호법",
"dateA": "20200101",
"dateB": "20251101"
}
// Response structure
{
"metadata": {
"lawName": "개인정보보호법",
"dateA": "2020-01-01",
"dateB": "2025-11-01"
},
"diff": [
{
"article": "제15조",
"changeType": "modified",
"before": "...",
"after": "...",
"charDelta": "+120"
},
{
"article": "제39조의2",
"changeType": "added",
"after": "..."
}
]
}action_plan// Natural language trigger
"전세금 못 받았어"
// Tool input
{
"situation": "전세금 못 받았어"
}
// Response structure
{
"steps": [
{
"step": 1,
"title": "상황진단",
"content": "주택임대차보호법 제3조의2 (임차권등기명령)",
"relevantLaws": ["주택임대차보호법"]
},
{
"step": 2,
"title": "권리/구제수단",
"precedents": [...]
},
{
"step": 3,
"title": "신청기관/기한",
"agencies": ["지방법원", "임대차분쟁조정위원회"]
},
{
"step": 4,
"title": "필요서류/양식",
"documents": [...]
},
{
"step": 5,
"title": "함정/주의사항",
"warnings": ["소멸시효 3년", "법률구조공단 무료 지원"]
}
]
}search_law// Tool input
{
"query": "개인정보",
"display": 10
}
// Response
{
"results": [
{
"lawId": "001615",
"lawName": "개인정보 보호법",
"lawAbbr": "개인정보보호법",
"promulgationDate": "20110329",
"enforcementDate": "20110930"
}
],
"nextSteps": "💡 다음: get_law_text({lawName: '개인정보 보호법'})"
}get_law_text// Tool input
{
"lawName": "민법",
"enforcementDate": "20250101" // optional
}
// Response
{
"lawName": "민법",
"articles": [
{
"articleNumber": "1",
"articleTitle": "법원",
"paragraphs": [
{
"paragraphNumber": "1",
"content": "민사에 관하여 법률에 규정이 없으면..."
}
]
}
]
}get_precedents// Tool input
{
"query": "부당해고",
"decisionType": "precedent", // or "constitutional", "admin_appeal"
"display": 5
}
// Response (with compact mode by default)
{
"decisions": [
{
"caseNumber": "2023두12345",
"court": "대법원",
"decisionDate": "2023-05-15",
"caseTitle": "부당해고구제재심판정취소",
"summary": "판시사항 [800자] ... [중략] ... 주문 [400자]",
"referenceLaws": ["근로기준법 제23조"],
"referencePrecedents": ["2020.3.26. 2018두56077"]
}
]
}"full": true{
"query": "부당해고",
"decisionType": "precedent",
"full": true
}// Step 1: Search relevant law
search_law({ query: "식품위생법" })
// Step 2: Get full text
get_law_text({ lawName: "식품위생법" })
// Step 3: Check precedents
get_precedents({
query: "식품위생법 영업정지",
decisionType: "admin_appeal"
})
// Step 4: Get penalty schedules (별표)
get_annex({
lawName: "식품위생법",
annexType: "별표"
})
// Step 5: Check administrative rules
search_administrative_rules({ query: "식품위생법 시행규칙" })// 1. Verify all cited provisions
verify_citations({
userText: "[contract text with legal citations]"
})
// 2. For each valid citation, get impact map
impact_map({
lawName: "민법",
article: "103"
})
// 3. Check if provisions have changed recently
time_travel({
lawName: "민법",
dateA: "20200101",
dateB: "20250101"
})// 1. Find all relevant regulations
search_law({ query: "개인정보" })
search_administrative_rules({ query: "개인정보" })
// 2. Get enforcement dates
get_law_text({
lawName: "개인정보 보호법",
enforcementDate: "20250101"
})
// 3. Check interpretations
get_interpretations({ query: "개인정보 처리방침" })
// 4. Review recent precedents
get_precedents({
query: "개인정보 유출",
decisionType: "precedent"
})get_annex{
"lawName": "식품위생법",
"annexType": "별표",
"annexNumber": "1"
}search_treaty{
"query": "FTA",
"country": "미국" // optional
}search_ordinance{
"query": "주차",
"jurisdiction": "서울특별시" // optional
}search_administrative_rules{
"query": "건축법 시행규칙",
"ruleType": "훈령" // optional: 훈령, 예규, 고시
}사용자 정보 검증에 실패하였습니다# Verify API key is set
echo $MOLEG_API_KEY
# Check API key validity at:
# https://www.law.go.kr/DRF/lawService.doToo Many Requests# Increase rate limit in config
RATE_LIMIT_MAX_REQUESTS=200
RATE_LIMIT_WINDOW_MS=60000fetch failed[EXTERNAL_API_ERROR]LAW_USER_AGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"verify_citations제123조123조123searchDisplay=100[NOT_FOUND]// Check enforcement date
get_law_text({
lawName: "개인정보 보호법",
enforcementDate: "20110930" // Must be after promulgation
})
// Try broader search
search_law({
query: "개인정보",
display: 50
})# Ensure date format is YYYYMMDD
dateA: "20200101" # ✓ Correct
dateA: "2020-01-01" # ✗ Wrong
# Check if law existed at both dates
# Use get_law_text with each date first{
"mcpServers": {
"korean-law": {
"command": "npx",
"args": ["-y", "korean-law-mcp"],
"env": {
"MOLEG_API_KEY": "your-key-here",
"RATE_LIMIT_MAX_REQUESTS": "150"
}
}
}
}.cursor/config.json{
"mcp": {
"servers": {
"korean-law": {
"command": "npx",
"args": ["-y", "korean-law-mcp"],
"env": {
"MOLEG_API_KEY": "your-key-here"
}
}
}
}
}# Deploy to fly.io or Vercel
npm run build
fly deploy
# Use in claude.ai custom connector:
# https://korean-law-mcp.fly.dev/mcp?oc=YOUR_API_KEYverify_citationstime_travelget_law_textsearch_lawsearch_administrative_rulesaction_planget_annexget_precedentssearch_ordinanceget_precedentsfull: truenextStepsget_law_textverify_citations