Skip to main content

MCP Server for Korean Law Open API

Project description

⚖️ 대한민국 법령/판례 검색기 (Korean Law MCP)

MCP Badge

"법률 정보를 누구나 쉽게."

이 프로그램은 복잡한 대한민국 법령과 판례를 채팅하듯이 쉽게 검색하고 찾아볼 수 있게 해주는 도구입니다. Claude와 같은 AI와 연결하여 사용할 수 있습니다.


🚀 시작하기 (Quick Start)

가장 쉬운 사용 방법을 안내해 드립니다.

방법 1: uv를 이용한 자동 설치 (Mac/Linux/Windows 추천)

uv가 설치되어 있다면 가장 간편한 방법입니다. Claude 설정 파일에 아래 내용을 추가하세요. (Python 등을 직접 설치할 필요가 없습니다)

  • 설정 파일 경로:
    • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "korean-law": {
      "command": "uvx",
      "args": [
        "korean-law-mcp"
      ],
      "env": {
        "OPEN_LAW_ID": "여기에_아이디를_넣으세요"
      }
    }
  }
}

방법 2: 윈도우 실행 파일 (설치 불필요)

uv나 Python 설정이 어려운 윈도우(Windows) 사용자를 위한 방법입니다.

  1. 다운로드 페이지(Releases)로 이동합니다.
  2. 최신 버전의 korean-law-mcp.exe 파일을 다운로드합니다.
  3. 다운로드한 파일의 경로를 복사해 둡니다. (예: C:\Users\홍길동\Downloads\korean-law-mcp.exe)
  4. Claude Desktop 설정 파일(claude_desktop_config.json)을 열고 아래와 같이 적어주세요.
{
  "mcpServers": {
    "korean-law": {
      "command": "C:\\Users\\홍길동\\Downloads\\korean-law-mcp.exe",
      "env": {
        "OPEN_LAW_ID": "여기에_아이디를_넣으세요"
      }
    }
  }
}

🔑 필수 준비물: API 아이디

이 프로그램을 사용하려면 국가법령정보센터 아이디가 꼭 필요합니다.

  1. 국가법령정보센터(law.go.kr)에 접속하여 회원가입을 합니다.
  2. Open API 신청 페이지에서 '사용 신청'을 합니다. (무료입니다)
  3. 발급받은 아이디를 설정 파일의 "OPEN_LAW_ID" 부분에 넣어주세요.

✨ 주요 기능

이 도구로 할 수 있는 것들입니다.

  • 🔍 법령 검색: "고등교육법 제20조 찾아줘"라고 물어보면 법 조항을 바로 보여줍니다.
  • ⚖️ 판례 찾기: "학교폭력 관련 대법원 판례 찾아줘"라고 하면 관련 판례를 요약해 줍니다.
  • 📜 행정규칙/자치법규: 훈령, 예규, 지자체 조례까지 모두 검색 가능합니다.
  • 📖 법령 용어: "근로자가 뭐야?"라고 물으면 법적 정의를 정확히 알려줍니다.
  • 🤔 법령 해석례: "이 법을 이렇게 해석해도 되나?" 궁금할 때 법제처의 유권해석 사례를 찾아줍니다.
  • 📎 서식/별표: 법령에 첨부된 서식이나 표를 목록으로 보여줍니다.
  • 🔗 법률 그래프 탐색 (Deep Search): explore_legal_chain 도구를 사용하면 "고등교육법 제20조" 검색 시 시행령/시행규칙 등 위임된 하위 법령과 참조된 내/외부 조문까지 한 번에 찾아서 완벽한 보고서를 만들어줍니다.
  • 🤖 스마트 검색: 법령 이름을 정확히 몰라도, "김영란법"처럼 흔히 부르는 이름으로 검색해도 알아서 찾아줍니다.

🛠️ 사용 가능한 도구 (Reference)

이 MCP 서버가 제공하는 주요 도구들의 상세 설명입니다.

