Search 23,995 Chinese statutes and verify citations to catch LLM-fabricated references.
MCPpedia last refreshed this data
io.github.thu-lawyer/china-law-mcp is an MCP server that search 23,995 Chinese statutes and verify citations to catch LLM-fabricated references. Its tool list has not been published yet over stdio and http, requires no API key, and scores 59/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"china-law": {
"args": [
"run",
"-i",
"--rm",
"ghcr.io/thu-lawyer/china-law-mcp:latest"
],
"command": "docker"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Search 23,995 Chinese statutes and verify citations to catch LLM-fabricated references.
Run this in your terminal to verify the server starts. Then let us know if it worked - your result helps other developers.
uvx 'china-law-mcp' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
Checked china-law-mcp against OSV.dev.
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in legal
Korean law: statutes, precedents, ordinances, treaties and citation verification (법제처 API).
Kentucky Revised Statutes (KRS) — state statutes by citation and by topic.
North Dakota Century Code — state statutes by citation and by topic. Fleet #2743.
Oklahoma Statutes — state statutes by citation, full-text topic search, amendment history, and…
MCP Security Weekly
Get CVE alerts and security updates for io.github.thu-lawyer/china-law-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
直接问大模型中国法律问题,有两个后果:引用的条文可能根本不存在或已废止,你无法核实。法律是最不能容忍编造的领域。
china-law-mcp 给 AI 装上一个离线法条库 + 引用核验器:
verify_citation 查一下,不存在就换掉check_citations_in_text 会把里面所有《某法》第 N 条抽出来逐条核验,列出编造的引用search_statutes 用自然语言检索(支持「同事借我钱不还」这种口语)数据在本地,不联网、不注册、不需要 API key。
方式一:一行命令(推荐)
uvx china-law-mcp
方式二:pip 安装
pip install china-law-mcp
china-law-mcp
方式三:克隆运行
git clone https://github.com/thu-lawyer/china-law-mcp
cd china-law-mcp
pip install -r requirements.txt
python -m china_law_mcp # 首次运行自动构建 BM25 索引,约 6 秒
方式四:Docker(镜像已发布到 ghcr.io)
docker run -i --rm ghcr.io/thu-lawyer/china-law-mcp:latest
{
"mcpServers": {
"china-law": {
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/thu-lawyer/china-law-mcp:latest"]
}
}
}
标准 stdio 服务器,任何 MCP 客户端都能接。先确定 uvx 在 PATH 里(uv 随附)。
| 客户端 | 接入方式 |
|---|---|
| Claude Code | 一条命令:claude mcp add china-law -- uvx china-law-mcp |
| Claude Desktop | 编辑 claude_desktop_config.json(macOS:~/Library/Application Support/Claude/;Windows:%APPDATA%\Claude\),粘入下面的 JSON 后重启 |
| Cursor | 项目级 .cursor/mcp.json 或全局 ~/.cursor/mcp.json,粘入下面的 JSON |
| VS Code(Copilot Chat) | .vscode/mcp.json,注意顶层键是 servers 而不是 mcpServers |
| 国内客户端(Cherry Studio、ChatWise、LobeChat、DeepChat 等) | 在各自的 MCP 设置页粘贴同一段 JSON |
把 uvx 换成 Docker 也可以,见上一节。
{
"mcpServers": {
"china-law": {
"command": "uvx",
"args": ["china-law-mcp"]
}
}
}
| 工具 | 作用 |
|---|---|
search_statutes(query, top_k, law?) | 自然语言问题 → 相关法条(口语自动扩展为法言法语) |
get_article(law, article_no) | 法律 + 条号 → 条文原文,支持「民法典」「1254」「第一千二百五十四条」 |
list_laws(keyword?, department?) | 浏览库内法律目录 |
verify_citation(law, article_no) | 核验单条引用是否真实存在 |
check_citations_in_text(text) | 抽取文本中全部引用并逐条核验,列出编造的 |
下图为真实工具调用返回结果的渲染(终端样式,非截图):

自然语言检索(口语直接问):
search_statutes("同事借我钱不还怎么办")
→ 中华人民共和国民法典 第六百七十五条 借款人应当按照约定的期限返还借款…
→ 中华人民共和国民法典 第六百七十四条 借款人应当按照约定的期限支付利息…
sear
... [View full README on GitHub](https://github.com/thu-lawyer/china-law-mcp#readme)