Skip to content
Grok

JSON Contracts for Grok

io.github.json-contracts/json-contracts

JSON contract registry and validator for structured LLM and agent outputs.

client:Grok transport:stdio runtime:npm

Install JSON Contracts in Grok

.mcp.json (in your project root)

Held in this page only — never stored, logged, or sent anywhere but back to your screen.

{
  "mcpServers": {
    "json-contracts": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "json-contracts"
      ],
      "env": {
        "JSON_CONTRACTS_DIR": "<JSON_CONTRACTS_DIR>"
      }
    }
  }
}

Grok Build reads Claude Code's .mcp.json and Claude Desktop's config unchanged, so a server you have already set up there needs nothing new. The Grok web app and X integration do not take custom servers. Grok docs

JSON Contracts in other clients