LexGuard MCP

A self-hosted MCP server for Korean law: 18 tools for statute articles, case law and contract review.

  • 132 ★ on the repository
  • Last commit
MCP server

Minimal access

Why this level

  • The server reads open data, but with auto-search contract fragments are sent to the law database API.
All reasons and checks

seonaru/lexguard-mcp

Install

Manual install

git clone https://github.com/SeoNaRu/lexguard-mcp

Then `cp .env.example .env`, the key in `LAW_API_KEY` and `docker compose up --build`.

Access and checks

How we review

Minimal accessThe tool runs nothing and makes no network calls.

  • The server reads open data, but with auto-search contract fragments are sent to the law database API.

This is third-party code. Review the repository files before installing.

What it does

LexGuard MCP takes open data from Korea's National Law Information Center (open.law.go.kr). Eighteen tools search statutes, articles, precedents, administrative interpretations and decisions of administrative committees and the Constitutional Court. `legal_qa_tool` answers a question across several sources at once, `law_article_tool` fetches an article by law name and number, `law_comparison_tool` compares versions, and `document_issue_tool` reviews a pasted contract clause by clause. The server runs on your own machine through Docker or `python -m src.main` and listens at `http://localhost:9099/mcp`. The project has no hosting: you need your own API key.

Who it is for. Builders of legal services and lawyers working with Korean law who query an agent about statutes and case law.

Good fit when

  • An exact article of a Korean law is needed by name and number.
  • Precedents from the last three years are gathered for a question.
  • A Korean contract or terms of service are reviewed clause by clause.
  • Versions of a statute are compared before and after a change.

Not a fit when

  • Law of another country is needed.
  • Legal advice is required rather than reference information.
  • Registering your own IP address for the API key is not possible.

Example request

Find precedents from the last three years on recognizing a freelancer as an employee and show article 2 of the Labor Standards Act.

MCP

Transport
http
Authentication
API key

Environment variables

LAW_API_KEY required, secret
API key of the Korean open law database (open.law.go.kr).
LEXGUARD_MCP_RATE_LIMIT
Request limit per minute per IP, 600 by default.

Limitations

Data and answers are in Korean, and the law of other countries is not covered. A free API key with your IP address registered at open.law.go.kr is required. The README itself states that the server provides reference information and does not replace legal advice. The license is not determined in the repository metadata. The server is self-hosted: you run it yourself through Docker or Python 3.11 or newer, and the project offers no hosted version.

How to disable. Stop the container with `docker compose down` or the Python process and remove the `lexguard` entry from `.cursor/mcp.json` or `claude_desktop_config.json`. Revoke the API key at open.law.go.kr if needed.

FAQ

Where do I get the API key?

For free at open.law.go.kr. Your IP address must be given in the application, otherwise requests to the law database will fail.

How do I connect it to Cursor?

Take `examples/cursor-mcp.local.json` and merge it into `.cursor/mcp.json`. For Claude Desktop there is `examples/claude-desktop-mcp.local.json`, which needs Node.js.

Does the server recognize case numbers?

Yes, numbers like `2023다12345` and `2021헌마123` are detected automatically and a precedent search runs.

Is there a request rate limit?

By default 600 requests per minute per IP. Change it with the `LEXGUARD_MCP_RATE_LIMIT` variable.

Which legal domains are detected?

Ten, among them labor, personal data, real estate, consumer rights, taxes and finance. The domain is detected automatically from the question text.

Discussion

No questions or reviews yet.

An MCP server for Korea's official legal database: search statutes, case law and ordinances, and verify article citations against fabrications

MCP serverExtended access2.8KRepository stars
Russian stack

An MCP server with a database of Russian federal laws and codes: full-text article search, citation checks and currency checks

MCP serverExtended access9Repository stars
Russian stack

An MCP server searching Russian court rulings by text, statute, court and date, returning the full case text, like sudact.ru

MCP serverExtended access2Repository stars
Russian stack

An MCP server that pulls statute text, the edition in force on a date, and court practice from Garant via your subscription

MCP serverExtended access1Repository stars

A free MCP server for Taiwan law: the agent finds court judgments and statute articles and cites them with checkable links

MCP serverExtended access342Repository stars

A local document base for your agent: hybrid semantic and keyword search plus a web UI for browsing and uploads

MCP serverExtended access344Repository stars

README in short

The README has a five-minute quick start, 18 tools with input schemas and sample prompts, classification of a question into ten legal domains and a result reranking pipeline.

README badge

Report a problem

Foxx AILexGuard MCP
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.