# DOC Model Safety Gate

> DOC Model Safety Gate is an open-source MCP server for human-in-the-loop tasks. MCP server that stages AI-proposed content changes for human review before publishing. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Self-hosted
- **Repository:** https://github.com/laceykes/doc-model-safety-gate
- **MCP Registry name:** io.github.laceykes/doc-model-safety-gate
- **Categories:** [human-in-the-loop tasks](https://ai-powered.com/categories/human-in-the-loop-tasks)
- **Listing updated:** 2026-11-20

## About

The README says the server sits between AI agents and a CMS-style backend: an agent's proposed edits are staged field by field with original and proposed values, and a person accepts, rejects, or edits each one. The backend refuses a live publish while any output in the linked review run is still pending or rejected, so the gate is enforced server-side rather than by instruction text.

The server is a stdio MCP package that connects to a Safety Gate GraphQL API. It exposes tools for listing pending reviews, reading a run's outputs, reviewing single or bulk outputs, publishing a reviewed run, and rolling back a published run. Connection details, a bearer token, and a user identity are supplied through environment variables.

It is aimed at teams that want AI agents working on content in the Operations layer of the DOC Model but need an approval step before anything goes live. The README describes the project as pre-1.0, and a hosted Safety Gate API is not part of this release, so a compatible endpoint must be run separately.

## Features

- **Staged review of outputs:** Each AI output is held with its original and proposed value so a reviewer can compare them field by field.
- **Backend-enforced publish gate:** Live publishing is refused by the API while the linked review run still has pending or rejected outputs.
- **Single and bulk review:** Reviewers can accept, reject, or edit one output, or act on every pending output in a run at once.
- **Rollback of published runs:** A published workflow run can be rolled back when snapshots exist.
- **Project and role scoping:** Environment variables set the acting user, project scope, and member or admin role.

## Good for

- Letting an AI agent draft CMS content updates while a editor approves each change
- Auditing which AI-proposed edits were accepted, rejected, or changed before publication
- Preventing agents from publishing content directly to a live site
- Rolling back a published content run that turned out to be wrong

## Install

### Claude Code (Terminal)

```sh
claude mcp add doc-model-safety-gate --env DOCMODEL_API_ENDPOINT='<DOCMODEL_API_ENDPOINT>' --env DOCMODEL_API_TOKEN='<DOCMODEL_API_TOKEN>' --env DOCMODEL_USER_ID='<DOCMODEL_USER_ID>' -- npx -y doc-model-safety-gate
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "doc-model-safety-gate": {
      "command": "npx",
      "args": [
        "-y",
        "doc-model-safety-gate"
      ],
      "env": {
        "DOCMODEL_API_ENDPOINT": "<DOCMODEL_API_ENDPOINT>",
        "DOCMODEL_API_TOKEN": "<DOCMODEL_API_TOKEN>",
        "DOCMODEL_USER_ID": "<DOCMODEL_USER_ID>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "doc-model-safety-gate": {
      "command": "npx",
      "args": [
        "-y",
        "doc-model-safety-gate"
      ],
      "env": {
        "DOCMODEL_API_ENDPOINT": "<DOCMODEL_API_ENDPOINT>",
        "DOCMODEL_API_TOKEN": "<DOCMODEL_API_TOKEN>",
        "DOCMODEL_USER_ID": "<DOCMODEL_USER_ID>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "doc-model-safety-gate": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "doc-model-safety-gate"
      ],
      "env": {
        "DOCMODEL_API_ENDPOINT": "<DOCMODEL_API_ENDPOINT>",
        "DOCMODEL_API_TOKEN": "<DOCMODEL_API_TOKEN>",
        "DOCMODEL_USER_ID": "<DOCMODEL_USER_ID>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "doc-model-safety-gate": {
      "command": "npx",
      "args": [
        "-y",
        "doc-model-safety-gate"
      ],
      "env": {
        "DOCMODEL_API_ENDPOINT": "<DOCMODEL_API_ENDPOINT>",
        "DOCMODEL_API_TOKEN": "<DOCMODEL_API_TOKEN>",
        "DOCMODEL_USER_ID": "<DOCMODEL_USER_ID>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "doc-model-safety-gate": {
      "command": "npx",
      "args": [
        "-y",
        "doc-model-safety-gate"
      ],
      "env": {
        "DOCMODEL_API_ENDPOINT": "<DOCMODEL_API_ENDPOINT>",
        "DOCMODEL_API_TOKEN": "<DOCMODEL_API_TOKEN>",
        "DOCMODEL_USER_ID": "<DOCMODEL_USER_ID>"
      }
    }
  }
}
```

## Tools

- `listPendingReviews`: List gate runs that still have outputs waiting for a decision.
- `getGateReview`: Read one gate run's outputs: field, original value, AI value, status.
- `reviewOutput`: Accept, reject, or edit a single output.
- `bulkReviewOutputs`: Accept or reject every pending output in a run at once.
- `publishReviewedRun`: Run a workflow live, gated on its review run.
- `rollbackRun`: Roll a published workflow run back.

## FAQ

### How do I install the server?

The README gives npx doc-model-safety-gate as the quick start, or npm install, npm run build, and node dist/index.js for source. Claude Desktop, Cursor, and Claude Code configuration snippets are included.

### Is a hosted Safety Gate API available?

No. The README states that a hosted endpoint is not part of this release, and the server requires a Safety Gate API endpoint to connect to.

### What happens if a publish is attempted before review?

The README says the backend returns an error such as "Node has pending AI output. Review all outputs before LIVE run." and does not publish.

### What license does DOC Model Safety Gate use?

The README says the project is MIT licensed, with the hosted layer and the DOC Model name kept by the author.

### Is DOC Model Safety Gate free?

Yes. DOC Model Safety Gate is open source, so you can use and self-host it for free.

### How do I add DOC Model Safety Gate to Claude Code?

Run this command in your terminal: claude mcp add doc-model-safety-gate --env DOCMODEL_API_ENDPOINT='<DOCMODEL_API_ENDPOINT>' --env DOCMODEL_API_TOKEN='<DOCMODEL_API_TOKEN>' --env DOCMODEL_USER_ID='<DOCMODEL_USER_ID>' -- npx -y doc-model-safety-gate

### What are the best alternatives to DOC Model Safety Gate?

The closest alternatives to DOC Model Safety Gate are PromptHuman, AgentSupply, workman.rent — humans for real-world checks, AskHooman and Human Use.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [PromptHuman](https://ai-powered.com/mcp/prompthuman): PromptHuman is a paid MCP server for human-in-the-loop tasks.
- [AgentSupply](https://ai-powered.com/mcp/agentsupply): AgentSupply is a free MCP server for human-in-the-loop tasks.
- [workman.rent — humans for real-world checks](https://ai-powered.com/mcp/workman-rent-humans-for-real-world-checks): workman.rent — humans for real-world checks is a paid MCP server for local services.
- [AskHooman](https://ai-powered.com/mcp/askhooman): AskHooman is an open-source MCP server for human-in-the-loop tasks.
- [Human Use](https://ai-powered.com/mcp/human-use): Human Use is an open-source MCP server for human-in-the-loop tasks.
- [hands.txt: a human proxy for AI agents](https://ai-powered.com/mcp/hands-txt-a-human-proxy-for-ai-agents): hands.txt: a human proxy for AI agents is a paid MCP server for human-in-the-loop tasks.
- [Japan Hands](https://ai-powered.com/mcp/japan-hands): Japan Hands is an MCP server for human-in-the-loop tasks.
- [MARU Japan Hands](https://ai-powered.com/mcp/maru-japan-hands): MARU Japan Hands is a paid MCP server for human-in-the-loop tasks.

---
Source: https://ai-powered.com/mcp/doc-model-safety-gate
