Contract Risk Review

io.github.justingyang218Published by GitHub account justingyang218v1.0.0Updated Oct 24, 2026

Chinese labor & service contract risk assessment with 25 categories and local law differences.

The publisher's own server: Review Expert

VerifiedSTDIODesktop onlyKnowledge & MemoryBusiness & Commerce

Overview

AI-generated overview

A local MCP server that reviews Chinese labor and service contracts for risk, citing 25 risk categories and regional legal differences.

What you can do
Review a single labor or service contract for risk, with automatic contract-type detection and masking of ID numbers, phone numbers and bank card numbers in the output. Batch-review several contracts at once and produce an overview table. Look up risk-review points and legal basis for a given risk category. Look up regional regulation differences for Beijing, Shanghai, Guangdong, Zhejiang and Jiangsu on topics such as non-compete compensation, overtime pay base, minimum wage, maternity leave and marriage leave. Browse risk-category lists and region lists as resources, and use built-in review and batch-review prompt templates.
When to use it
Useful when you need a first-pass risk check on Chinese employment or labor-service contracts, want clause-level review points and legal references, or need to compare how a topic is treated across the supported provinces and cities. It is a reference aid, not a substitute for a licensed lawyer.
Requirements
Runs as a local process (Python, installed from requirements; also offered as an MCP bundle). Requires LLM_API_KEY, plus LLM_BASE_URL and LLM_MODEL for an OpenAI-compatible endpoint; LLM_TEMPERATURE is optional. Network access to that LLM endpoint is needed. Can run over stdio or as an HTTP service on a local port.
Before you install
Contract text is sent to the configured OpenAI-compatible LLM endpoint, so choose a provider you trust with the content. LLM_API_KEY is a secret and should be supplied through environment configuration, not hard-coded. The server states its output is only a risk reference and does not constitute formal legal advice or replace a practicing lawyer's review.

Installation

In SourceWeft

  1. Open Contract Risk Review in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

劳动&劳务合同风险排查 MCP Server

基于 FastMCP 构建的合同风险审查 MCP 服务,可被任何支持 MCP 协议的客户端(DeepSeek Harness、Claude Code、Cursor、Windsurf 等)调用。

✨ 功能特性

  • 单份合同审查:对劳动合同(16类风险)或劳务合同(9类风险)进行全面智能审查
  • 批量合同审查:支持多份合同批量审查,自动生成总览表
  • 风险知识库查询:查询指定类别的风险审查要点、法律依据
  • 地方法规查询:查询北京/上海/广东/浙江/江苏的地方法规差异
  • 自动合同类型识别:智能判断是劳动合同还是劳务合同
  • 个人信息脱敏:自动对身份证号、手机号、银行卡号进行脱敏处理

📦 安装

bash
pip install -r requirements.txt

⚙️ 配置

环境变量

变量名必填默认值说明
LLM_API_KEY✅ 是-大模型 API 密钥
LLM_BASE_URL❌ 否https://api.openai.com/v1API 端点地址(OpenAI 兼容接口)
LLM_MODEL❌ 否gpt-4o-mini模型名称
LLM_TEMPERATURE❌ 否0.1采样温度

配置示例

bash
export LLM_API_KEY="sk-xxxxxxxxxxxxxx"export LLM_BASE_URL="https://api.deepseek.com/v1"export LLM_MODEL="deepseek-chat"

💡 支持任何 OpenAI 兼容的 API 接口(DeepSeek、通义千问、智谱 AI、Ollama 等)

🚀 运行

方式一:STDIO 模式(本地工具/桌面客户端)

bash
python server.py# 或显式指定python server.py stdio

方式二:HTTP 模式(网络服务)

bash
python server.py http 0.0.0.0 8000

启动后访问 http://localhost:8000/mcp 即可使用。

方式三:使用 fastmcp CLI

bash
# 开发调试fastmcp dev server.py
# 安装到 Claude Desktopfastmcp install server.py

🔌 MCP Tools

1. review_contract

对合同文本进行完整的风险审查。

参数:

  • contract_text (string, 必填):合同文本内容
  • contract_type (string, 可选):合同类型,auto/labor/service,默认 auto

示例:

review_contract(contract_text="劳动合同文本...", contract_type="auto")

2. batch_review

批量审查多份合同。

参数:

  • contracts_text (string, 必填):多份合同文本
  • separator (string, 可选):分隔符,默认 ---合同分割线---

示例:

batch_review(contracts_text="合同1\n---合同分割线---\n合同2", separator="---合同分割线---")

3. get_risk_knowledge

查询指定类别的风险知识库。

参数:

  • category (string, 必填):风险类别,如"试用期"、"竞业限制"、"人身损害赔偿"

示例:

get_risk_knowledge(category="竞业限制")

4. get_local_regulations

查询指定地区的法规差异。

参数:

  • region (string, 必填):地区,北京/上海/广东/浙江/江苏
  • topic (string, 必填):主题,如竞业补偿/加班费基数/最低工资/产假/婚假

示例:

get_local_regulations(region="上海", topic="竞业补偿")

📚 MCP Resources

URI说明
risk-knowledge://categories所有风险类别清单
risk-knowledge://labor劳动关系16类风险清单
risk-knowledge://service劳务关系9类风险清单
local-regions://list支持的地区列表

💬 MCP Prompts

名称说明
contract_review_prompt完整合同审查提示模板
batch_review_prompt批量审查提示模板

🔗 集成到客户端

Claude Desktop

在 claude_desktop_config.json 中添加:

json
{  "mcpServers": {    "contract-risk-review": {      "command": "python",      "args": ["/path/to/server.py"],      "env": {        "LLM_API_KEY": "your-api-key",        "LLM_BASE_URL": "https://api.openai.com/v1",        "LLM_MODEL": "gpt-4o-mini"      }    }  }}

Cursor / Windsurf

在 IDE 的 MCP 配置中添加上述 stdio 配置即可。

HTTP/SSE 客户端

配置 MCP 服务器地址为 http://localhost:8000/mcp。

📁 目录结构

contract-risk-review-mcp/├── server.py              # MCP Server 主文件├── requirements.txt       # 依赖清单├── README.md              # 使用说明└── knowledge/             # 知识库    ├── risk-knowledge-base.md    # 劳动关系16类风险知识库    ├── service-contract-risks.md # 劳务关系9类风险知识库    ├── local-regulations.md      # 地方法规差异知识库    └── categories-index.md       # 风险类别索引

⚠️ 免责声明

本工具仅提供合同风险参考、条款修改建议以及法规依据,不构成正式法律意见,不能替代执业律师的专业审核。涉及劳动仲裁、重大权益纠纷,请务必咨询执业律师。

📝 更新日志

v1.0.0

  • 初始版本
  • 支持劳动合同 16 类风险审查
  • 支持劳务合同 9 类风险审查
  • 支持批量审查、知识库查询、地方法规查询
  • 支持 STDIO 和 HTTP/SSE 两种传输模式

Source: README.md at commit aaa88da

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.0.0LatestSep 16, 2026

Score

40% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.

Other Review integrations