China-Central-Policy-MCP
Use this MCP server to search Chinese central/State Council policies and retrieve normalized full text.
Search policies by keyword and optional start/end dates, returning up to 100 results.
Fetch a gov.cn policy page by URL or policy_id and normalize it into structured JSON with title, date, document number, issuer, and body.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@China-Central-Policy-MCP search for policies about artificial intelligence from June 2025"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
中国中央政策 MCP
输入主题、文号或原件 URL,查询中央政策、读取全文并定位可引用的原文段落。 从中国政府网官方栏目和检索接口取数,生成带文件清单、原文和引用卡的 Markdown + JSON 材料,不需要 Token 或模型密钥。
English · 真实运行输出 · 库库 Skill 接入
5 分钟启动
推荐 Node.js 22 LTS 或更新版本,最低 20.18.1。
git clone https://github.com/guangxiangdebizi/China-Central-Policy-MCP.git
cd China-Central-Policy-MCP
npm ci
npm run build
npm start默认使用 stdio。启动后等待 MCP 客户端输入,不向 stdout 写日志。
stdio 客户端配置
将配置中的 /path/to/China-Central-Policy-MCP 替换为安装目录的绝对路径;下方 HTTP 配置和示例 JSON 使用相同占位。
{
"mcpServers": {
"central-policy": {
"command": "node",
"args": ["/path/to/China-Central-Policy-MCP/build/index.js"],
"env": {
"MCP_TRANSPORT": "stdio",
"OUTPUT_DIR": "/path/to/China-Central-Policy-MCP/output"
}
}
}
}Streamable HTTP
$env:MCP_TRANSPORT="http"
$env:HOST="127.0.0.1"
$env:PORT="3100"
$env:OUTPUT_DIR="/path/to/China-Central-Policy-MCP/output"
$env:PUBLIC_BASE_URL="http://127.0.0.1:3100"
npm start{
"mcpServers": {
"central-policy": {
"type": "http",
"url": "http://127.0.0.1:3100/mcp"
}
}
}不需要 supergateway。/mcp 使用 SDK 原生无状态 HTTP handler,兼容 2025 版客户端。HTTP 网关的鉴权、TLS 和额度由平台配置。
Related MCP server: chuance-policy-mcp
三个真实输出
以下输出于 2026-11-23 通过真实 MCP Client 在线生成,可用 npm run examples 刷新完整样例。
1. 最新 5 条政策
用户输入:“列出最新 5 条中央政策,给出机关、文号和发布日期。”
{"tool":"search_policies","arguments":{"limit":5}}实际返回 5 条,不传日期窗。逐篇调用 get_policy_fulltext 读取信息表,前三条如下;信息表未提供的字段保留空值。
标题及官方链接 | 发文机关 | 文号 | 发布日期 |
未提供 | 未提供 | 2026-11-15 | |
国务院 | 国令第848号 | 2026-11-10 | |
国务院 | 国令第850号 | 2026-11-09 |
目录搜索返回 partial 和续查游标,表示还有后续条目;这 5 条已成功返回。全部 5 条及原件信息
2. 按文号读全文
用户输入:“查国办发〔2025〕25号,读全文,定位稳岗返还的条件和期限。”
{"tool":"search_policies","arguments":{"query":"国办发〔2025〕25号","mode":"doc_no","limit":3}}从返回的 url 调用 get_policy_fulltext,可传 focus: "稳岗返还",或不传以分页读取全文。
国务院办公厅关于进一步加大稳就业政策支持力度的通知
发文机关:国务院办公厅|国办发〔2025〕25号
成文:2025-07-03|发布:2025-07-09
全文 34 段。
p0008的原文同时保留基金备付期限条件、90%/50%比例和“政策执行期限至2025年12月底”。
3. 生成人工智能近 30 天简报
用户输入:“整理人工智能近 30 天的政策材料,保留原文和出处。”
{"tool":"policy_brief","arguments":{"kind":"weekly","query":"人工智能","from":"2026-10-25","to":"2026-11-23","limit":5}}一次调用选取并读取 5 篇、失败 0 篇,status=ok,coverage.selection_complete=true。材料包括:
广电总局、民政部老年人广电视听公共文化服务通知,发布 2026-11-17。
2026 年世界互联网大会乌镇峰会主旨演讲的公报原件,发布 2026-11-20。
商务部等 9 部门再生资源回收体系建设意见,发布 2026-11-17。
每篇包含信息表;匹配“人工智能”的完整原段附引用卡,未命中原词的文件标明“本次未定位”。输出为 Markdown 与 JSON 文件,服务端不撰写总结。阅读简报 · 机器可读结果
工具
工具 | 使用场景 | 关键参数 |
| 查主题、文号、最新目录 |
|
| 读全文、定位段落和引用 |
|
| 找页面相关解读、图解 |
|
| 周报、课堂卡、备考卡、原文对照 |
|
| 方案中的兼容名称 | 与 |
| 旧客户端兼容 |
|
doc_no 模式规范空白和括号后等值匹配。日期为北京时间的发布日期闭区间,成文日期单列为 issued_on。无 query 时只读最新栏目,catalog 必须是 all。
全文以信息表和 #UCAP-CONTENT 为准,不从全页猜机关。段号在同一 body_hash 内稳定;引用卡包含机关、题名、文号、发布日期、URL、原段及哈希。max_chars 是完整段落分页预算,单个超长段会完整返回并提示。附件仅返回链接。
简报最多读 5 篇,45 秒网络总时限;内部检索最多扫描 12 页、用时最多 25 秒,正文并发读取且每主机并发不超过 2。每篇最多选 3 个匹配焦点原词的完整段落。找不到则写“本次未定位”,不生成要点。课堂和备考模板只生成信息表问答和原文问答。compare 需正好两篇不同文件并指定 focus;Markdown 使用纵向分栏,不依赖宽表。
返回与续查
所有工具声明 outputSchema,并返回 structuredContent:
{
"status": "ok",
"data": {"items": [], "returned": 0},
"warnings": [],
"fetched_at": "2026-11-23T08:00:00.000Z"
}上例仅展示外层结构,实际 data 按工具 schema 返回完整字段。ok 表示本次范围内成功;partial 表示有续页、覆盖不足或部分正文失败;error 配合 isError=true 和 error:{code,message,retryable,hint}。错误包括 INVALID_INPUT、UNSUPPORTED_URL、RATE_LIMITED、UPSTREAM_TIMEOUT、SOURCE_CHANGED、BODY_UNAVAILABLE、CURSOR_EXPIRED、UPSTREAM_HTTP、UPSTREAM_NETWORK、RESPONSE_TOO_LARGE。读不到任何已选正文时,简报返回错误。
搜索和全文使用 next_cursor,翻页保留原参数。游标为有界内存快照,10 分钟有效,绑定查询或正文哈希。重启或换实例后重查;多副本使用网关黏性路由。搜索每次最多读 3 个上游页,每页每栏 10 条,累计最多 30 页,按各栏排名轮取并去重;不把 ptime 当发布日期。简报的 coverage.search_next_cursor 可交给同参数的 search_policies 继续查找。
简报按 limit 限定选取范围:达到篇数上限,或检索已完整结束时,selection_complete=true;选中文件全部读取成功即为 ok。未完成选取或部分正文失败仍为 partial。搜索是否还有更多结果单列在 coverage.search 和 search_next_cursor,不将篇数受限的简报标为主题全集。
旧两个工具的首个 text 块保留 JSON 及旧字段;第二块为人类可读摘要。旧 date 明确表示发布日期。
库库平台部署
SDK:稳定 v2 拆包 @modelcontextprotocol/server@2.4.0、@modelcontextprotocol/node@2.1.2,测试客户端 @modelcontextprotocol/client@2.4.0;依赖由锁文件固定。
环境变量 | 默认值 | 用途 |
|
|
|
|
| 容器服务可设为 |
|
| HTTP 端口 |
|
| 可写产物目录,推荐绝对路径 |
| 未设置 | 平台可访问的服务根 URL,设置后返回下载链接 |
产物返回 path、downloadUrl(未配置时 null)、bytes、sha256。HTTP 提供 GET /files/<随机UUID>/policy-brief.md 和 .json;平台应在网关统一控制下载权限,并按需清理产物目录。服务不存用户身份、不申请密钥、不调用大模型。仅代抓 www.gov.cn、sousuo.www.gov.cn,站外原件只展示链接。
网络层设 6 秒单请求超时、4 MiB 上限、每主机并发 2、每秒至多 2 次请求;网络错误、429 和 5xx 最多重试一次并遵循 Retry-After。查询缓存 10 分钟、正文缓存 6 小时,各至多 256 项,同键并发合并,不缓存失败。
验证
npm test
npm run examples测试使用真实 SDK Client,分别启动 stdio 和 HTTP 服务,在线对照栏目前三条、检索两页、精查文号、核对两种正文模板、拼接分页、回查引用、生成文件并读回、下载后校验 SHA-256。有限的网络故障分支使用可注入 Fetch 测试,不依赖官方站点故障。
局限
最新栏目和官方检索索引各有覆盖范围,结果不代表全国政策全集。
公报再刊与原件只在文号、机关和规范题名都一致时合并;缺失值保留 null。
附件专载、站外部门页面及未知正文模板不自动解析,失败项保留原因。
工具保留文件当时的规定,不判断今天的申报资格或政策效力。
许可证
代码沿用 Apache-2.0;政策原文的权利和使用条件归原来源。平台封装不改变代码许可证。作者:Xingyu Chen(GitHub)。
Available Tools
2 toolsget_latest_policiesA
Search State Council policies using gov.cn official search API with keyword search and date filtering.
Inputs: startdate, enddate, limit, keyword.
get_policy_fulltextA
Fetch policy full text and normalize into structured JSON (title, date, doc_no, body, issuer). Optimized for gov.cn pages.
Inputs: url (required), policy_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: get_latest_policies searches and filters policies, while get_policy_fulltext retrieves the full text and normalizes it. There is no overlap.
Both tools follow a consistent verb_noun pattern (get_latest_policies, get_policy_fulltext), using 'get' as the verb and descriptive nouns.
With only 2 tools, the server is minimal but well-scoped for a focused domain (search and retrieve policy full texts). It could benefit from additional tools like browsing by category, but the current count is reasonable.
The core workflow of searching for policies and retrieving their full text is covered. Minor gaps exist, such as the absence of a tool to list policies without keyword search or direct ID lookup, but overall it is sufficiently complete for its stated purpose.
Maintenance
Related MCP Connectors
Structured Chinese official data for AI agents: 426 entries, JSON-LD, read-only. find/get/list
china-tax-policy — China State Taxation Administration policy library (国家税务总局政策法规库): tax laws…
Search public tenders in China, inspect buyers, and estimate bid win probability.
Official EUR-Lex, UK, US, and gazette search, metadata fetch, and change-only watches.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceProvides tools to query and retrieve China's national pollution permit public data, including license details, copies, emission points, post-permit compliance status, and policy regulations.-
- AlicenseAqualityDmaintenanceEnables real-time retrieval of authoritative Chinese government policies and verification of law article citations (《法名》第X条) via public sources, with no API key required.6MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to search mainland China's national laws, administrative and local regulations, judicial interpretations, and Supreme People's Court guiding cases, and to retrieve metadata plus the original Chinese text of individual articles or full regulations and case narratives. Results carry issuing body, promulgation and effective dates, and in-force status, with keyless access and no fabricated snippets when a document can't be read.61 npmMIT
- AlicenseAqualityBmaintenanceEnables AI agents to search live Chinese government tender, procurement and award announcements from the national public resource trading platform by keyword, province, time window and category. Also exposes province names and division codes so queries can be scoped regionally.2MIT