Skip to main content
ClaudeWave

Data contract semantic layer enforcement

MCP ServersOfficial Registry3 stars0 forksRustMITUpdated today
ClaudeWave Trust Score
87/100
Trusted
Passed
  • Open-source license (MIT)
  • Actively maintained (<30d)
  • Clear description
  • Documented (README)
Last scanned: 9/18/2026
Install in Claude Code / Claude Desktop
Method: pip / Python · contractgate
Claude Code CLI
claude mcp add contractgate -- python -m contractgate
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "contractgate": {
      "command": "python",
      "args": ["-m", "contractgate"]
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
💡 Install first: pip install contractgate
Use cases

MCP Servers overview

# ContractGate

**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.

<!-- LATENCY NOTE (measured 2026-05-24): Per-event validation p99 latency is 31 µs server-side,
     measured with warm compiled-contract cache. This exceeds the <15 ms p99 end-to-end budget
     (network + DB) by 500x. Performance is driven by Rust + Axum core with zero-copy contract
     matching. See ops/bench/ for reproducible benchmark. -->

[![Security](https://img.shields.io/badge/security-hardened-brightgreen)](https://github.com/nightmoose/contractgate/security)
[![Dependabot](https://img.shields.io/badge/Dependabot-enabled-brightgreen)](https://github.com/nightmoose/contractgate/security/dependabot)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE)

**Live demo** → [app.datacontractgate.com/stream-demo](https://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](https://app.datacontractgate.com/llm-integration.md)
([source](docs/llm-integration.md)), 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`](https://app.datacontractgate.com/llms.txt).

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

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

Tools and auth: [`docs/mcp-reference.md`](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/`](docs/examples/redpanda-connect/).

---

## 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 ↓](#self-hosted-free-vs-cloud)

---

## 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, Next.js dashboard

---

## Self-Hosted Free vs Cloud

| Capability | Self-Hosted Free | Cloud (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](https://app.datacontractgate.com/pricing)
[→ Talk to sales](mailto:datacontractgate@nightmoose.com)

---

## 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

| Layer | Tech |
|---|---|
| Validation engine | Rust + Axum (sub-millisecond per-event, see note) |
| Dashboard | Next.js 15 + TypeScript + Tailwind |
| Storage | Supabase (Postgres + Auth) |
| Connectors | Kafka Connect, HTTP, batch, Python SDK, CLI |
| Observability | Prometheus + Grafana |

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

---

## Comparison

| Feature | **ContractGate** | Great Expectations | Soda | Monte Carlo | dbt |
|---|---|---|---|---|---|
| Validation timing | **At ingestion** | Post-hoc / batch | Mix (mostly batch) | Observability | During dbt runs |
| Performance | **Sub-ms per-event, 86k+ ev/s** (Rust, see note) | Python-based | Varies | Not a validator | Not real-time |
| Semantic depth | **Ontology + glossary + metrics** | Basic expectations | Checks + rules | No contracts | Basic schema |
| Visual builder | **Yes + live YAML** | Partial | Limited | No | YAML only |
| Inference from sample data | **One-click JSON → YAML** | Profiler (basic) | Limited | No | No |
| Quarantine + replay | **Built-in** | No | No | No | No |
| Versioning | **Draft → stable → deprecated** | Manual | Basic | No | Basic |
| Self-hosted OSS | **Yes (`make demo`)** | Yes | Open core | Commercial | Yes |
| License | **MIT** | Apache 2.0 | Open core | Commercial | Apache 2.0 |

---

## Contributing

PRs welcome. See [`CONTRIBUTING.md`](CONTRIBUTING.md) and the active punchlist in [`docs/`](docs/).

Active RFCs: [`docs/rfcs/`](docs/rfcs/) · RFC status index: [`docs/STATUS.md`](docs/STATUS.md)

---

## License

MIT — see [`LICENSE`](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`](NOTICE) for details.

---

Built with ❤️ in Florida by [NightMoose](https://nightmoose.com)

What people ask about contractgate

What is nightmoose/contractgate?

+

nightmoose/contractgate is mcp servers for the Claude AI ecosystem. Data contract semantic layer enforcement It has 3 GitHub stars and its last recorded update is dated 2026-09-17.

How do I install contractgate?

+

You can install contractgate by cloning the repository (https://github.com/nightmoose/contractgate) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.

Is nightmoose/contractgate safe to use?

+

Our security agent has analyzed nightmoose/contractgate and assigned a Trust Score of 87/100 (tier: Trusted). See the full breakdown of passed checks and flags on this page.

Who maintains nightmoose/contractgate?

+

nightmoose/contractgate is maintained by nightmoose. The last recorded GitHub activity is dated 2026-09-17, with 0 open issues.

Are there alternatives to contractgate?

+

Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.

Deploy contractgate to your cloud

Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.

Maintain this repo? Add a badge to your README

Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.

Featured on ClaudeWave: nightmoose/contractgate
[![Featured on ClaudeWave](https://claudewave.com/api/badge/nightmoose-contractgate)](https://claudewave.com/repo/nightmoose-contractgate)
<a href="https://claudewave.com/repo/nightmoose-contractgate"><img src="https://claudewave.com/api/badge/nightmoose-contractgate" alt="Featured on ClaudeWave: nightmoose/contractgate" width="320" height="64" /></a>

More MCP Servers

contractgate alternatives