# klaws — Korean compliance risk scanner [Health: Active]

**Category:** ⚖️ Legal  
**Repository:** https://github.com/rostradamus/klaws  
**GitHub Stars:** 1  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/klaws-korean-compliance-risk-scanner

## Description
Scan code for Korean compliance risks — PIPA/개인정보보호법, Network Act, Credit Info. Not legal advice.

## Tools
Capabilities this server exposes over MCP:

- **scan_directory** — Scan a directory for compliance risks
- **scan_file** — Scan a single file
- **list_detectors** — List all available detectors
- **get_law_reference** — Look up a Korean law provision by ID

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/rostradamus/klaws), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
go install github.com/rostradamus/klaws/cmd/klaws@latest
```

2. Install:

```sh
git clone https://github.com/rostradamus/klaws.git
```

3. Install:

```sh
cd klaws
```

4. Install:

```sh
go build -o klaws ./cmd/klaws/
```

5. Start the server:

```sh
klaws serve
```

6. Add to Claude Code:

```sh
claude mcp add klaws -- klaws serve
```

## Documentation

## What klaws — Korean compliance risk scanner does

klaws — Korean compliance risk scanner examines source files for code patterns associated with Korean compliance risks. Findings include a detector ID, severity, source location, matching snippet, explanation, and related legal provision IDs. The current detector set covers the Personal Information Protection Act (PIPA), Network Act, Credit Information Act, and E-Commerce Act.

Detected patterns include possible personal information in logs, sensitive identifiers without apparent encryption, endpoints that accept personal data without an apparent consent check, marketing messages without apparent opt-in handling, unprotected financial identifiers, transaction records without apparent retention handling, personal data without apparent destruction or retention limits, and transfers to external endpoints without an apparent consent check.

The scanner supports English and Korean field names, including examples such as `email` and `이메일`, or `consent` and `동의`. It identifies possible risks for engineering and legal review; it does not determine whether an implementation is legally compliant and is not legal advice.

## How it works

Detection uses regex-based pattern matching rather than program execution or a full semantic analysis of the application. The command-line interface scans directories or individual files. Directory scans use Java files by default, with a pattern option for other file types such as Kotlin. Results can be emitted as JSON, text, or SARIF, and a severity threshold can make the command exit with status 1 when findings meet or exceed it.

The MCP process starts with `klaws serve` and communicates over standard input and output. An AI coding client can call `scan_directory` or `scan_file`, inspect available rules with `list_detectors`, and retrieve a provision using `get_law_reference`. Law references come from a bundled database by default. The optional live lookup contacts law.go.kr.

## Setup and configuration

Install a released binary, use the published container image, run `go install github.com/rostradamus/klaws/cmd/klaws@latest`, or build from source with Go 1.23 or later. For a container scan, mount the project read-only and run the image against the mounted path. The MCP configuration uses the absolute path to the binary with `serve` as its argument; a Docker-based stdio configuration can instead mount the code and set `/src` as the scan root.

Claude Desktop, Claude Code, Cursor, and VS Code are documented client configurations. The CLI also accepts a custom laws YAML file for scans. Use `klaws law <ID>` for bundled references or add `--live` to request current text from law.go.kr.

## Tools and capabilities

- `scan_directory`: inspect a directory for compliance-risk patterns.
- `scan_file`: inspect one source file.
- `list_detectors`: return detector IDs, names, descriptions, and related laws.
- `get_law_reference`: look up a Korean legal provision by ID.
- Produce JSON, text, or SARIF output through the CLI.
- Fail a CLI scan at a chosen severity threshold.

## Limitations and notes

klaws — Korean compliance risk scanner analyzes code locally and sends no data over the network during normal operation. The documented exception is the optional live law lookup, which contacts law.go.kr. Regex findings can require context and may produce signals that need engineering or qualified legal review. Coverage is limited to the detectors and laws included by the project, and the tool does not provide definitive legal guidance.

_Full upstream README: https://allmcps.com/mcp/klaws-korean-compliance-risk-scanner/readme_

