DOC Model Safety Gate

io.github.laceykes由 GitHub 账号 laceykes 发布v0.1.2更新于 Nov 20, 2026

AI agents propose content changes; a human reviews them; only reviewed work can publish.

发布方自己的服务:model.tools — Zero-Auth Agent Utilities

已验证STDIO仅桌面效率与工作流开发者工具

概览

AI 生成的概览

本地 MCP 服务器,将 AI 提议的内容变更暂存待人工审核,只有审核通过的运行才能发布。

可以做什么
  • 列出并查看仍有待处理 AI 输出的审核运行,含字段、原值与 AI 值
  • 接受、拒绝或编辑单条输出,或对一次运行中所有待处理输出批量接受/拒绝
  • 在审核运行通过后正式发布工作流运行,并回滚已发布的运行
  • 通过其他 Safety Gate API 工具检查工作流与图结构
适用场景
适用于 AI 代理在 CMS 或 Operations 层起草内容变更、且希望在上线前由人工决定的场景,且该限制由后端强制执行而非仅靠约定。
运行要求
通过 npx(Node.js)以 stdio 方式在本地运行,需要一个可访问的 Safety Gate GraphQL API 端点。必需环境变量:DOCMODEL_API_ENDPOINT、DOCMODEL_API_TOKEN 和 DOCMODEL_USER_ID;成员访问还需 DOCMODEL_PROJECT_ID,DOCMODEL_USER_ROLE 可选。本版本不包含托管端点。
安装前请注意
DOCMODEL_API_TOKEN 是发送到所配置 API 端点的 Bearer 令牌,请仅指向可信端点。服务器以 DOCMODEL_USER_ID 中的身份行事,可发布或回滚运行,批量审核会一次接受或拒绝多条输出。该服务器处于 1.0 之前的活跃打包阶段。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

DOC Model Safety Gate

An AI can draft the change. It cannot publish it.

[The Safety Gate loop: an agent proposes a change, the gate holds it, a human reviews it, and only then does it publish]

The DOC Model builds software in three layers — Data, Operations, Components. This MCP server enforces the DOC rule for AI agents working in the Operations layer: an agent can propose changes to your content, but every proposal is staged for human review, and only reviewed work can go live.

AI agents can write to your CMS the moment you connect them to it. This server puts a gate in between: everything an agent produces is staged for review, a human decides, and only reviewed work can go live. If an output is still pending, the publish call itself is refused — the gate is enforced by the backend, not by a warning label.

[How the Safety Gate works: AI agent, Safety Gate, human review, published site — plus undo and a record of every decision]

The rule

  1. Propose — a workflow runs in dry-run mode. Nothing can publish from a dry run.
  2. Stage — AI outputs land in the Safety Gate with their original and proposed values, field by field.
  3. Review — a human accepts, rejects, or edits each output. Bulk review is available for whole runs.
  4. Publish — a live run is only permitted once its review run has no pending or rejected outputs. Attempting to publish early returns an error: "Node … has pending AI output. Review all outputs before LIVE run."
  5. Roll back — a published run can be rolled back when snapshots exist.

Tools

ToolWhat it does
listPendingReviewsList gate runs that still have outputs waiting for a decision.
getGateReviewRead one gate run's outputs: field, original value, AI value, status.
reviewOutputAccept, reject, or edit a single output.
bulkReviewOutputsAccept or reject every pending output in a run at once.
publishReviewedRunRun a workflow live, gated on its review run. The review run ID is required — there is no way to call this "around" the gate.
rollbackRunRoll a published workflow run back.

The server also includes workflow inspection and graph tools for the Safety Gate API; the gate tools above are the supported launch surface (see Status).

Quickstart

The server is a stdio MCP server that talks to a Safety Gate GraphQL API endpoint.

bash
npx doc-model-safety-gate

Or from source:

bash
npm installnpm run buildnode dist/index.js

Configuration

Environment variableRequiredPurpose
DOCMODEL_API_ENDPOINTyesGraphQL endpoint of the Safety Gate API, e.g. http://localhost:4001/graphql
DOCMODEL_API_TOKENyesBearer token sent to the API
DOCMODEL_USER_IDyesIdentity the server acts as (sent as the x-user-id header)
DOCMODEL_PROJECT_IDfor member accessProject the server is scoped to (x-project-id)
DOCMODEL_USER_ROLEnomember (default) or admin

The older STRATA_* spellings of all five variables still work as fallback aliases.

Claude Desktop / Cursor

json
{  "mcpServers": {    "doc-model-safety-gate": {      "command": "npx",      "args": ["-y", "doc-model-safety-gate"],      "env": {        "DOCMODEL_API_ENDPOINT": "http://localhost:4001/graphql",        "DOCMODEL_API_TOKEN": "your-token",        "DOCMODEL_USER_ID": "your-user-id",        "DOCMODEL_PROJECT_ID": "your-project-id",        "DOCMODEL_USER_ROLE": "member"      }    }  }}

Claude Code

bash
claude mcp add doc-model-safety-gate \  -e DOCMODEL_API_ENDPOINT=http://localhost:4001/graphql \  -e DOCMODEL_API_TOKEN=your-token \  -e DOCMODEL_USER_ID=your-user-id \  -e DOCMODEL_PROJECT_ID=your-project-id \  -- npx -y doc-model-safety-gate

See it work

The loop at the top of this page is the real behavior, captured from a working local demo: an AI summary is proposed, staged in the Gate, and a publish attempted before review is refused by the backend; after the reviewer accepts, the identical call succeeds. The full build story — including the blocked publish, caught live — is told at thedocmodel.com.

The demo environment (Postgres + PostgREST + a mock CMS + the Safety Gate API) is not part of this repository; the server requires a Safety Gate API endpoint (see Status).

Status

Pre-1.0 and under active packaging. Verified end-to-end against a local Safety Gate API on 2026-11-12: pending reviews list and open correctly, human review flips output status, unreviewed publishes are refused by the backend, and reviewed publishes execute. The server requires a Safety Gate API endpoint; a hosted endpoint is not part of this release.

License

MIT — see LICENSE. Use it, build on it, ship it commercially if you like; the hosted layer and the DOC Model name stay ours.


Built by Lacey Kesler. The DOC Model Safety Gate is the enforcement layer of the DOC Model (Data · Operations · Components) — taught at thedocmodel.com: AI proposes, humans decide, and the audit trail shows both.

来源:README.md,提交 18ad4a3

工具

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

版本历史

1
  1. v0.1.2最新Nov 20, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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

其他 Model 集成