Legal Search MCP
Click on "Install 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., "@Legal Search MCPSearch for '개인정보 보호법'"
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.
Legal Search MCP
한국 법제처 법령정보 API를 활용한 MCP(Model Context Protocol) 서버입니다. AI 에이전트가 한국 법령을 검색하고 조문 내용을 조회할 수 있도록 지원합니다.
기능
🔍 search-law
법령을 검색합니다.
파라미터 | 타입 | 필수 | 설명 |
| string | ✅ | 검색 키워드 (예: "자동차관리법", "개인정보") |
| enum | - |
|
| enum | - |
|
| number | - | 결과 개수 (기본: 20, 최대: 100) |
| number | - | 페이지 번호 (기본: 1) |
| enum | - |
|
| string | - | 소관부처 코드 (예: "1613000"=국토교통부) |
📖 get-law-detail
법령의 상세 내용(조문)을 조회합니다.
파라미터 | 타입 | 필수 | 설명 |
| string | ⚡ | 법령 ID (search-law 결과에서 확인) |
| string | ⚡ | 법령 마스터 번호 |
| string | 조건부 | 시행일자 (mst 사용시 필수, 형식: YYYYMMDD) |
| string | - | 특정 조문 번호 (6자리: 조번호4자리+가지번호2자리) |
⚡
lawId또는mst중 하나는 반드시 입력해야 합니다.
Related MCP server: e-Gov Law MCP Server
설치
# 의존성 설치
npm install
# 빌드
npm run build설정
환경 변수
.env.example을 .env로 복사하고 법제처 API 인증 정보를 설정합니다.
cp .env.example .env# 법제처 API OC 값 (이메일 ID 부분)
# 예: g4c@korea.kr → LAW_API_OC=g4c
# 주의: https://open.law.go.kr 에서 IP 등록이 완료된 환경에서만 작동합니다.
LAW_API_OC=your_email_id_here⚠️ 중요: 법제처 API는 IP 기반 접근 제어를 수행합니다. API를 호출하는 서버(또는 로컬 PC)의 IP가 국가법령정보센터 Open API 관리 페이지에 등록되어 있어야 합니다.> 💡 법제처 API는 별도 인증 키 없이 이메일 ID(OC)만 입력하면 사용할 수 있습니다.
연결 및 기능 검증
설정 후 아래 명령어로 API 연결과 기능이 정상 작동하는지 확인할 수 있습니다.
npm testMCP 클라이언트 설정
Cursor / Claude Desktop
~/.cursor/mcp.json 또는 claude_desktop_config.json에 추가:
{
"mcpServers": {
"legal-search": {
"command": "node",
"args": ["/path/to/legal-search-mcp/dist/index.js"],
"env": {
"LAW_API_OC": "your_email_id"
}
}
}
}npx로 실행 (개발용)
npx @modelcontextprotocol/inspector dist/index.js사용 예시
법령 검색
"자동차관리법" 검색해줘국토교통부 소관 법령 중 "도로"가 포함된 법령 찾아줘법령 상세 조회
자동차관리법(법령ID: 1747)의 전체 내용 보여줘자동차관리법 제3조 내용만 조회해줘개발
# 개발 모드 (TypeScript 감시)
npm run dev
# MCP Inspector로 테스트
npm run inspector라이선스
MIT License
참고
배포 및 공유 방법
1. GitHub에 배포하기 (소스 코드 공유)
소스 코드를 GitHub에 올려 다른 사람들과 공유하거나, 다른 컴퓨터에서 git clone하여 사용할 수 있습니다.
GitHub에서 새 레포지토리(Repository) 생성 (예:
legal-search-mcp)로컬 프로젝트를 GitHub에 연결 및 푸시:
# git 초기화 (이미 되어 있다면 생략)
git init
# 파일 추가 및 커밋
git add .
git commit -m "Initial commit"
# 원격 저장소 연결 (URL은 본인의 레포지토리 주소로 변경)
git remote add origin https://github.com/YOUR_USERNAME/legal-search-mcp.git
git branch -M main
git push -u origin main2. NPM에 배포하기 (패키지 공유)
NPM에 배포하면 npx 명령어로 누구나 설치 없이 바로 실행할 수 있습니다. (NPM 계정 필요)
package.json의name이 유니크한지 확인 (이미 누가 쓰고 있다면 변경 필요)NPM 로그인 및 게시:
# NPM 로그인
npm login
# 패키지 게시
npm publish --access public사용법 (배포 후):
npx your-package-name(물론 .env 설정이나 환경 변수 주입은 필요합니다.)
3. Docker로 실행하기 (권장)
Docker를 사용하면 환경 설정 없이 바로 실행할 수 있습니다.
1. 이미지 빌드
docker build -t legal-search-mcp .2. 실행 (테스트)
docker run -e LAW_API_OC="본인_OC_코드" legal-search-mcp3. Claude Desktop 설정 (Docker 사용)
claude_desktop_config.json에 다음과 같이 추가합니다:
{
"mcpServers": {
"legal-search-docker": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "LAW_API_OC=본인_OC_코드",
"legal-search-mcp"
]
}
}
}4. 상시 실행 (PM2 사용)
로컬 컴퓨터에서 서버를 끄지 않고 계속 실행해두고 싶다면 pm2를 사용할 수 있습니다.
npm install -g pm2
npm run build
pm2 start dist/index.js --name "legal-search-mcp"Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server for the Korean National Assembly Open API, enabling querying of bills, members, votes, committees, and more via natural language.Last updated20Apache 2.0
- Alicense-qualityDmaintenanceMCP server for searching and retrieving Japanese laws from the e-Gov API, enabling natural language queries for legal information.Last updated13MIT
- Flicense-qualityCmaintenanceThis MCP server integrates South Korea's national law information, building registers from MOLIT, and KOSIS statistics for housing development research. It enables searching laws, retrieving building details, and accessing statistical data through natural language.Last updated
- Alicense-qualityCmaintenanceMCP server for Korean government power/energy statutory plans. Enables AI agents to search and retrieve public power plan documents.Last updatedMIT
Related MCP Connectors
Connect AI to millions of laws and court cases with the Lawstronaut MCP.
Japan Law MCP — Japanese national laws & ordinances via the e-Gov Law API.
Task-oriented MCP for Indonesian law: search, resolve citations, read laws, and MK decisions.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/woongaro/legal-search-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server