MCP server: One MCP server.

ContractGate

@nightmooseRun by its publisher: served from their own domain, namespace checked by the registry.MCP server · External

Infer, dry-run, deploy, and inspect ContractGate semantic data contracts.

Data engineeringv0.2.0MITRust
Freeno charge per call

Runs on your machine from its package; the steps are below.

What it does

  1. Reads
  2. Writes
  3. High impact

At most: moves money, runs code or commands, deletes data, or sends messages for you.

What it costs

Free

Odel charges nothing per call. The publisher may charge for its own service.

Runs locally over stdio

This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).

npm@nightmoose/contractgate-mcp-serverv0.2.0

Run

npx -y @nightmoose/contractgate-mcp-server

MCP client config

{
  "mcpServers": {
    "contractgate": {
      "command": "npx",
      "args": [
        "-y",
        "@nightmoose/contractgate-mcp-server"
      ]
    }
  }
}
README5 min read

Semantic Contract Enforcement at Ingestion — Patent Pending

Stop bad data before it reaches your warehouse, lakehouse, or ML pipeline.

ContractGate is a high-performance validation gateway that enforces rich semantic data contracts in real time. Built in Rust for sub-millisecond per-event validation (86k+ events/sec/core), it goes far beyond JSON Schema or basic type checks — ontology, glossary, patterns, enums, computed metrics, and automatic inference.

The same contract can gate what leaves your system. POST /egress/{contract_id} runs the identical engine on any outbound payload — a reverse-ETL row, a notebook export, a state object headed to a decision model. Failing records are blocked, declared PII is masked, and the caller forwards only the returned payload. See docs/egress-validation-reference.md.

Security Dependabot License: MIT

Live demo → app.datacontractgate.com/stream-demo


Using Claude, Cursor, or Codex? Paste this

https://app.datacontractgate.com/llm-integration.md
https://github.com/nightmoose/contractgate

implement this in my repo

Your agent reads the integration playbook (source), finds your event shape, infers a contract from real samples, deploys it, wires your producer to /v1/ingest, and verifies with a dry run before anything is written. Machine index: /llms.txt.

MCP (Cursor, Claude Desktop, Windsurf, Copilot, Codex):

json
{
  "mcpServers": {
    "contractgate": {
      "command": "npx",
      "args": ["-y", "@nightmoose/contractgate-mcp-server"],
      "env": {
        "CONTRACTGATE_API_KEY": "${CONTRACTGATE_API_KEY}"
      }
    }
  }
}

Tools and auth: docs/mcp-reference.md.

Claude Code / Cursor plugin:

/plugin marketplace add nightmoose/contractgate
/plugin install contractgate@contractgate

Redpanda Connect (HTTP processor, no custom plugin): docs/examples/redpanda-connect/.

Zapier — validate the record a Zap just pulled, before the next step writes it. A failure is quarantined and the Zap stops. A pass continues with the payload ContractGate returned. Setup and the zapier-platform push commands: docs/zapier.md. Source: zapier/.


Try it in 10 minutes (Self-Hosted Free)

No Supabase account. No API keys. No sign-up.

bash
git clone https://github.com/nightmoose/contractgate.git
cd contractgate
make demo

Opens at http://localhost:3000 — dashboard pre-loaded with three starter contracts and a live event stream. First build ~3 min, subsequent runs instant (Docker layer cache).

bash
make demo-reset   # wipe + reseed (clean slate)
make demo-down    # stop and remove volumes
make demo-logs    # follow all service logs

Self-Hosted Free runs the real gateway binary — not a sandbox. Unlimited local events, full YAML editor, playground, audit log. Feature comparison below ↓


