법제처 국가법령정보 MCP — 법령·판례·조례 조회부터 인용 환각 검증까지 · Korean law MCP for LLMs
This report presents the forensic synthetic code analysis of chrisryugj/korean-law-mcp, a TypeScript project with 2,204 GitHub stars. SynthScan v2.0 examined 32,098 lines of code across 135 source files, recording 144 pattern matches distributed across 6 syntactic categories. The overall adjusted score of 9.9 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 144 distinct pattern matches across 6 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/cli.ts | 34 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/cli.ts | 36 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/cli.ts | 184 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/cli.ts | 186 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/cli.ts | 387 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/cli.ts | 389 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | src/tools/document-analysis.ts | 19 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | src/tools/document-analysis.ts | 21 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | src/tools/document-analysis.ts | 30 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | src/tools/document-analysis.ts | 32 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/tools/annex.ts | 167 | // ─── 별표 텍스트 추출 ───────────────────────────────── | COMMENT |
| MEDIUM | src/tools/annex.ts | 253 | // ─── 목록 포맷 (기존 동작) ──────────────────────────── | COMMENT |
| MEDIUM | src/lib/cli-executor.ts | 14 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/cli-executor.ts | 16 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/cli-executor.ts | 28 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/cli-executor.ts | 30 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/cli-executor.ts | 60 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/cli-executor.ts | 62 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/cli-executor.ts | 182 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/cli-executor.ts | 184 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/risk-rules.ts | 7 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/risk-rules.ts | 9 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/risk-rules.ts | 109 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/risk-rules.ts | 111 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/risk-rules.ts | 136 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/risk-rules.ts | 138 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/risk-rules.ts | 320 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/risk-rules.ts | 322 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/risk-rules.ts | 351 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/risk-rules.ts | 353 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/risk-rules.ts | 424 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/risk-rules.ts | 426 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/risk-rules.ts | 507 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/risk-rules.ts | 509 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/query-router.ts | 41 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/query-router.ts | 43 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/query-router.ts | 80 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/query-router.ts | 82 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/query-router.ts | 93 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/query-router.ts | 95 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/query-router.ts | 825 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/query-router.ts | 827 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/cli-format.ts | 11 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/cli-format.ts | 13 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/cli-format.ts | 36 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/cli-format.ts | 38 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/cli-format.ts | 69 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/cli-format.ts | 71 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/cli-format.ts | 118 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/cli-format.ts | 120 | // ──────────────────────────────────────── | COMMENT |
| MEDIUM | src/lib/annex-file-parser.ts | 14 | // ─── 기존 인터페이스 호환 ──────────────────────────── | COMMENT |
| MEDIUM | src/lib/annex-file-parser.ts | 27 | // ─── 메인 엔트리 ───────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/DEVELOPMENT.md | 118 | ### Step 2: tool-registry.ts???깅줉 | COMMENT |
| LOW | docs/DEVELOPMENT.md | 134 | ### Step 3: 鍮뚮뱶 & ?뚯뒪?? | COMMENT |
| LOW | src/setup.ts | 262 | // Step 1: API 키 | COMMENT |
| LOW | src/setup.ts | 275 | // Step 2: 클라이언트 선택 | COMMENT |
| LOW | src/setup.ts | 304 | // Step 3: 설정 파일 업데이트 | COMMENT |
| LOW⚡ | src/tools/chains.ts | 375 | // Step 1: 3단 비교 (요건 체계) | COMMENT |
| LOW⚡ | src/tools/chains.ts | 379 | // Step 2: 해석례 + 판례 + 행정심판 (병렬) | COMMENT |
| LOW⚡ | src/tools/chains.ts | 441 | // Step 1: 판례 + 행정심판 (병렬). 판례는 구조화 hit 기반 상세조회까지 같은 경로에서 처리한다. | COMMENT |
| LOW⚡ | src/tools/chains.ts | 451 | // Step 2: 도메인별 전문 결정례 추가 | COMMENT |
| LOW⚡ | src/tools/chains.ts | 548 | // Step 1: 신구대조표 | COMMENT |
| LOW⚡ | src/tools/chains.ts | 552 | // Step 2: 조문별 개정 이력 (lawId 필요) | COMMENT |
| LOW⚡ | src/tools/chains.ts | 609 | // Step 2: 조례 검색 — "조례"/"규칙" 제거 (이미 조례 DB에서 검색하므로) | COMMENT |
| LOW⚡ | src/tools/chains.ts | 614 | // Step 3: 상위 1건 전문 자동 조회 | COMMENT |
| LOW⚡ | src/tools/chains.ts | 748 | // Step 1: 법령 검색 | COMMENT |
| LOW⚡ | src/tools/chains.ts | 755 | // Step 2: 3단 비교 (절차 체계 파악) | COMMENT |
| LOW⚡ | src/tools/chains.ts | 759 | // Step 3: 별표(수수료/과태료) + 서식(신청서) 병렬 | COMMENT |
| LOW | src/tools/chains.ts | 596 | // Step 1: 상위 법령 확인 (조례/지역명은 법령 검색에서 제거) | COMMENT |
| LOW | src/tools/chains.ts | 665 | // Step 1: AI 검색 + 법령 검색 + 해석례를 병렬 실행하고, 판례는 AI 구조화 신호를 받은 뒤 공통 core로 검색한다. | COMMENT |
| LOW | src/tools/chains.ts | 781 | // Step 4: AI 검색으로 보완 (절차 상세) | COMMENT |
| LOW | src/tools/chains.ts | 817 | // Step 1: analyze_document 로 리스크 분석 | COMMENT |
| LOW | src/tools/chains.ts | 829 | // Step 2: 분석 결과에서 searchHints 추출 → 병렬로 법령+판례 검색 | COMMENT |
| LOW | src/tools/scenarios/time-travel.ts | 149 | // Step 1: 연혁 목록 → 두 시점 MST 결정 (페이징으로 전체 회수) | COMMENT |
| LOW | src/tools/scenarios/time-travel.ts | 202 | // Step 2: 두 시점 본문 raw 조회 | COMMENT |
| LOW⚡ | src/tools/scenarios/time-travel.ts | 234 | // Step 3: diff | COMMENT |
| LOW⚡ | src/tools/scenarios/time-travel.ts | 237 | // Step 4: 출력 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/setup.ts | 262 | // Step 1: API 키 | COMMENT |
| LOW | src/setup.ts | 275 | // Step 2: 클라이언트 선택 | COMMENT |
| LOW | src/setup.ts | 304 | // Step 3: 설정 파일 업데이트 | COMMENT |
| LOW⚡ | src/tools/chains.ts | 375 | // Step 1: 3단 비교 (요건 체계) | COMMENT |
| LOW⚡ | src/tools/chains.ts | 379 | // Step 2: 해석례 + 판례 + 행정심판 (병렬) | COMMENT |
| LOW⚡ | src/tools/chains.ts | 441 | // Step 1: 판례 + 행정심판 (병렬). 판례는 구조화 hit 기반 상세조회까지 같은 경로에서 처리한다. | COMMENT |
| LOW⚡ | src/tools/chains.ts | 451 | // Step 2: 도메인별 전문 결정례 추가 | COMMENT |
| LOW⚡ | src/tools/chains.ts | 548 | // Step 1: 신구대조표 | COMMENT |
| LOW⚡ | src/tools/chains.ts | 552 | // Step 2: 조문별 개정 이력 (lawId 필요) | COMMENT |
| LOW⚡ | src/tools/chains.ts | 609 | // Step 2: 조례 검색 — "조례"/"규칙" 제거 (이미 조례 DB에서 검색하므로) | COMMENT |
| LOW⚡ | src/tools/chains.ts | 614 | // Step 3: 상위 1건 전문 자동 조회 | COMMENT |
| LOW⚡ | src/tools/chains.ts | 748 | // Step 1: 법령 검색 | COMMENT |
| LOW⚡ | src/tools/chains.ts | 755 | // Step 2: 3단 비교 (절차 체계 파악) | COMMENT |
| LOW⚡ | src/tools/chains.ts | 759 | // Step 3: 별표(수수료/과태료) + 서식(신청서) 병렬 | COMMENT |
| LOW | src/tools/chains.ts | 596 | // Step 1: 상위 법령 확인 (조례/지역명은 법령 검색에서 제거) | COMMENT |
| LOW | src/tools/chains.ts | 665 | // Step 1: AI 검색 + 법령 검색 + 해석례를 병렬 실행하고, 판례는 AI 구조화 신호를 받은 뒤 공통 core로 검색한다. | COMMENT |
| LOW | src/tools/chains.ts | 781 | // Step 4: AI 검색으로 보완 (절차 상세) | COMMENT |
| LOW | src/tools/chains.ts | 817 | // Step 1: analyze_document 로 리스크 분석 | COMMENT |
| LOW | src/tools/chains.ts | 829 | // Step 2: 분석 결과에서 searchHints 추출 → 병렬로 법령+판례 검색 | COMMENT |
| LOW | src/tools/scenarios/time-travel.ts | 149 | // Step 1: 연혁 목록 → 두 시점 MST 결정 (페이징으로 전체 회수) | COMMENT |
| LOW | src/tools/scenarios/time-travel.ts | 202 | // Step 2: 두 시점 본문 raw 조회 | COMMENT |
| LOW⚡ | src/tools/scenarios/time-travel.ts | 234 | // Step 3: diff | COMMENT |
| LOW⚡ | src/tools/scenarios/time-travel.ts | 237 | // Step 4: 출력 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/tools/constitutional-decisions.ts | 26 | export async function searchConstitutionalDecisions( | CODE |
| LOW | src/tools/constitutional-decisions.ts | 91 | export async function getConstitutionalDecisionText( | CODE |
| LOW | src/tools/external-links.ts | 195 | function generateInterpretationLinks(interpretationId: string): string { | CODE |
| LOW | src/tools/impact-map.ts | 59 | async function searchPrecedentsWithoutFallback( | CODE |
| LOW | src/tools/unified-decisions.ts | 159 | async function searchPrecedentDecisionsWithText( | CODE |
| LOW | src/tools/tax-tribunal-decisions.ts | 23 | export async function searchTaxTribunalDecisions( | CODE |
| LOW | src/tools/tax-tribunal-decisions.ts | 93 | export async function getTaxTribunalDecisionText( | CODE |
| LOW | src/tools/applicable-law.ts | 96 | function extractTransitionExcerpts( | CODE |
| LOW | src/tools/precedents.ts | 61 | export function renderPrecedentSearchResult(result: StructuredPrecedentSearchResult): string { | CODE |
| LOW | src/tools/precedents.ts | 212 | function normalizeTaxlawBodyCandidate(value: unknown): string { | CODE |
| LOW | src/tools/precedents.ts | 363 | async function fetchHtmlFallbackPrecedent( | CODE |
| LOW | src/tools/search-detail-chain.ts | 149 | export async function fetchCombinedSearchDetailChain( | CODE |
| LOW | src/tools/institutional-rules.ts | 178 | export async function searchPublicInstitutionRules(apiClient: LawApiClient, args: SearchPublicInstitutionRulesInput) { | CODE |
| LOW | src/tools/institutional-rules.ts | 184 | export async function getPublicInstitutionRuleText(apiClient: LawApiClient, args: GetPublicInstitutionRuleTextInput) { | CODE |
| LOW | src/tools/precedent-evidence.ts | 132 | export async function validatePrecedentSearchResult( | CODE |
| LOW | src/tools/precedent-search-core.ts | 262 | export async function searchPrecedentsStructured( | CODE |
| LOW | src/tools/compact-query-planner.ts | 165 | function normalizeOriginalPrecedentQuery(query: string): string { | CODE |
| LOW | src/tools/compact-query-planner.ts | 217 | function extractedOriginalKeywords(originalQuery: string): string[] { | CODE |
| LOW | src/tools/compact-query-planner.ts | 373 | function scoreAiLawArticleCandidate( | CODE |
| LOW | src/tools/compact-query-planner.ts | 533 | function addOriginalQueryCandidate( | CODE |
| LOW | src/tools/compact-query-planner.ts | 561 | function addOriginalKeywordCandidates( | CODE |
| LOW | src/tools/compact-query-planner.ts | 666 | function addDocumentHintCandidates( | CODE |
| LOW | src/tools/compact-query-planner.ts | 689 | function addStructuredAiLawArticleCandidates( | CODE |
| LOW | src/tools/special-admin-appeals.ts | 132 | export async function searchAppealReviewDecisions(apiClient: LawApiClient, args: SearchAppealReviewDecisionsInput) { | CODE |
| LOW | src/tools/special-admin-appeals.ts | 139 | export async function getAppealReviewDecisionText(apiClient: LawApiClient, args: GetAppealReviewDecisionTextInput) { | CODE |
| LOW | src/tools/chains.ts | 64 | function emptyStructuredPrecedentResult(args: SearchPrecedentsInput): StructuredPrecedentSearchResult { | CODE |
| LOW | src/tools/chains.ts | 83 | async function safeSearchPrecedentsStructured( | CODE |
| LOW | src/tools/chains.ts | 254 | function combineStructuredPrecedentResults( | CODE |
| LOW | src/tools/customs-interpretations.ts | 30 | export async function searchCustomsInterpretations( | CODE |
| LOW | src/tools/customs-interpretations.ts | 126 | export async function getCustomsInterpretationText( | CODE |
| LOW | src/lib/citation-content-matcher.ts | 86 | function longestCommonSubstringLen(a: string, b: string): number { | CODE |
| LOW | src/lib/external-https-proxy.ts | 28 | export function getExternalHttpsProxyConfig(): ExternalHttpsProxyConfig | null { | CODE |
| LOW | src/lib/historical-utils.ts | 70 | export async function fetchHistoricalVersionsFull( | CODE |
| LOW | src/lib/historical-utils.ts | 125 | export async function fetchHistoricalVersionsRaw( | CODE |
| LOW | src/lib/three-tier-parser.ts | 39 | function stripLeadingJoHeaderFromContent(content: string): string { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | README-EN.md | 236 | "LAW_OC": "your-api-key" | CODE |
| HIGH | README-EN.md | 265 | "https://korean-law-mcp.fly.dev/mcp?oc=your-api-key" | CODE |
| HIGH | README-EN.md | 278 | "url": "https://korean-law-mcp.fly.dev/mcp?oc=your-api-key" | CODE |
| HIGH | README-EN.md | 302 | export LAW_OC=your-api-key | CODE |
| HIGH | README-EN.md | 316 | docker run -e LAW_OC=your-api-key -p 3000:3000 korean-law-mcp | CODE |
| HIGH | docs/DEVELOPMENT.md | 22 | LAW_OC=your-api-key node build/index.js | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/FTC-RAG-INTEGRATION.md | 1 | # 공정위 결정문 — 로컬 LLM RAG 결합 가이드 | COMMENT |
| MEDIUM | docs/FTC-RAG-INTEGRATION.md | 9 | ### 경로 A: 구조화 텍스트 (`get_decision_text`) ← RAG 메인 | COMMENT |
| MEDIUM | docs/FTC-RAG-INTEGRATION.md | 81 | ## 3. RAG 인덱싱 — 청킹 전략 | COMMENT |