Contract Ops Mcp

io.github.DrBaher由 GitHub 账号 DrBaher 发布v0.3.0更新于 Oct 24, 2026

One MCP server for the contract-ops suite: all nine local-first CLIs as agent tools.

已验证STDIO仅桌面效率与工作流文件与存储

概览

AI 生成的概览

本地 MCP 服务器,把九个 contract-ops 命令行工具作为工具提供给助手,用于合同提取、检查、比对、起草和审阅。

可以做什么
把合同文件(.md、.txt、.html、.docx、.pdf)提取为结构化 JSON,包含当事方、日期和条款,并检查占位符、失效引用、编号和日期缺陷。按条款比对两个合同版本,标出实质性、表面性或位置变动。用类型化参数填充模板占位符,并把 DOCX 转换为 PDF。依据内部审阅手册为 NDA 打分并给出依据。搜索和解析带版本的模板,查询已签署合同登记册的续约、通知期限和续约风险。验证已签名 PDF 和回执包、查看审计日志、列出已安装的 CLI,并通过目录和原始参数接口运行套件中的任意 CLI。
适用场景
适合在助手内处理合同、需要提取、一致性检查、版本比对、NDA 审阅或模板填充的场景。也适合已在使用 contract-ops 命令行工具、希望由助手来驱动的团队。
运行要求
通过 stdio 在本地运行,通常用 npx 启动。机器上需预先安装九个 contract-ops 命令行工具,因为服务器会调用它们。PDF 转换需要 PDF 后端,例如 LibreOffice。文件路径被限制在 CONTRACT_OPS_MCP_BASE_DIR 内,默认是工作目录。
安装前请注意
原始参数运行工具可执行套件中的 CLI,但签名类子命令会被白名单拒绝,签名仍由人工把关。文件路径参数被限制在 CONTRACT_OPS_MCP_BASE_DIR 内,除非你放宽范围。README 建议用 curl 管道脚本安装 CLI,这会执行远程代码,请先审查。部分工具会写出 PDF 等文件。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Contract Ops Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

contract-ops-mcp

One MCP server for the whole contract-ops CLI suite — wire it up once and an agent (Claude, Cursor, Codex, …) gets all nine local-first CLIs as tools: extract, draft, lint, compare, convert, review, and the template + signed-contract vaults. Signing stays human-gated.

Run this

jsonc
// e.g. Claude Desktop / Cursor MCP config{  "mcpServers": {    "contract-ops": { "command": "npx", "args": ["-y", "contract-ops-mcp"] }  }}

The CLIs themselves must be installed (the server shells out to them). Fastest way to get all nine:

bash
curl -fsSL https://cli.drbaher.com/install.sh | sh     # local# …or run the server + CLIs in one container: ghcr.io/drbaher/contract-ops

Call suite_status any time to see which CLIs are present and how to install any that aren't.

Prefer a ready-made agent? contract-ops-agent is a terminal agent that already wraps this server in an enclosure — the model's only tools are the contract-ops tools, no shell/filesystem/signing by construction. Bring your own model (Claude, OpenAI, or any OpenAI-compatible endpoint): npm i -g contract-ops-agent.

Tools

Curated, ergonomic tools (typed inputs, JSON out) for the common operations, plus two escape hatches for the long tail:

ToolWhat it does
extract_contractAny contract (.md/.txt/.html/.docx/.pdf) → structured JSON (parties, dates, clauses, …)
lint_contractInternal-consistency findings (placeholders, broken refs, defined-term/numbering/date defects)
compare_versionsClause-aware drift between two versions (exit 0 clean · 2 substantive · 3 cosmetic · 4 moved)
fill_templateFill a template's placeholders with typed params (deterministic)
convert_to_pdfDOCX → PDF (needs a PDF backend, e.g. LibreOffice)
review_ndaScore an NDA against a house playbook, with evidence
template_vault_find / template_vault_getSearch / resolve versioned templates (read-only)
contract_vault_query / contract_vault_due / contract_vault_riskQuery the signed-contract register; project renewal/notice deadlines; renewal-exposure (read-only)
verify_signature / verify_receipt / audit_showVerify a signed PDF / a receipt bundle / walk the audit log (read-only)
catalog(cli)Return any CLI's full --catalog json — discover the long tail
run(cli, args)Escape hatch: run any suite CLI with raw args (no shell)
suite_statusWhich CLIs are installed (+ versions) and how to install the rest

The curated set and catalog/run are discovery-driven — they ride the suite's uniform --catalog json contract, so they stay in sync as the CLIs evolve.

Safety

  • Signing is human-gated. Only sign-cli's read/verify operations are exposed (verify_signature, verify_receipt, audit_show) — never request-create or sign. This is enforced: the run/catalog escape hatches reject any sign subcommand outside a read-only allowlist, so request-create/send/sign/approve can't be reached here. Those stay behind sign-cli's own MCP server with its per-signer approval tokens, so this server can't become an unguarded signing path.
  • Filesystem lockdown. File-path arguments to the curated tools are confined to CONTRACT_OPS_MCP_BASE_DIR (default: the working directory). Set it to widen the sandbox.
  • No shell. CLIs are invoked with execFile (no shell interpolation).

License

MIT. Part of the contract-ops CLI suite. See AGENTS.md for the agent contract.

来源:README.md,提交 c1817d1

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.3.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分