Repository Analysis

chrisryugj/korean-law-mcp

법제처 국가법령정보를 LLM에서 바로 조회하는 MCP 서버. 법령·판례·조례 검색과 인용 검증 | MCP server for Korean law — search statutes, precedents, and ordinances, and verify citations

7.9 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of chrisryugj/korean-law-mcp, a TypeScript project with 2,533 GitHub stars. SynthScan v2.0 examined 44,406 lines of code across 235 source files, recording 157 pattern matches distributed across 7 syntactic categories. The overall adjusted score of 7.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).

7.9
Adjusted Score
7.9
Raw Score
100%
Time Factor
2026-08-20
Last Push
2.5K
Stars
TypeScript
Language
44.4K
Lines of Code
235
Files
157
Pattern Hits
2026-08-29
Scan Date
0.03
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 6MEDIUM 68LOW 83

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 157 distinct pattern matches across 7 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.

Decorative Section Separators65 hits · 201 pts
SeverityFileLineSnippetContext
MEDIUMsrc/cli.ts34// ────────────────────────────────────────COMMENT
MEDIUMsrc/cli.ts36// ────────────────────────────────────────COMMENT
MEDIUMsrc/cli.ts184// ────────────────────────────────────────COMMENT
MEDIUMsrc/cli.ts186// ────────────────────────────────────────COMMENT
MEDIUMsrc/cli.ts387// ────────────────────────────────────────COMMENT
MEDIUMsrc/cli.ts389// ────────────────────────────────────────COMMENT
MEDIUMsrc/tools/document-analysis.ts19// ────────────────────────────────────────COMMENT
MEDIUMsrc/tools/document-analysis.ts21// ────────────────────────────────────────COMMENT
MEDIUMsrc/tools/document-analysis.ts30// ────────────────────────────────────────COMMENT
MEDIUMsrc/tools/document-analysis.ts32// ────────────────────────────────────────COMMENT
MEDIUMsrc/tools/annex-select.test.ts65// ─── 별표번호 6자리 코드 체계 (실측 확정) ──────────────────COMMENT
MEDIUMsrc/tools/search.test.ts31// ── display 하한 (#89) ────────────────────────────────COMMENT
MEDIUMsrc/tools/search.test.ts31// ── display 하한 (#89) ────────────────────────────────COMMENT
MEDIUMsrc/tools/annex-select.ts304// ─── query 필터 (#94) ─────────────────────────────────COMMENT
MEDIUMsrc/tools/annex-select.ts304// ─── query 필터 (#94) ─────────────────────────────────COMMENT
MEDIUMsrc/tools/annex-select.ts322// ─── 조문 맥락 (#133) ─────────────────────────────────COMMENT
MEDIUMsrc/tools/annex-select.ts322// ─── 조문 맥락 (#133) ─────────────────────────────────COMMENT
MEDIUMsrc/tools/annex.ts219// ─── 별표 텍스트 추출 ─────────────────────────────────COMMENT
MEDIUMsrc/tools/annex.ts378// ─── 목록 포맷 (기존 동작) ────────────────────────────COMMENT
MEDIUMsrc/tools/applicable-law.staggered.test.ts7// ── 라이브 캡처 픽스처 (2026-07-19, OC만 test로 마스킹) ──────────────────────COMMENT
MEDIUMsrc/tools/applicable-law.staggered.test.ts19// ── 포맷 일치 스텁 헬퍼 ──────────────────────────────────────────────────────COMMENT
MEDIUMsrc/tools/scenarios/time-travel-diff.ts132// ─── 신구대조 발췌 (#97) ──────────────────────────────COMMENT
MEDIUMsrc/tools/scenarios/time-travel-diff.ts132// ─── 신구대조 발췌 (#97) ──────────────────────────────COMMENT
MEDIUMsrc/tools/scenarios/time-travel-diff.test.ts170// ─── 통합 배치 이음새 회귀 (지적 3·4) ────────────────────COMMENT
MEDIUMsrc/server/http-server.ts80 // ── Origin 검증 (DNS rebinding 방어) ──────────────────────────────────────COMMENT
MEDIUMsrc/server/http-server.ts125 // ── 접근 인증 (MCP_AUTH_TOKEN 설정 시에만 활성) ────────────────────────────COMMENT
MEDIUMsrc/lib/cli-executor.ts15// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/cli-executor.ts17// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/cli-executor.ts29// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/cli-executor.ts31// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/cli-executor.ts61// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/cli-executor.ts63// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/cli-executor.ts216// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/cli-executor.ts218// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/risk-rules.ts7// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/risk-rules.ts9// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/risk-rules.ts109// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/risk-rules.ts111// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/risk-rules.ts136// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/risk-rules.ts138// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/risk-rules.ts320// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/risk-rules.ts322// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/risk-rules.ts351// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/risk-rules.ts353// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/risk-rules.ts424// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/risk-rules.ts426// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/risk-rules.ts507// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/risk-rules.ts509// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/tool-discovery.ts153// ── 무매칭일 때 ──────────────────────────────────────────────────────COMMENT
MEDIUMsrc/lib/cli-format.ts11// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/cli-format.ts13// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/cli-format.ts36// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/cli-format.ts38// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/cli-format.ts69// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/cli-format.ts71// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/cli-format.ts118// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/cli-format.ts120// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/route-patterns.ts766// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/route-patterns.ts768// ────────────────────────────────────────COMMENT
MEDIUMsrc/lib/route-patterns.ts795// ────────────────────────────────────────COMMENT
5 more matches not shown…
Structural Annotation Overuse22 hits · 38 pts
SeverityFileLineSnippetContext
LOWdocs/DEVELOPMENT.md98### Step 1: 도구 파일 생성COMMENT
LOWdocs/DEVELOPMENT.md129### Step 2: tool-registry.ts에 등록COMMENT
LOWdocs/DEVELOPMENT.md145### Step 3: 빌드 & 테스트COMMENT
LOWsrc/setup.ts267 // Step 1: API 키COMMENT
LOWsrc/setup.ts280 // Step 2: 클라이언트 선택COMMENT
LOWsrc/setup.ts309 // Step 3: 설정 파일 업데이트COMMENT
LOWsrc/tools/chains.ts681 // Step 1: 신구대조표COMMENT
LOWsrc/tools/chains.ts685 // Step 2: 조문별 개정 이력 (lawId 필요)COMMENT
LOWsrc/tools/chains.ts742 // Step 2: 조례 검색 — "조례"/"규칙" 제거 (이미 조례 DB에서 검색하므로)COMMENT
LOWsrc/tools/chains.ts747 // Step 3: 상위 1건 전문 자동 조회COMMENT
LOWsrc/tools/chains.ts921 // Step 1: 법령 검색COMMENT
LOWsrc/tools/chains.ts929 // Step 2: 3단 비교 (절차 체계 파악)COMMENT
LOWsrc/tools/chains.ts933 // Step 3: 별표(수수료/과태료) + 서식(신청서) 병렬COMMENT
LOWsrc/tools/chains.ts729 // Step 1: 상위 법령 확인 (조례/지역명은 법령 검색에서 제거)COMMENT
LOWsrc/tools/chains.ts804 // Step 1: AI 검색 + 법령 검색 + 해석례를 병렬 실행하고, 판례는 AI 구조화 신호를 받은 뒤 공통 core로 검색한다.COMMENT
LOWsrc/tools/chains.ts955 // Step 4: AI 검색으로 보완 (절차 상세)COMMENT
LOWsrc/tools/chains.ts992 // Step 1: analyze_document 로 리스크 분석COMMENT
LOWsrc/tools/chains.ts1004 // Step 2: 분석 결과에서 searchHints 추출 → 병렬로 법령+판례 검색COMMENT
LOWsrc/tools/scenarios/time-travel.ts90 // Step 1: 연혁 목록 → 두 시점 MST 결정 (페이징으로 전체 회수)COMMENT
LOWsrc/tools/scenarios/time-travel.ts147 // Step 2: 두 시점 본문 raw 조회COMMENT
LOWsrc/tools/scenarios/time-travel.ts175 // Step 3: diffCOMMENT
LOWsrc/tools/scenarios/time-travel.ts178 // Step 4: 출력COMMENT
Hyper-Verbose Identifiers40 hits · 38 pts
SeverityFileLineSnippetContext
LOWsrc/tools/constitutional-decisions.ts26export async function searchConstitutionalDecisions(CODE
LOWsrc/tools/constitutional-decisions.ts91export async function getConstitutionalDecisionText(CODE
LOWsrc/tools/external-links.ts195function generateInterpretationLinks(interpretationId: string): string {CODE
LOWsrc/tools/impact-map.ts54async function searchPrecedentsWithoutFallback(CODE
LOWsrc/tools/unified-decisions.ts159async function searchPrecedentDecisionsWithText(CODE
LOWsrc/tools/tax-tribunal-decisions.ts23export async function searchTaxTribunalDecisions(CODE
LOWsrc/tools/tax-tribunal-decisions.ts93export async function getTaxTribunalDecisionText(CODE
LOWsrc/tools/applicable-law.ts108function extractTransitionExcerpts(CODE
LOWsrc/tools/precedents.ts64export function renderPrecedentSearchResult(result: StructuredPrecedentSearchResult): string {CODE
LOWsrc/tools/precedents.ts215function normalizeTaxlawBodyCandidate(value: unknown): string {CODE
LOWsrc/tools/precedents.ts389async function fetchHtmlFallbackPrecedent(CODE
LOWsrc/tools/annex-merge-marker.test.ts19function clientWithFailingCanonical(): LawApiClient {CODE
LOWsrc/tools/verify-citations.ts99export function lawNameFromCitationContext(lookbackRaw: string): string | undefined {CODE
LOWsrc/tools/search-detail-chain.ts149export async function fetchCombinedSearchDetailChain(CODE
LOWsrc/tools/institutional-rules.ts178export async function searchPublicInstitutionRules(apiClient: LawApiClient, args: SearchPublicInstitutionRulesInput) {CODE
LOWsrc/tools/institutional-rules.ts184export async function getPublicInstitutionRuleText(apiClient: LawApiClient, args: GetPublicInstitutionRuleTextInput) {CODE
LOWsrc/tools/precedent-evidence.ts132export async function validatePrecedentSearchResult(CODE
LOWsrc/tools/precedent-search-core.ts262export async function searchPrecedentsStructured(CODE
LOWsrc/tools/compact-query-planner.ts167function normalizeOriginalPrecedentQuery(query: string): string {CODE
LOWsrc/tools/compact-query-planner.ts219function extractedOriginalKeywords(originalQuery: string): string[] {CODE
LOWsrc/tools/compact-query-planner.ts375function scoreAiLawArticleCandidate(CODE
LOWsrc/tools/compact-query-planner.ts535function addOriginalQueryCandidate(CODE
LOWsrc/tools/compact-query-planner.ts563function addOriginalKeywordCandidates(CODE
LOWsrc/tools/compact-query-planner.ts668function addDocumentHintCandidates(CODE
LOWsrc/tools/compact-query-planner.ts691function addStructuredAiLawArticleCandidates(CODE
LOWsrc/tools/special-admin-appeals.ts132export async function searchAppealReviewDecisions(apiClient: LawApiClient, args: SearchAppealReviewDecisionsInput) {CODE
LOWsrc/tools/special-admin-appeals.ts139export async function getAppealReviewDecisionText(apiClient: LawApiClient, args: GetAppealReviewDecisionTextInput) {CODE
LOWsrc/tools/chains.ts85function emptyStructuredPrecedentResult(args: SearchPrecedentsInput): StructuredPrecedentSearchResult {CODE
LOWsrc/tools/chains.ts104async function safeSearchPrecedentsStructured(CODE
LOWsrc/tools/chains.ts167export function shouldFetchAnnexSeparately(CODE
LOWsrc/tools/chains.ts304function combineStructuredPrecedentResults(CODE
LOWsrc/tools/customs-interpretations.ts30export async function searchCustomsInterpretations(CODE
LOWsrc/tools/customs-interpretations.ts126export async function getCustomsInterpretationText(CODE
LOWsrc/server/http-config.ts28function parseRemoteUnauthenticatedOverride(raw: string | undefined): boolean {CODE
LOWsrc/lib/citation-content-matcher.ts105function longestCommonSubstringLen(a: string, b: string): number {CODE
LOWsrc/lib/external-https-proxy.ts29export function getExternalHttpsProxyConfig(): ExternalHttpsProxyConfig | null {CODE
LOWsrc/lib/historical-utils.ts80export async function fetchHistoricalVersionsFull(CODE
LOWsrc/lib/historical-utils.ts212export async function fetchHistoricalVersionsRaw(CODE
LOWsrc/lib/three-tier-parser.ts39function stripLeadingJoHeaderFromContent(content: string): string {CODE
LOWsrc/lib/abolished-laws.ts208async function buildAbolishedAdminRuleNote(CODE
Verbosity Indicators19 hits · 34 pts
SeverityFileLineSnippetContext
LOWsrc/setup.ts267 // Step 1: API 키COMMENT
LOWsrc/setup.ts280 // Step 2: 클라이언트 선택COMMENT
LOWsrc/setup.ts309 // Step 3: 설정 파일 업데이트COMMENT
LOWsrc/tools/chains.ts681 // Step 1: 신구대조표COMMENT
LOWsrc/tools/chains.ts685 // Step 2: 조문별 개정 이력 (lawId 필요)COMMENT
LOWsrc/tools/chains.ts742 // Step 2: 조례 검색 — "조례"/"규칙" 제거 (이미 조례 DB에서 검색하므로)COMMENT
LOWsrc/tools/chains.ts747 // Step 3: 상위 1건 전문 자동 조회COMMENT
LOWsrc/tools/chains.ts921 // Step 1: 법령 검색COMMENT
LOWsrc/tools/chains.ts929 // Step 2: 3단 비교 (절차 체계 파악)COMMENT
LOWsrc/tools/chains.ts933 // Step 3: 별표(수수료/과태료) + 서식(신청서) 병렬COMMENT
LOWsrc/tools/chains.ts729 // Step 1: 상위 법령 확인 (조례/지역명은 법령 검색에서 제거)COMMENT
LOWsrc/tools/chains.ts804 // Step 1: AI 검색 + 법령 검색 + 해석례를 병렬 실행하고, 판례는 AI 구조화 신호를 받은 뒤 공통 core로 검색한다.COMMENT
LOWsrc/tools/chains.ts955 // Step 4: AI 검색으로 보완 (절차 상세)COMMENT
LOWsrc/tools/chains.ts992 // Step 1: analyze_document 로 리스크 분석COMMENT
LOWsrc/tools/chains.ts1004 // Step 2: 분석 결과에서 searchHints 추출 → 병렬로 법령+판례 검색COMMENT
LOWsrc/tools/scenarios/time-travel.ts90 // Step 1: 연혁 목록 → 두 시점 MST 결정 (페이징으로 전체 회수)COMMENT
LOWsrc/tools/scenarios/time-travel.ts147 // Step 2: 두 시점 본문 raw 조회COMMENT
LOWsrc/tools/scenarios/time-travel.ts175 // Step 3: diffCOMMENT
LOWsrc/tools/scenarios/time-travel.ts178 // Step 4: 출력COMMENT
Magic Placeholder Names6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHREADME-EN.md324 "LAW_OC": "your-api-key"CODE
HIGHREADME-EN.md353 "https://korean-law-mcp.fly.dev/mcp?oc=your-api-key"CODE
HIGHREADME-EN.md366 "url": "https://korean-law-mcp.fly.dev/mcp?oc=your-api-key"CODE
HIGHREADME-EN.md390export LAW_OC=your-api-keyCODE
HIGHREADME-EN.md404docker run -e LAW_OC=your-api-key -e MCP_HTTP_HOST=0.0.0.0 \CODE
HIGHdocs/DEVELOPMENT.md22LAW_OC=your-api-key node build/index.jsCODE
Modern AI Meta-Vocabulary3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMdocs/FTC-RAG-INTEGRATION.md1# 공정위 결정문 — 로컬 LLM RAG 결합 가이드COMMENT
MEDIUMdocs/FTC-RAG-INTEGRATION.md9### 경로 A: 구조화 텍스트 (`get_decision_text`) ← RAG 메인COMMENT
MEDIUMdocs/FTC-RAG-INTEGRATION.md81## 3. RAG 인덱싱 — 청킹 전략COMMENT
Over-Commented Block2 hits · 2 pts
SeverityFileLineSnippetContext
LOWsrc/tools/law-system-tree.ts21 if (!args.lawId && !args.mst && !args.lawName) {COMMENT
LOWsrc/lib/route-patterns.ts181 // "XX법 별표", "XX령 서식" 등 법령명이 함께 있는 경우만 매칭.COMMENT