Skip to content

EditorialOS/The-Gate-VPS

Repository files navigation

The Gate — AI Content Evaluation Framework (Agent Tools via MCP)

version status evals agents transport node tls

The Gate is an evals framework for AI-generated content — it scores a draft against a brief across weighted quality dimensions and returns a pass/fail verdict + scorecard. It's exposed as agent tools over the Model Context Protocol (MCP), deployed multi-tenant over HTTPS in production.

30-second tour: evals/ is the scored eval harness · examples/agent/ is an autonomous draft→eval→revise agent · docs/PRD.md is the product spec · EVALS.md documents the scoring rubric.


Why this exists

Teams shipping AI-written content need a programmatic quality gate — an evals layer that decides whether a draft is good enough to publish, and tells you why. The Gate does that, and makes it callable by any AI agent as a standard MCP tool. It's the difference between "we have ideas about evals" and "here's the eval system in production, with an agent using it, and a PRD."

What's in this repo

Path What it proves
evals/ A scored eval harness — dataset of briefs+drafts with expected verdicts, a runner, and a pass-rate report. "Design an evals framework for our agent."
examples/agent/ An autonomous agent that calls the gate as an MCP tool in a draft → evaluate → revise-on-fail → re-evaluate loop. "The agent in production with evals."
docs/PRD.md The product requirements doc.
EVALS.md The scoring rubric — dimensions, weights, verdict thresholds.
server.js The multi-tenant MCP server (auto-generates tools from openapi.yaml).
RUNBOOK.md Operations runbook (deploy, onboard, verify, troubleshoot).

The eval tools (via MCP)

Tool Purpose
runGate Evaluate a draft against a brief → verdict + weighted scorecard
listReviews List past evaluations (tenant-scoped)
getReview Fetch a single evaluation by id

See EVALS.md for the scoring model.

Deployment

MCP endpoint https://the-gate-mcp.example.com/mcp
Health https://the-gate-mcp.example.com/healthz
Transport MCP Streamable-HTTP (stateless, multi-tenant)
TLS Let's Encrypt (auto-issued via Traefik)

Quick start

Run it locally

git clone https://github.com/EditorialOS/The-Gate-VPS.git
cd The-Gate-VPS
cp .env.example .env
# Edit .env: set GATE_API_BASE_URL to your running Gate API instance
docker compose up -d

Then run the agent against the local instance (MCP server maps to port 8082):

cd examples/agent
npm install
export GATE_MCP_URL="http://localhost:8082/mcp"
export GATE_API_KEY="your_key"
node agent.mjs

Hosted access

cd examples/agent
npm install
export GATE_MCP_URL="https://the-gate-mcp.example.com/mcp"
export GATE_API_KEY="gate_sk_xxxxxxxx_..."   # your key
node agent.mjs

Hosted keys are provisioned per customer — request access: editorial.operating.system@gmail.com

Run the eval harness

cd evals
export GATE_MCP_URL="https://the-gate-mcp.example.com/mcp"
export GATE_API_KEY="gate_sk_xxxxxxxx_..."
node run-evals.mjs        # prints a pass-rate report vs expected verdicts

Architecture

Agent / MCP client ──HTTPS+Bearer──► Traefik (TLS) ──► the-gate-mcp ──► the-gate API ──► Postgres
                                                        (this repo)      (eval engine)

Details in docs/architecture.md.

Multi-tenancy

The server bakes in no token. Each request's Authorization: Bearer … is forwarded to the API, so per-key tenant isolation applies. Verified: two keys see only their own evaluations; no cross-tenant leakage.

Versioning & docs

SemVer — current v1.1.0 (CHANGELOG). Full docs in docs/. License: proprietary © 2026 EditorialOS.

About

Production deployment layer for The Gate. Multi-tenant MCP server exposing the eval engine as agent-callable tools — scored eval harness, draft→eval→revise agent example, PRD, runbook, Docker.

Topics

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors