regs-knowledge
车企法规智能 MCP 中台(regs-mcp)
把国内外汽车法规标准变成可检索、可对比、可追溯、可带出处问答、可被企业系统调用的智能能力,以 MCP 服务的形式提供。
特性
法规/条款智能处理核:检索、带出处问答、对比(规划中)。
强制出处:任何合规结论都必须携带标准号、条款号与原文摘录;无出处的结论自动降级为
unknown并标记需人工复核。统一协议:MCP 2026-07-28 + Streamable HTTP,Java 中台与飞书均可作为 MCP 客户端直接调用,无需为各方单独适配。
法规对比:国内外法规对比、现行标准与征求意见稿对比,并支持导出可编辑 Excel(规划中)。
Related MCP server: spec-assistant
架构
src/regs_mcp/
├── core/ 领域模型与引用强制规则(不依赖 MCP/LLM/DB)
├── retrieval/ 数据持久化与混合检索(SQLite + 纯 Python 打分,零外部依赖)
├── llm/ OpenAI 兼容 LLM 客户端 + 离线 mock 兜底
├── qa/ 问答管线(检索→草稿→引用校验→结构化)
├── ingest/ 种子数据加载
├── mcp/ MCP 适配层(regs-knowledge 智能核)
├── feishu/ 飞书适配器(规划)
└── eval/ 评测集 + 指标架构原则
依赖倒置(DIP):领域/应用层只定义端口,检索、LLM、导出等能力由 infra 层以可替换实现注入,切换开源组件或自研实现不影响核心逻辑。
标准协议优先:MCP 2026-07-28 + Streamable HTTP,调用方无需单独适配。
可拓展:工具按"每 server ≤ 8 tool"拆分;检索器、模型、导出格式以策略/插件形式注册,新增数据源或导出格式不改核心。
务实用开源:解析(MinerU/Docling)、向量库、飞书 SDK 等均可接入,协议层只依赖官方 MCP SDK,避免被单一产品绑定。
运行
cd vehicle-regs-mcp
python -m venv .venv && . .venv/Scripts/activate
pip install -e ".[dev]"
# 灌入种子数据
PYTHONPATH=src python -c "from regs_mcp.ingest.loader import load_seed; \
from regs_mcp.retrieval.store import RegulationStore; \
s=RegulationStore('data/regs.db'); print(load_seed(s, 'data/seed'))"
# 评测(离线可跑,无需任何 API key)
PYTHONPATH=src python -m regs_mcp.eval.run
# 测试
pytest
# 启动 MCP 服务(Streamable HTTP)
PYTHONPATH=src python -m regs_mcp.mcp.server接入大模型(可选)
默认走离线 mock(抽取式合成),保证随处可演示。接入本地或云端大模型:
export REGS_LLM_BASE_URL=http://<endpoint>/v1
export REGS_LLM_API_KEY=<token>
export REGS_LLM_MODEL=<model>
export REGS_LLM_MOCK=0评测
20 道真实业务题:引用覆盖率 100%,条款定位准确率 95%。
路线图
M1(已完成):regs-knowledge 智能核(检索 + 带出处问答 + 评测集)。
M2:regs-graph(按零件/功能反查、冲击分析)+ compare(国内外对比、现行 vs 征求意见稿、Excel 导出)。
M3:regs-jobs(解析入库)+ 飞书机器人适配器(事件订阅 → 调 MCP → 富文本卡片)。
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
One governed MCP endpoint for 40+ business systems. Read-only, source-cited answers.
Page-cited retrieval for embedded docs, datasheets, MISRA, CMSIS, and RTOS references.
Deterministic European sovereign engine with 90 tools across 20 vertical suites for AI agents: EU Tax/KYB, FatturaPA/Peppol, AI Act, GDPR, DORA, NIS2, Italian Tenders (D.Lgs 36/2023), CBAM, EUDR, and Labour Law. Zero-Data-Retention with verifiable SHA-256 PDF/A audit certificates.
Live EU AI Act record from 22 official sources: EUR-Lex, AI Office, AI Board, CEN-CENELEC and national regulators (BNetzA, CNIL, AESIA, Dutch AP and more). Ask for obligations by role and risk class, look up an article, or get a digest of what changed since a date. Every answer links the primary source. Works without a key.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables querying US compliance regulations including HIPAA, CCPA, SOX, and more directly from AI assistants and MCP-compatible clients.Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables natural language queries on technical specifications and automated code compliance checks using local RAG with vector search, integrated via MCP.-
- AlicenseNot gradedqualityDmaintenanceEnables document-based Q&A with multi-modal RAG, hybrid retrieval, knowledge graph reasoning, and multi-agent orchestration via MCP tools.4MIT
- FlicenseNot gradedqualityDmaintenanceEnables querying company knowledge base using RAG, providing accurate answers from internal documents via MCP.-