Key Features

  • Semantic YAML Contracts — entities, types, patterns, enums, required fields, glossary, and computed metrics
  • Real-time Validation — at ingestion (Kafka, HTTP, batch) with sub-millisecond per-event validation
  • Visual Contract Builder — intuitive UI + live YAML preview (Cloud)
  • AI-Powered Inference — paste sample JSON → instantly generates a full contract (Cloud)
  • Quarantine + Replay — automatically hold and replay violating events (Cloud)
  • Versioned Contracts — draft → stable → deprecated with compliance mode (Cloud)
  • High Performance — Rust + Axum core, 86k+ events/sec/core
  • Polyglot — Rust engine, Python SDK, CLI, Kafka Connect, Zapier, Next.js dashboard

Self-Hosted Free vs Cloud

CapabilitySelf-Hosted FreeCloud (Free / Growth / Enterprise)
Validation engine✅ Unlimited (local)✅ 1M / 50M / Unlimited events/month
Starter contracts✅ 3✅ 3 / Unlimited / Unlimited
Playground✅✅
Audit log✅ Local Postgres✅ 7 / 90 / Custom days retention
Live event stream✅✅
Auth & API keys❌✅
Multi-tenancy❌ Single org✅
Visual contract builder❌✅ Growth+
AI inference (JSON → YAML)❌✅ Growth+
Quarantine + replay❌✅ Growth+
PII transform rules❌✅ Growth+
Semantic versioning UI❌✅ Growth+
GitHub sync❌✅ Growth+
Team invites & roles❌✅ Growth+
SSO / SAML❌✅ Enterprise
Managed hosting + SLA❌ Self-hosted✅

→ Full pricing → Talk to sales


Other Quickstarts

Docker (gateway + Postgres only):

bash
docker compose up

Python SDK:

bash
pip install contractgate
python
from contractgate import Client
client = Client(api_url="http://localhost:8080", api_key="cg_demo_key")
client.validate(contract_id="...", event={"user_id": "u1", "event_type": "click"})

CLI:

bash
cargo install --git https://github.com/nightmoose/contractgate contractgate
contractgate validate --contract examples/nested-order.yaml events.json

GitHub Action (compile every YAML under contracts/ on PRs):

yaml
- uses: nightmoose/contractgate/actions/validate@main
  with:
    path: contracts

pre-commit (same compile, no network):

yaml
# .pre-commit-config.yaml
repos:
  - repo: https://github.com/nightmoose/contractgate
    rev: main   # pin to a git sha
    hooks:
      - id: contractgate-validate

Architecture

LayerTech
Validation engineRust + Axum (sub-millisecond per-event, see note)
DashboardNext.js 15 + TypeScript + Tailwind
StorageSupabase (Postgres + Auth)
ConnectorsKafka Connect, HTTP, batch, Python SDK, CLI
ObservabilityPrometheus + Grafana

Full RFCs and design docs live in docs/rfcs/. For a quick shipped-vs-draft view, see docs/STATUS.md.


Comparison

FeatureContractGateGreat ExpectationsSodaMonte Carlodbt
Validation timingAt ingestionPost-hoc / batchMix (mostly batch)ObservabilityDuring dbt runs
PerformanceSub-ms per-event, 86k+ ev/s (Rust, see note)Python-basedVariesNot a validatorNot real-time
Semantic depthOntology + glossary + metricsBasic expectationsChecks + rulesNo contractsBasic schema
Visual builderYes + live YAMLPartialLimitedNoYAML only
Inference from sample dataOne-click JSON → YAMLProfiler (basic)LimitedNoNo
Quarantine + replayBuilt-inNoNoNoNo
VersioningDraft → stable → deprecatedManualBasicNoBasic
Self-hosted OSSYes (make demo)YesOpen coreCommercialYes
LicenseMITApache 2.0Open coreCommercialApache 2.0

Contributing

PRs welcome. See CONTRIBUTING.md and the active punchlist in docs/.

Active RFCs: docs/rfcs/ · RFC status index: docs/STATUS.md


License

MIT — see LICENSE. Free to use, fork, and build on top (commercial use welcome).

The semantic contract enforcement algorithm is the subject of a pending patent. The patent covers the invention — your right to use, modify, and distribute the code under the MIT license is unaffected. See NOTICE for details.


Built with ❤️ in Florida by NightMoose

Similar modules

Browse Data engineering