china-law-mcpBLOCK
⚖️ 中国法律条文 MCP 服务器 | 378 部法律 · 23,995 条现行法条检索 + 引用核验(防幻觉)| 免费、免注册、免 API key、本地运行 | Chinese statute retrieval + citation verification for LLMs
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
中国法律条文 MCP 服务器 · 让 AI 引用法条不再编造
免费 · 免注册 · 免 API key · 本地运行
[](LICENSE) [](https://github.com/thu-lawyer/china-law-mcp/actions/workflows/ci.yml) [](https://python.org) [](https://pypi.org/project/china-law-mcp/) [](https://pypi.org/project/china-law-mcp/) [](https://modelcontextprotocol.io) [](https://registry.modelcontextprotocol.io/v0/servers?search=china-law-mcp) [](https://glama.ai/mcp/servers/thu-lawyer/china-law-mcp) [](https://github.com/thu-lawyer/china-law-mcp/pkgs/container/china-law-mcp) [](#数据) [](#数据)
English · 中文
解决什么问题
直接问大模型中国法律问题,有两个后果:引用的条文可能根本不存在或已废止,你无法核实。法律是最不能容忍编造的领域。
china-law-mcp 给 AI 装上一个离线法条库 + 引用核验器:
- 模型要引用《民法典》第 1254 条?先调
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-mc
d2f6b6b66d4eOBSERVED · 2026-10-11Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add china-law-mcp -- uvx china-law-mcp==0.1.1
claude mcp add china-law-mcp:0.1.1 -- docker run -i --rm ghcr.io/thu-lawyer/china-law-mcp:0.1.1:None
Exposed tools (5)
5 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
check_citations_in_text | read | 抽取一段文本中的所有《法律》第 N 条引用并逐条核验,返回不存在的引用清单。 |
get_article | read | 按法律名与条号取条文原文。 |
list_laws | read | 浏览库内法律目录(可按名称关键词或部门法筛选)。 |
search_statutes | read | 按自然语言问题检索中国现行法律条文。 |
verify_citation | read | 核验一条法律引用是否真实存在(防幻觉)。 |
Trust audit
BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- declared (1 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (5)
idx = pickle.load(f)
pytest
mcp, jieba, rank-bm25
data/laws.db
src/china_law_mcp/data/laws.db
Gates applied: no_behavioural_pass.
d2f6b6b66d4efull audit observations/trust-audit/mcp-server/thu-lawyer__china-law-mcp.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-11 | d2f6b6b66d4e | BLOCK | D | 69 | first audit |
Questions
What is the china-law-mcp MCP server?
⚖️ 中国法律条文 MCP 服务器 | 378 部法律 · 23,995 条现行法条检索 + 引用核验(防幻觉)| 免费、免注册、免 API key、本地运行 | Chinese statute retrieval + citation verification for LLMs
What tools does china-law-mcp expose?
5 in total: 5 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is china-law-mcp safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (69/100) and found 1 critical or high issue in the source. Each one is listed on this page with the file and line it is on.
What credentials does china-law-mcp need?
It reads CHINA_LAW_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does china-law-mcp run?
It speaks stdio, so it runs as a local process your client starts. It is published on PyPI as china-law-mcp.
How current is this page?
The grade is for one exact copy of the source (d2f6b6b66d4e), read on 2026-10-11. The repository is watched and re-audited when it changes.