Skip to main content
Glama
lttxzmj

chinese-law-mcp

chinese-law-mcp

中国法律法规 MCP 服务器:让 Claude、Cursor 等 AI 助手直接逐条查询 500+ 部现行中国法律、司法解释与行政法规(30,000+ 条,官方来源逐部人工核对)。

MCP server for Chinese statutes: search 500+ Chinese statutes, judicial interpretations and administrative regulations in force and fetch any article verbatim, with citable source links.

工具

Tool

说明

search_laws

按名称搜索法律(如「民法典」「劳动合同」)

get_article

取指定条文原文(如民法典第 577 条),带章节位置、施行日期与可引用链接

search_in_law

在某部法律全文内按关键词检索条文

Related MCP server: fr-eli-mcp

安装

无需安装,npx 直接运行。Claude Desktop / Cursor 等客户端配置:

{
  "mcpServers": {
    "chinese-law": {
      "command": "npx",
      "args": ["-y", "github:lttxzmj/chinese-law-mcp"]
    }
  }
}

数据与合规

  • 数据来自 chinese-law-corpus(CC0),经 jsDelivr CDN 只读拉取,进程内缓存;本服务器无遥测、无写操作。

  • 法律文本依《著作权法》第五条不受著作权保护;本项目为非官方整理,正式引用请以官方公布文本为准,工具输出自带此提示。

  • 每条结果附网页版链接(法脉法律库,27,000+ 页逐条可引用)。

关于

由 法脉 LawPulse 维护——给中国执业律师的本地优先桌面研究工具(离线法律库 + 法条笔记 + 引用可核实的合同审查)。数据随法律季度更新。

MIT License.

Available Tools

3 tools
get_articleB

取某部法律的指定条文原文。返回条文全文、章节位置、施行日期与可引用的网页链接。

NameRequiredDescriptionDefault
lawYes法律名称或 id,如「民法典」或 civil-code
article_numberYes条号(阿拉伯数字),如 577

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the behavioral burden. It does disclose the returned fields (full text, chapter location, effective date, citable link), which is useful, but it says nothing about read-only nature, error behavior when an article is not found, or law-name matching rules.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero waste, front-loaded with the action and followed by what is returned. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter retrieval tool with full schema coverage and no output schema, the description covers purpose and return content adequately. It falls short on sibling routing, error handling, and any edge-case behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%: both parameters already have descriptions and examples (law name/id, article number). The description adds no syntax or format details beyond the schema, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: retrieve the original text of a specified article of a law. It is clearly distinct in kind from search_laws/search_in_law, but it never names or differentiates against those siblings explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no prerequisite, and no mention of the sibling search tools as alternatives. Usage is only inferable from the purpose itself.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_in_lawB

在某部法律的全部条文里按关键词检索,返回命中条文的条号、摘录与链接。

NameRequiredDescriptionDefault
lawYes法律名称或 id
keywordsYes检索关键词,空格分隔多个

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full burden. It usefully discloses the return shape (条号、摘录与链接), which is real added context, but says nothing about result limits, pagination, ranking, or behavior when a keyword misses all articles.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence with zero waste: scope first, then return values. Nothing is repeated from the schema and nothing could be cut without losing information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With only two fully documented parameters, no nested objects, and no output schema, the description covers the essentials, including return fields that the schema does not describe. It stops short of completeness by omitting any note on result limits or empty-result behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both 'law' and 'keywords' are already documented in the schema, including the space-separated multi-keyword convention. The description adds no format or syntax detail beyond what the schema provides, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and scope: keyword search across ALL articles of ONE law ('在某部法律的全部条文里按关键词检索'), plus what it returns (article number, excerpt, link). The singular-law scope implicitly contrasts with the sibling search_laws, but no sibling is named explicitly, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no exclusions, and no reference to the alternatives search_laws (cross-law search) or get_article (single-article retrieval). The agent must infer from the scope wording alone that this is the single-law case.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_lawsB

按名称搜索中国现行有效的法律与司法解释(412 部)。返回法律标题、id 与条数。

NameRequiredDescriptionDefault
queryYes法律名称或关键词,如「民法典」「劳动合同」

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It usefully discloses the corpus scope (currently effective, 412 items) and the returned fields (title, id, article count), which is real value, but says nothing about result limits, pagination, match semantics (exact vs keyword), or ranking.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with zero filler: the capability and its scope come first, the return shape second. Nothing is wasted and nothing needs to be re-read.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter search with 100% schema coverage and no output schema, the description is largely self-sufficient and even compensates for the missing output schema by naming the returned fields. The gaps are result-set behavior (limits/pagination) and match semantics, which an agent would still benefit from knowing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the single query parameter is already documented with two Chinese examples in the schema. The description adds only the high-level notion of searching "by name", without extra syntax, format, or matching detail, so the baseline 3 is warranted.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb+resource ("按名称搜索中国现行有效的法律与司法解释") and scopes it precisely with "现行有效" and a corpus size of 412 items. It implicitly separates itself from siblings get_article (retrieve one article) and search_in_law (search within a law) via "按名称", but never names or contrasts those siblings explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use or when-not-to-use guidance, no prerequisites, and no mention of the sibling tools that are the obvious alternatives for article-level or in-law lookup. Usage is only inferable from the tool name and the phrase "按名称搜索".

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updates
    • First observedget_article
    • First observedsearch_in_law
    • First observedsearch_laws

TDQS

B3.4/5.0

Scored across 3 tools

Disambiguation4/5

search_laws (find a law by name) and search_in_law (keyword search within one law's articles) are superficially similar but the descriptions clearly distinguish scope: one operates over the catalog, the other within a single document. get_article is clearly distinct as a targeted retrieval. Minor risk of misselection only when an agent doesn't read carefully.

Naming Consistency4/5

All three use snake_case verb_noun-ish patterns: search_laws, get_article, search_in_law. The phrasing between search_laws and search_in_law is slightly asymmetric (plural target vs prepositional scope), but the convention is otherwise predictable and readable.

Tool Count3/5

Three tools is on the thin side for a legal research server covering 412 laws; there's little room for browsing, listing, or metadata exploration. It is not extreme, but it feels minimal rather than well-scoped.

Completeness3/5

Core retrieval (find law, get article, keyword-in-law) is covered, but notable gaps exist: no way to list/enumerate laws, browse by chapter or category, filter by effective date/domain, or follow cross-references. Agents needing discovery beyond a name search will hit a dead end.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    MCP server for querying French legislation and case law via the Legifrance API, enabling search and retrieval of laws, codes, and court decisions with verifiable citations.
    8
    44 PyPI
    2
    Apache 2.0
  • F
    license
    Not graded
    quality
    B
    maintenance
    MCP server for Chinese bar exam (法考) preparation with 2,027 past questions, chapter exercises, and spaced repetition. Enables AI agents to search, practice, and review legal exam questions.
    -
  • A
    license
    A
    quality
    A
    maintenance
    A read-only Chinese legal evidence MCP server that provides deterministic retrieval of authentic legal sources with chain-of-custody receipts, designed for Codex, Claude Code, and OpenCode.
    1
    6
    Apache 2.0