Atlas / MCP servers / thu-lawyer / china-law-mcp

china-law-mcpBLOCK

mcp/thu-lawyer/china-law-mcp

⚖️ 中国法律条文 MCP 服务器 | 378 部法律 · 23,995 条现行法条检索 + 引用核验(防幻觉)| 免费、免注册、免 API key、本地运行 | Chinese statute retrieval + citation verification for LLMs

Verdict
BLOCK
Grade
D
Trust score
69 /100
Exposed tools
5 5r · 0w · 0d
Transport
stdio
License
MIT
Stars
2
01

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
Read from source at commit d2f6b6b66d4eOBSERVED · 2026-10-11
02

Connect

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-code (pypi)
claude mcp add china-law-mcp -- uvx china-law-mcp==0.1.1
claude-code (oci)
claude mcp add china-law-mcp:0.1.1 -- docker run -i --rm ghcr.io/thu-lawyer/china-law-mcp:0.1.1:None
03

Exposed tools (5)

5 read · 0 write · 0 destructive.

ToolRiskDescription
check_citations_in_textread抽取一段文本中的所有《法律》第 N 条引用并逐条核验,返回不存在的引用清单。
get_articleread按法律名与条号取条文原文。
list_lawsread浏览库内法律目录(可按名称关键词或部门法筛选)。
search_statutesread按自然语言问题检索中国现行法律条文。
verify_citationread核验一条法律引用是否真实存在(防幻觉)。
04

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.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeFAIL
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (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)

HIGHCode injection · code.deserialize · CWE-78, CWE-94, CWE-95
src/china_law_mcp/retrieval.py:179
idx = pickle.load(f)
Why it matters. deserialises untrusted bytes into live objects
Fix. use json or yaml.safe_load
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
requirements-dev.txt
pytest
Why it matters. 1 requirement(s) not pinned with ==
Fix. pin exact versions
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
requirements.txt
mcp, jieba, rank-bm25
Why it matters. 3 requirement(s) not pinned with ==
Fix. pin exact versions
INFOInventory / provenance · inv.oversize · CWE-1104
data/laws.db
data/laws.db
Why it matters. 15265792 bytes not read
INFOInventory / provenance · inv.oversize · CWE-1104
src/china_law_mcp/data/laws.db
src/china_law_mcp/data/laws.db
Why it matters. 15265792 bytes not read

Gates applied: no_behavioural_pass.

Audited 2026-10-11 · audit v0.4.1 · source sha d2f6b6b66d4efull audit observations/trust-audit/mcp-server/thu-lawyer__china-law-mcp.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-11d2f6b6b66d4eBLOCKD69first audit
06

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.

Advertisement