DOC Model Safety Gate

io.github.laceykesPublished by GitHub account laceykesv0.1.2Updated Nov 20, 2026

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

The publisher's own server: model.tools — Zero-Auth Agent Utilities

Overview

AI-generated overview

A local MCP server that stages AI-proposed content changes for human review and only lets reviewed runs publish.

What you can do
  • List and read gate runs with pending AI outputs, including field, original value and AI value
  • Accept, reject or edit a single output, or bulk accept/reject all pending outputs in a run
  • Publish a workflow run live, gated on its review run, and roll back a published run
  • Inspect workflows and graphs through additional Safety Gate API tools
When to use it
Use it when an AI agent drafts content changes in a CMS or Operations layer and you want a human decision before anything goes live, with the gate enforced by the backend rather than by convention.
Requirements
Runs locally via npx (Node.js) as a stdio server and needs a reachable Safety Gate GraphQL API endpoint. Required environment variables: DOCMODEL_API_ENDPOINT, DOCMODEL_API_TOKEN and DOCMODEL_USER_ID; DOCMODEL_PROJECT_ID is needed for member access and DOCMODEL_USER_ROLE is optional. No hosted endpoint is included in this release.
Before you install
DOCMODEL_API_TOKEN is a bearer token sent to the configured API endpoint, so point it only at a trusted endpoint. The server acts as the identity in DOCMODEL_USER_ID and can publish or roll back runs, and bulk review can accept or reject many outputs at once. It is pre-1.0 and under active packaging.

Installation

In SourceWeft

  1. Open DOC Model Safety Gate 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

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.

Source: README.md at commit 18ad4a3

Tools

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

Version history

1
  1. v0.1.2LatestNov 20, 2026

Score

50% 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

Other Model integrations