도구 이름 설명
search_korean_law (필수) 법령, 판례, 행정규칙을 검색하는 가장 기본 도구입니다. "민법 제103조" 처럼 구체적으로 검색하면 바로 조문 내용을 보여줍니다.
read_legal_resource statute:12345와 같은 ID를 사용하여 법령/판례의 **전문(Full Text)**을 가져옵니다. 긴 내용을 볼 때 사용합니다.
explore_legal_chain Deep Search. 특정 조문과 연결된 하위 법령(시행령/규칙) 및 참조 조문을 한 번에 모두 찾아 분석합니다.
get_statute_attachments 법령에 첨부된 별표서식 파일의 목록을 확인합니다.
search_legal_terms 법률 용어의 정의를 찾아줍니다.
search_statutory_interpretations 법제처의 법령 해석 사례를 검색합니다.

🧠 AI 최적화 프롬프트 (System Prompt)

AI(Claude 등)가 이 도구를 더 똑똑하게 사용하도록 하려면, 아래 내용을 **시스템 프롬프트(System Prompt)**나 Custom Instructions에 추가해 주세요.

## Role: Korean Law Expert (대한민국 법률 전문가)

You are an expert legal assistant with access to the 'Korean Law MCP' tools.
Always answer in Korean unless requested otherwise.

## Guidelines for Tool Usage:

1.  **Always Search First**: When asked a legal question, use 'search_korean_law' first.
    - If the user specifies an article (e.g., "민법 제103조"), search exactly for that.
    - If the query is broad (e.g., "학교폭력"), search for keywords.

2.  **ID-based Retrieval**:
    - The search result often provides Typed IDs (e.g., 'statute:12345').
    - To read the full content, MUST use 'read_legal_resource' with this ID.

3.  **Complex Analysis (Deep Search)**:
    - If the user asks for a comprehensive review of a specific provision (including its enforcement decrees/rules and references), USE 'explore_legal_chain'.
    - Example: "Analyze Article 20 of Higher Education Act strictly." -> 'explore_legal_chain("Higher Education Act Article 20")'

4.  **Formatting**:
    - Present legal texts clearly with blockquotes or code blocks if necessary.
    - Always cite the source (Law Name, Article Number).

👩‍💻 개발자용 (고급)

Python 환경에서 개발하거나 직접 설치하고 싶으신 분들을 위한 안내입니다.

설치

pip install korean-law-mcp

실행

실행 (MCP 서버 구동)

이 패키지는 MCP 서버이므로, 터미널에서 직접 실행하면 사용자 입력(JSON-RPC)을 기다리는 상태가 됩니다. (아무런 출력이 없을 수 있습니다.)

Claude Desktop이나 MCP Client에서 사용하도록 설정해야 합니다. 개발 목적으로 로컬에서 테스트하려면 mcp-cli 등을 사용하거나, 소스 코드 내의 inspector를 활용하세요.

# Claude Desktop 설정 예시 (macOS)
# ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "korean-law": {
      "command": "uvx",
      "args": ["korean-law-mcp"],
      "env": { "OPEN_LAW_ID": "YOUR_ID" }
    }
  }
}

문의 및 기여: 버그 제보나 기능 제안은 GitHub Issues에 남겨주세요.


GitHub 저장소: 더 자세한 정보나 소스 코드는 GitHub에서 확인하세요.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

korean_law_mcp-0.4.3.tar.gz (79.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

korean_law_mcp-0.4.3-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file korean_law_mcp-0.4.3.tar.gz.

File metadata

  • Download URL: korean_law_mcp-0.4.3.tar.gz
  • Upload date:
  • Size: 79.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for korean_law_mcp-0.4.3.tar.gz
Algorithm Hash digest
SHA256 8b4fde0f291b27c4d04ecfe1113dc3dec7e961ff286b957cb9933a696fb3e450
MD5 594de091f224a42111da21ac5afcd889
BLAKE2b-256 dcf523240d568b1e3badfe2df2feff913713f71bf8bc915edd4374b3a7a9eb41

See more details on using hashes here.

File details

Details for the file korean_law_mcp-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: korean_law_mcp-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for korean_law_mcp-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ae7ac066c0542ec5970bd5a381ed37b53c71bc5ef7d53d6cafa5b4e3b713c948
MD5 7e23afae16534be4ae6b78c1febfe692
BLAKE2b-256 7ea086bcb69961d55ad07da122e690ee59df2f065cdb909faef2cb46bdd02571

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page