← all repositories
chrisryugj/korean-law-mcp

When your AI lawyer invents Korean statutes

An MCP server that turns South Korea’s official legal databases into LLM tools, with a built-in lie detector for fake citations.

2.3k stars TypeScript Coding AssistantsRAG · Search
korean-law-mcp
Velocity · 7d
+7.4
★ / day
Trend
steady
star history

What it does

Wraps 42 APIs from the Korean Ministry of Government Legislation into an MCP server and CLI. It lets AI assistants query statutes, precedents, ordinances, and treaties in natural Korean, then cross-checks any citations against the live official database to catch fabrications.

The interesting bit

The standout is verify_citations: it catches LLM hallucinations like “Criminal Code Article 9999” in real time by validating every clause against the government API. The README itself warns not to blindly trust ChatGPT or Claude’s legal answers.

Key highlights

  • impact_map traces how a single statute clause ripples through Supreme Court precedents, Constitutional Court rulings, and local ordinances, outputting Mermaid graphs.
  • time_travel diffs legal text between any two historical dates, flagging additions, deletions, and changes at the article level.
  • action_plan turns plain-spoken complaints (“I didn’t get my deposit back”) into five-step legal roadmaps with deadlines, forms, and pitfalls.
  • Bundles extensive resilience logic: automatic retries for empty/HTML responses, User-Agent spoofing to bypass bot detection, and National Tax Service fallback for missing precedent texts.
  • Uses machine-parsable [NOT_FOUND] and [HALLUCINATION_DETECTED] markers to stop LLMs from confabulating when lookups fail.

Caveats

  • The project is tightly coupled to South Korea’s law.go.kr ecosystem; every feature assumes Korean legal terminology and citizenship-level queries.
  • Several recent patches (v3.5.5, v4.0.8, v4.0.9) exist solely to work around brittle upstream API behavior—empty bodies, bot blocks, and mandatory Referer headers—so stability depends on continued whack-a-mole with the government infrastructure.

Verdict

Essential if you’re building Korean legal AI, RAG pipelines, or automated compliance checks. If your jurisdiction isn’t South Korea, this is elaborate glue code for APIs you can’t access.

Frequently asked

What is chrisryugj/korean-law-mcp?
An MCP server that turns South Korea’s official legal databases into LLM tools, with a built-in lie detector for fake citations.
Is korean-law-mcp open source?
Yes — chrisryugj/korean-law-mcp is open source, released under the MIT license.
What language is korean-law-mcp written in?
chrisryugj/korean-law-mcp is primarily written in TypeScript.
How popular is korean-law-mcp?
chrisryugj/korean-law-mcp has 2.3k stars on GitHub and is currently holding steady.
Where can I find korean-law-mcp?
chrisryugj/korean-law-mcp is on GitHub at https://github.com/chrisryugj/korean-law-mcp.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.