ContractGate logo

ContractGate

Infer, deploy, validate, and inspect semantic data contracts through ContractGate's MCP tools.

Install ContractGate

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "contractgate": {
      "command": "npx",
      "args": [
        "-y",
        "@nightmoose/contractgate-mcp-server"
      ],
      "env": {
        "CONTRACTGATE_API_KEY": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

ContractGate MCP server connects AI agents to the ContractGate semantic data-contract API. It can infer YAML contracts from JSON samples, deploy reviewed contracts, validate inbound or outbound payloads, list accessible contracts, and inspect quarantined events. Validation supports dry runs, returning violations and suggestions without creating audit or quarantine records by default. Reach for it when agents need to manage contract-based data quality at ingestion or before data leaves a system.

Use cases

  • Infer a contract from representative event samples
  • Validate incoming events before ingestion
  • Deploy reviewed contract versions
  • Check outbound payloads before delivery

Key features

  • JSON-to-YAML contract inference
  • Dry-run event validation
  • Versioned contract deployment
  • Quarantine inspection
  • Outbound payload validation
  • Violation suggestions and response payloads

Tools6

What ContractGate lets your agent do. Expand a tool for its parameters.

Verified live~1.1k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

9/9 checks healthy over the last 44d

What it can do

From the 6 tools this server returned when we ran it; 6 declare their own safety hints.

Can delete or modify data · 1Handles credentials · 1Makes network requests · 6Read-only tools · 5
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceSigned build
Package age26 days
Maintainers1

Observed 2026-10-27 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 14d ago via OSV.dev · @nightmoose/contractgate-mcp-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars4Stargazers on the source repository.
npm downloads1.2kPackage downloads in the last 30 days.
Last commit1d agoMost recent push to the default branch.
Tools exposed6Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How ContractGate works

What ContractGate does

ContractGate exposes ContractGate's semantic data-contract API through MCP. Agents can turn real JSON samples into draft DataContractGate YAML, validate events against an existing contract or inline YAML, deploy versioned contracts, inspect contracts visible to an API key, and review rejected events in quarantine.

The underlying gateway validates more than basic JSON types. Contracts can describe required fields, entities, patterns, enums, glossary terms, and computed metrics. The same validation engine can process inbound events and outbound payloads, making the server relevant to ingestion pipelines, reverse-ETL exports, notebook data, and state sent to decision models.

How it works

The MCP tools call ContractGate HTTP endpoints. infer_contract sends sample events to /contracts/infer and returns a draft without saving it. Reviewers should write the resulting YAML to contracts/<name>.yaml before deployment.

validate_events requires exactly one of contract_id or yaml_content. A contract ID validates through /v1/ingest/{id}; inline YAML uses /playground/validate for each event. Dry-run mode is enabled by default for contract-ID validation, so the request does not create audit, quarantine, or usage records. HTTP 207 and 422 responses are returned as data, allowing an agent to process individual violations and their suggestions.

deploy_contract sends YAML to /contracts/deploy. ContractGate finds or creates the contract by name, makes the submitted version stable, and deprecates the previous stable version. A conflict occurs when the same name and version already exists, so the YAML version must be increased. Deployment is refused while quarantine is pending.

For outbound checks, egress_validate posts to /egress/{contract_id}. Its dry-run default avoids audit and quarantine records. When a response is accepted or repaired, forward response.payload; do not forward the original body after a block or failure.

Setup and configuration

Run the MCP server with npx and the package's latest tag through an MCP client configuration:

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

Set CONTRACTGATE_API_KEY to an API key that can access the target ContractGate organization and contracts. The repository also supports a local demo started with make demo; it runs at http://localhost:3000 with authentication disabled and includes starter contracts, a YAML editor, playground, audit log, and event stream.

Tools and capabilities

  • Infer draft YAML from sample JSON without persisting it.
  • Validate events using a deployed contract or inline YAML.
  • Deploy stable contract versions and deprecate earlier stable versions.
  • List contracts available to the configured API key.
  • Retrieve quarantined events with violation details.
  • Validate outbound payloads and return the accepted or repaired payload.

Limitations and notes

Self-hosted free mode is single-organization and does not include API-key authentication, AI inference, quarantine and replay, PII transform rules, or the visual contract builder. Those capabilities are listed for cloud plans. A deployment cannot proceed while quarantine is pending, and an existing name/version combination must be changed before it can be deployed again. LLM output validation is provided by the separate AISchemaGate package rather than by these MCP tools.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about ContractGate

ContractGate is an MCP server that connects AI agents to the ContractGate semantic data-contract API. Its main tools infer and deploy YAML contracts, validate inbound and outbound events, list contracts, and inspect quarantined events. It supports dry runs so agents can review violations before persistence or delivery.

Install it through an MCP client with `npx -y @nightmoose/contractgate-mcp-server` and set `CONTRACTGATE_API_KEY` in the server environment. The documented configuration uses stdio and works with the named MCP clients.

Yes, ContractGate works with Cursor through its MCP server configuration. Add the `contractgate` entry, run the package with `npx`, and provide an API key in `CONTRACTGATE_API_KEY`.

Use `validate_events` with a deployed `contract_id` or inline `yaml_content`; contract-ID validation defaults to dry-run mode. Use `egress_validate` for outbound payloads, which also defaults to dry-run mode and returns the full response for inspection.

Review the YAML returned by `infer_contract`, save it under `contracts/<name>.yaml`, and pass it to `deploy_contract`. The deployment makes the version stable and deprecates the previous stable version; increase the YAML version if the same name and version already exists.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewContractGate AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/contractgate?style=directory)](https://allmcps.com/mcp/contractgate)
HTML Embed
<a href="https://allmcps.com/mcp/contractgate"><img src="https://allmcps.com/api/badge/contractgate?style=directory" alt="ContractGate on AllMCPs" /></a>