Global law
The law of nearly every country on earth, any date: read it, see what changed it, check citations.
Search 23,995 Chinese statutes and verify citations to catch LLM-fabricated references.
Lists are ordered by a usage score (out of 100) built from these parts
| Popularity | 12/80 | GitHub stars or weekly downloads: the larger counts 60, the smaller 20 |
|---|---|---|
| Freshness | 12/12 | Full marks for a release or code change within 30 days |
| Still answering | 0/8 | The cloud endpoint answered at the last check |
| Usage score | 24/100 |
Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)
Pick the AI app you use, then copy the settings.
Let your AI install it with one sentence
Please install China Law MCP. Follow https://mcp.popnx.com/i/thu-lawyer-china-law-mcp.md, show me the commands and wait for my OK before running them.Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads
Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 13, 2026
First: which AI do you use?
Pick your app and the steps appear below.
Works with Claude, with some setup first
Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.
Please install the MCP server China Law MCP for Claude on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "china-law": { "command": "uvx", "args": [ "china-law-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the China Law MCP tools really show up.This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.
Already installed? Check first · Open Terminal, type this command and press Enter
uv --versionMac: press ⌘ + Space, type Terminal, press Enter
Windows: open Start, type Windows PowerShell, then Open
Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required
When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version
Install once; it works for everything that needs uv
SettingsDeveloperEdit Config
{
"mcpServers": {
"china-law": {
"command": "uvx",
"args": [
"china-law-mcp"
]
}
}
}Use China Law MCP and tell me what you can do for me, then show me one thing✓ If Claude says it is using China Law MCP or shows a China Law MCP tool in the answer, you are connected
Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version
ChatGPT cannot connect China Law MCP yet
China Law MCP runs on your computer, but ChatGPT can only connect servers that run on the web
A · Use an app that can connect China Law MCP
B · Others in Law & government data that work with ChatGPT
Picked from the most used in the same category, only ones that connect by address with no key
Works with Claude Code, with some setup first
Install Python (uv) on your computer first (one time)
Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.
Please install the MCP server China Law MCP for Claude Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user china-law -- uvx china-law-mcp 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the China Law MCP tools really show up.This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.
Already installed? Check first · Open Terminal, type this command and press Enter
uv --versionMac: press ⌘ + Space, type Terminal, press Enter
Windows: open Start, type Windows PowerShell, then Open
Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required
When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version
Install once; it works for everything that needs uv
Mac: press Command+Space and type Terminal · Windows: open PowerShell
claude mcp add --scope user china-law -- uvx china-law-mcpYou should see China Law MCP listed as connected
Use China Law MCP and tell me what you can do for me, then show me one thing✓ If Claude Code says it is using China Law MCP or shows a China Law MCP tool in the answer, you are connected
Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Works with Cursor, with some setup first
Install Python (uv) on your computer first (one time)
Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.
Please install the MCP server China Law MCP for Cursor on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "china-law": { "command": "uvx", "args": [ "china-law-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the China Law MCP tools really show up.This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.
Already installed? Check first · Open Terminal, type this command and press Enter
uv --versionMac: press ⌘ + Space, type Terminal, press Enter
Windows: open Start, type Windows PowerShell, then Open
Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required
When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version
Install once; it works for everything that needs uv
Use China Law MCP and tell me what you can do for me, then show me one thing✓ If Cursor says it is using China Law MCP or shows a China Law MCP tool in the answer, you are connected
Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Works with VS Code, with some setup first
Install Python (uv) on your computer first (one time)
Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.
Please install the MCP server China Law MCP for VS Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "china-law": { "type": "stdio", "command": "uvx", "args": [ "china-law-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the China Law MCP tools really show up.This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.
Already installed? Check first · Open Terminal, type this command and press Enter
uv --versionMac: press ⌘ + Space, type Terminal, press Enter
Windows: open Start, type Windows PowerShell, then Open
Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required
When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version
Install once; it works for everything that needs uv
Use China Law MCP and tell me what you can do for me, then show me one thing✓ If VS Code says it is using China Law MCP or shows a China Law MCP tool in the answer, you are connected
Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.
JSON settings are under “For developers” below
Claude Code
claude mcp add --scope user china-law -- uvx china-law-mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"china-law": {
"command": "uvx",
"args": [
"china-law-mcp"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"china-law": {
"command": "uvx",
"args": [
"china-law-mcp"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"china-law": {
"type": "stdio",
"command": "uvx",
"args": [
"china-law-mcp"
]
}
}
}These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.
Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.
Run on your computer in
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
Runs on your computer; the tool list appears in your AI app after you install it.
We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 20, 2026
The registry name was verified with the GitHub account THUboran, which owns the repo
Code last changed 17 days ago
Uses MIT
This one runs on your computer; there is no internet endpoint
Runs on your computer and uses local settings instead
Runs on your computer; we can only read tool lists from internet endpoints
No entries on OSV.dev for china-law-mcp@0.1.1
Checks only this package version, not every dependency · checked Nov 15, 2026
If you made this, paste this code into your README. The badge links back to this page.
[](https://mcp.popnx.com/en/servers/thu-lawyer-china-law-mcp)Ask, share a tip or report that it does not work. Sorted by what people marked helpful.
No posts yet. Be the first to ask or share.
Posts here are written by users, not the PopNx team.
No reviews yet
Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.
It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.
The registry does not list a required key, though some servers ask you to sign in on first use.
It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).
The GitHub repo last changed 17 days ago, and the latest version (0.1.1) reached the registry 2 months ago.
Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv), Docker on your computer.
In the same category: Global law, Open Legal Data (Germany), LibreJustice, InfraNode, Fedlex Connector
Same category, other makers, commands already checked. Official ones first, then by stars.
Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi
The law of nearly every country on earth, any date: read it, see what changed it, check citations.
German court decisions (Rechtsprechung) and laws (Gesetze) with citation graph and citation checks.
Search French-language and European case law and French legal texts (codes, statutes, treaties).
Keyless open data for 84 German cities: 12 lean read-only MCP tools covering 67 data types.
Search Swiss federal legislation: laws, articles, amendments via the Fedlex SPARQL endpoint.
| This one China Law MCP | Global law | Open Legal Data (Germany) | LibreJustice | InfraNode | Fedlex Connector | |
|---|---|---|---|---|---|---|
| Runs where | Installs on your computer | Runs in the cloud, nothing to install | Runs in the cloud, nothing to install | Runs in the cloud, nothing to install | Runs in the cloud, nothing to install | Runs in the cloud, nothing to install |
| Needs a key | No | No | No | No | No | No |
| Add with + in Claude | No | No | No | No | No | No |
| Basic checks | 3/3 | 4/4 | 4/4 | 4/4 | 4/4 | 4/4 |
| License | MIT | NOASSERTION | MIT | Apache-2.0 | Apache-2.0 | MIT |
| Price | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry |
Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.
中国法律条文 MCP 服务器 · 让 AI 引用法条不再编造
免费 · 免注册 · 免 API key · 本地运行
English · 中文
直接问大模型中国法律问题,有两个后果:引用的条文可能根本不存在或已废止,你无法核实。法律是最不能容忍编造的领域。
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("同事借我钱不还怎么办")
→ 中华人民共和国民法典 第六百七十五条 借款人应当按照约定的期限返还借款… → 中华人民共和国民法典 第六百七十四条 借款人应当按照约定的期限支付利息…
search_statutes("外卖吃出异物能退吗") → 中华人民共和国食品安全法 第一百四十八条 消费者因不符合食品安全标准的食品受到损害的, 可以向经营者要求赔偿损失,也可以向生产者要求赔偿…
引用核验(防止 AI 编造):
verify_citation("民法典", "1254") → verified=True (真实存在)
verify_citation("民法典", "9999") → verified=False 中华人民共和国民法典 没有第 9999 条
check_citations_in_text("根据《民法典》第1254条…依据《劳动合同法》第99条和《民法典》第88888条…") → 共 3 条,有效 1,无效 2 → invalid: ['《劳动合同法》第99条', '《民法典》第88888条']
如果你用的 Agent 还不支持 MCP,或者只想在命令行里快速查一条法条,仓库里的 skills/china-law/ 提供了等价能力:
skills/china-law/SKILL.md —— Agent Skill 定义(何时用、怎么用、铁律)skills/china-law/law.py —— 零依赖 CLI,不需要 `mcp` 包,只依赖 china_law_mcp 的检索与数据库模块pip install china-law-mcp
python skills/china-law/law.py search "外卖吃出异物能退吗" python skills/china-law/law.py verify 民法典 1254 python skills/china-law/law.py get 民法典 1254 python skills/china-law/law.py list 劳动 echo "根据《民法典》第1254条,另依据《民法典》第88888条。" | python skills/china-law/law.py check -
python skills/china-law/law.py verify 民法典 1254 --json
把 skills/china-law/ 整个目录放进对应 Agent 的技能目录即可:Claude Code 用户级 ~/.claude/skills/ 或项目级 .claude/skills/;Codex ~/.codex/skills/;Kimi CLI 通过 --skills-dir 指定。
换成你自己的语料:
python scripts/build_corpus.py 你的条文.jsonl # → data/laws.db
字段说明见 scripts/build_corpus.py 头部注释。scripts/ 下另有两个可选工具:make_subset.py(抽取常用法律子集)、encrypt_data.py(把数据库加密为 laws.db.enc,服务器可用 CHINA_LAW_KEY 环境变量自动解密)。
用户提问
↓ search_statutes ← BM25 召回 + 口语同义词/共现规则扩展 + 覆盖率与短语重排 + 条号直查 ↓ 返回条文原文(含出处) ↓ 模型依据条文作答 ↓ check_citations_in_text ← 正则抽取《X法》第N条,逐条查库核验 ↓ 编造的引用被列出并剔除
检索是纯本地 BM25(rank-bm25 + jieba),不调用任何外部 API,因此没有网络依赖、没有调用成本,也不会把你的查询发给第三方。
status_basis 字段)。ghcr.io/thu-lawyer/china-law-mcppip install -r requirements-dev.txt
PYTHONPATH=src pytest tests/ -v # 12 个测试,覆盖检索、直查、引用核验
发布镜像与注册表条目走 tag 触发:
git tag v0.1.2 && git push origin v0.1.2
或在 Actions 里手工触发 Publish image and register 工作流并填入版本号。
MIT。条文数据来自公开渠道整理,请遵守相应来源的使用条款。